LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Hardware (https://www.linuxquestions.org/questions/linux-hardware-18/)
-   -   GRUB 1.95 on a USB Flash Drive (OCZ Rally 2, 2GB) (https://www.linuxquestions.org/questions/linux-hardware-18/grub-1-95-on-a-usb-flash-drive-ocz-rally-2-2gb-529199/)

GamerX 02-15-2007 01:29 AM

GRUB 1.95 on a USB Flash Drive (OCZ Rally 2, 2GB)
 
After searching far and wide the expanse of the world wide web I've come to one conclusion: non-legacy GRUB has sparse documentation. (and I'm being generous)

Without further adieu...
MOBO: Asus P4S533-MX
BIOS: Latest available, USB Booting... check!
CPU: P4 2.8GHz
RAM: 2x512MB

USB-DRIVE: OCZ Rally 2 (2GB)

The contents of the stick comprise of a single (max size) FAT16 (flagged bootable) partition. The file system is in good order, I'm running eclipse and hosting a home folder on the said device with no issues. (and I must say, I'm impressed with the performance!)

I know that the device is bootable, a WinXP produced MS-DOS floppy cloned onto the USB device (bootsector+files) made it bootable and viola: DOS a la USB! ...yuck

Now I'm trying to swap DOS for GRUB 1.95. Said version of GRUB installs into a floppy and the USB device with no errors reported, after a quick visual scan (hexdump) the boot sectors look legit on both. Identical commands used to install GRUB (except the device names of course :^)

However the results slightly vary:
Booting from the floppy yields a grub console, check! (haven't setup a menu.lst etc)
Booting from the USB device yields the string "GRUB " (minus quotes) and a flashing cursor, no cigar. =(

There are numerous articles on putting GRUB onto a USB drive, while the commands are the same for both version, the mention of stage1 and 2 loaders point to use of legacy-GRUB in said articles. (which I haven't tried)

I'm thinking the following: the USB driver missing?
I make'd grub-1.95 from sources, then maybe it's possible to work in some extra drivers in there?

Has anyone else tried to do this? or am I the only one with too much time on my hands? ;)
If you have some suggestions or ideas I'd love to hear them because I'm kind of stuck with this.

GamerX 02-15-2007 05:08 PM

ttt, anyone?

</spam>

EDIT: Well I think I found the answer... (now if I could progress to a solution =)
I downloaded symlinux 3.36 sources and what do you know, README.usbkey tells the tale:
Code:

The proper mode to boot a USB key drive in is "USB-HDD".  That is the
ONLY mode in which the C/H/S geometry encoded on the disk itself
doesn't have to match what the BIOS thinks it is.  Since geometry on
USB drives is completely arbitrary, and can vary from BIOS to BIOS,
this is the only mode which will work in general.

Some BIOSes have been reported (in particular, certain versions of the
Award BIOS) that cannot boot USB keys in "USB-HDD" mode.  This is a
very serious BIOS bug, but it is unfortunately rather typical of the
kind of quality we're seeing out of major BIOS vendors these days.  On
these BIOSes, you're generally stuck booting them in USB-ZIP mode.


THIS MEANS THE FILESYSTEM IMAGE ON THE DISK HAS TO HAVE A CORRECT
ZIPDRIVE-COMPATIBLE GEOMETRY.

Yup, my BIOS only boots from it with the "USB ZIP\Flash" option for removable media but not with "USB-HDD".
And that's the latest OEM BIOS available.

Syslinux provides a script to build an appropriate image file, now let's see what it does....


All times are GMT -5. The time now is 02:59 PM.