[Gllug] Installing grub from a recovery CD

Tethys tet at createservices.com
Thu Feb 24 08:32:05 UTC 2005


John Winters writes:

>I've installed Sarge on a box, followed by XP (in a partition reserved
>previously).  The XP installation has overwritten Grub's component in
>the MBR with the DOS boot loader, so I need to re-install Grub's bit,
>having booted from a CD.

This is precisely why I never install into the MBR. I can't understand
why the distributions all seem to do this by default. Installing into
the first sector of the boot partition is a much saner option. The only
downside is perhaps a few extra ms delay before the boot loader starts.
That's a price well worth paying for the extra robustness it brings IMHO.
Particularly as I tend to only reboot for hardware upgrades...

>This is easy using lilo - just mount the partitions and do a "lilo -r",
>and I presume it must be possible with grub too but I can't find any
>clues in the grub documentation.  Can anyone give me a pointer please?

	grub-install /dev/hda

Or to put it onto the first sector of the boot partition (assuming /boot
is on hda1):

	grub-install /dev/hda1

You may also need to add "--root-directory=/".

Tet
-- 
Gllug mailing list  -  Gllug at gllug.org.uk
http://lists.gllug.org.uk/mailman/listinfo/gllug




More information about the GLLUG mailing list