[Gllug] Installing grub from a recovery CD

Philip Hands phil at hands.com
Thu Feb 24 02:43:00 UTC 2005


John Winters wrote:
> Hi all,
>
> 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 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?

If you have Knoppix to hand, boot that, then run "sudo grub" and you'll get
a grub prompt (after a delay where it probes floppies and the like)

Then set the root device, for example if the /boot/grub directory is on
/dev/hda1 you'll want:

   grub>  root (hd0,0)

N.B.  If you have a separate /boot partition, it's that one, otherwise its
wherever the root partition is.

Regular use of the TAB key should help tell you if you're getting close.

Then assuming that you want it installed on the first drive:

   grub>  setup (hd0)

and it should give cheerful looking output.

Then reboot, and with luck, all will be well.

Cheers, Phil.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 264 bytes
Desc: OpenPGP digital signature
URL: <http://mailman.lug.org.uk/pipermail/gllug/attachments/20050224/5e1f0e0b/attachment.pgp>
-------------- next part --------------
-- 
Gllug mailing list  -  Gllug at gllug.org.uk
http://lists.gllug.org.uk/mailman/listinfo/gllug


More information about the GLLUG mailing list