Restoring GRUB

Associate
Joined
5 Jul 2004
Posts
51
Location
London
Hi All,

Currently I'm dual booting Windows XP and Ubuntu 7.04 using GRUB (both installed on separate hard drives). The time has come to format my Windows XP drive and reinstall it. Now if I'm remembering correctly the re-installation of Windows XP will reset the MBR removing GRUB. Obviously I want the dual boot screen back again and to do this I'll have to put GRUB back on the MBR by going into Ubuntu and running a GRUB command so it will "reinstall" itself.

So two questions, how do I get back into my Ubuntu OS without the dual boot menu and what command do I run to get GRUB on the MBR again?

Thanks.
 
After you have installed Windows, you can pop in the Ubuntu CD, press C when the GRUB bootloader appears, and type "root (hdx,y)" where x is the drive and y is the partition of where your /boot is stored. and then "setup (hdx)" where x is the drive to write the MBR to.

You can access the boot menu you already have on your HD by doing "configfile (hdx,y)".

If you are not sure what x and y should be, you can start typing it - "root (hd" then press tab, and GRUB should give you a list of possible options - same with the partition number. You may have a seperate /boot partition, or it may be kept on the same filesystem as your root filesystem.
 
Back
Top Bottom