I'm trying to make a portable distro of linux on a 16MB SD card. I have a 2.4 kernel and extlinux as a bootloader. How can I pass the root= parameter to the kernel that the distro would be still portable?

I know that I should enter the sdx label but I don't know how to do that so that it would work also on other machines? I suppose that one computer's /dev/sdd isn't the same as another computer's /dev/sdd.

How can I make sure that my distro would boot into the right root drive every time?

share|improve this question
1  
Use a recent kernel. With it you can pass a root=UUID=.... – cylgalad Mar 31 '16 at 8:00
    
Is this the only way? Because how do then large linux distros make live cds and usb keys? UUIDs change with device you use, so it isn't reallly reliable way to set the root fs. Is there any way to tell the kernel to use the partition where the kernel itself is located? – kristjank Mar 31 '16 at 13:47
    
A Live system is in RAM: no physical root (in SliTaz e.g. root=/dev/null when running live). Also don't get UUID and PARTUUID mixed up. UUID is software, part of the filesystem, it doesn't change upon cloning. – L. Levrel Mar 31 '16 at 14:00
    
So i can't really make a random machine run my SD card without an install? – kristjank Mar 31 '16 at 14:07
    
The UUID of your SD card won't change because you put it in another computer. I have an external hard-drive with Archlinux on it, it works fine. Your problem would rather be that not all computers can boot from a SD card! And of course there's EFI/Secureboot, but that's another problem. – cylgalad Apr 1 '16 at 7:40

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.