What determines where GRUB is installed?

Derek Broughton news at pointerstop.ca
Thu Feb 8 13:55:56 UTC 2007


mtyoung wrote:

> I have an image backup for the XP drive, so I can restore it, but how do
> I force Grub to install where I want it?

grub-install /dev/sda --root-directory=/

Will put it on the MBR of your first SATA drive, using the grub
configuration in /boot.  If you're trying to run this from some system
other than one that will have the boot images, you'd need to mount that
partition, and use:

grub-install /dev/sda --root-directory=/mount-point

As long as you have all the kernels in /boot, or install grub in the
partition superblocks (eg, grub-install /dev/sdb1) for other linuxes, and
you have all of your OSes specified in /boot/grub/menu.lst, you can boot
all the systems without having to mess with the BIOS boot order.
-- 
derek





More information about the ubuntu-users mailing list