Booting Linux from USB
Derek Davis
derek.davis at gmail.com
Fri May 11 20:35:07 MDT 2007
I'm trying to get Linux booting off of a USB thumb drive. I tried both using
image.squashfs (which would be my preferred method) and just putting
the whole, uncompressed file system on the USB drive. I can get the
system to load the kernel and begin booting using either method, but
the problem happens when it actually tries to access the file system.
When I use squashfs, the kernel goes through it's initialization, and
then it begins looking for the device that has image.squashfs. It
checks sda (my sata hard drive) and hda (my optical drive), but it
doesn't check sdb, which is my USB drive. However, it then drops me
to busy box, and from there I can mount /dev/sdb1, point the env var
LOOP to it, exit, and it boots fine.
When I copy the whole file system to the USB drive and modify menu.lst
accordingly, I'm not sure how to set the root= parameter, because I
need to set it to sdb, whereas if someone doesn't have a sata drive,
they would need it set to sda. None the less, for the sake of
testing, I set it to sdb. After the kernel init, it says that
/dev/sdb1 is not a valid root device. It then immediately prompts me
to specify a boot device, so I put /dev/sdb1 exactly as in the
menu.lst, and it works.
So, how can I get this working? Any suggestions? Basically, why
won't the system check my USB drive for the image.squashfs file, even
though from busy box I can mount and use it? I made sure that USB
drivers are compiled into the kernel and not modules. And why, when
using the uncompressed file system, can the system not use /dev/sdb1
until I specify it after it fails? I've been searching the web, but
can't find anything helpful.
Thanks.
--
Derek M Davis derek.davis at gmail.com
-------------------------------------------------------------------
"Man has no choice about his need for self-esteem.
He can only choose by what standard to gauge it."
More information about the PLUG
mailing list