grub-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Using grub2 on a USB stick


From: Aaron Brice
Subject: Using grub2 on a USB stick
Date: Fri, 12 Mar 2010 10:22:47 -0700

I am trying to use grub2 on a USB stick.  My situation is:

- I'm using RHEL4 which has grub 0.95 installed on the system, and
creating another OS in a directory to install onto a USB stick, and I
want to use grub2 on that USB stick (but not on the host system).
- I compile grub 1.98 with --prefix=~/grub
- The root of my target system is ~/fsimage.  I added a
~/fsimage/boot/grub/grub.cfg and ~/fsimage/boot/grub/device.map which
contains "(hd0) /dev/sdc" where /dev/sdc is my USB stick.
- I use genext2fs to create an ext2 image from ~/fsimage, and cat that
to /dev/sdc1
- Run ~/grub/sbin/grub-install --no-floppy --root-directory=~/fsimage /dev/sdc

Based on this use case:
http://grub.enbug.org/UseCases/Ubuntu

But I get an error:
~/grub/sbin/grub-probe: error: cannot find a GRUB drive for /dev/sda1.
 Check your device.map.
Auto-detection of a filesystem module failed.
Please specify the module with the option '--modules' explicitly.

Is there a way to get this to work?  We had this working with grub
0.95 by using:

echo -e "root (hd0,0)\\nsetup (hd0)\\nquit" | /sbin/grub
--no-config-file --batch --no-floppy --device-map=<(echo "(hd0)
/dev/sdc")

But I'd like to switch it to grub2 if possible..

Thanks,
Aaron




reply via email to

[Prev in Thread] Current Thread [Next in Thread]