USB flash drives [was: RE: Migrating from the Legacy Diskette Drive: Ford Motor Company Case Study]

Jason Clinton me at jasonclinton.com
Wed Sep 17 23:09:16 CDT 2003


   Jason Clinton wrote:

   Brian Densmore wrote:

No, when devfs creates my USB device it looks like a scsi harddrive.
My USB flash drive shows up as /dev/sda1 and I can make devfs
create a symlink from /dev/sda1 to /dev/hda2 which grub will *see*
as (hda1) and if I put a single partition on it and mount it as /boot
and copy my vmlinuz, etc. on it  and tell grub to boot
(hda1,0)/boot/vmlinuz that is what it will faithfully do. Now, granted
I may still have to put grub on the mbr of the harddisk. Maybe that is
what is confusing you. Neither the BIOS nor grub needs to know
anything about USB in order to boot from a USB flash drive. Also
I could just tell grub to boot (sd0,0), instead of making the symlink.
I never said I was going to install grub on the USB. Of course I
could be wrong. I could be putting the cart before the horse. Nothing
that couldn't be fixed by putting a "USB aware" kernel in firmware, but
of course that would require a custom MB these days. Then again, I have
the source code to grub and could make it "USB aware" (were I so
inclined).

   I think you are confused. Grub is not able (on my system, anyways) to
   see the USB drive before a kernel is loaded. Grub has no USB drivers
   and my BIOS does not do any sort of SCSI emulation. Grub has no way of
   getting to vmlinuz on the USB drive because there is no way to get to
   USB anything. When Grub is loaded at boot (from wherever), it is the
   only thing running. As of this writting it only has access to drives
   enumerated by the BIOS that appear on either the floppy, ATA or SCSI
   buses. AFAIK, USB drives are not enumerated and no sort of BIOS USB
   driver is active.
   Well, I'll insert my foot partially in to my mouth. The upgrade I did
   over the weekend included a new VIA KT600 based motherboard and it
   does have some USB emmulation stuff that enummerates the USB drive as
   another ATA drive. It has several USB boot related options in the BIOS
   and both Grub and Lilo are able to read the media. Yay! The board I
   pulled out of this system, an ASUS A7V133 did not have that
   capability.
   I'll be installing Linux on my flash drive, now. :)




More information about the Kclug mailing list