Booting root filesystem from usb device

Greg KH greg at kroah.com
Wed Nov 30 17:13:22 EST 2011


On Wed, Nov 30, 2011 at 12:23:39PM -0800, Ezequiel García wrote:
> Hi, 
> 
> I have a very silly question. I was building a small hand made root
> filesystem (with busybox and such) just to show how the process would be 
> done.
> 
> Something pretty similar to free-electrons 'embedded linux from scratch' (http://free-electrons.com/docs/elfs/) but on a usb device (pen-drive).
> So, I put me kernel, busybox and stuff and installed lilo onto the mbr.
> 
> The problem is when the kernels boots it can't find the usb partition (sdc1)
> to mount (i.e. the root device). 
> 
> I know the usual way to do this is using initrd or similar, 
> but I don't want to get that into the equation since the 
> whole project is just for educational purposes and 
> I want to keep things as simple as possible.

Then just pass the command line option to sleep for a while before
looking for the root device.  I do that just fine on my tiny dns server
that runs from a USB flash drive.

Look in Documentation/kernel-parameters.txt for the rootdelay= option
for more details as to what to do.

Hope this helps,

greg k-h



More information about the Kernelnewbies mailing list