Mar 18, 2008

Reinstall Ubuntu Grub Bootloader After Windows Wipes it Out

Here's the quick and easy way to re-enable Grub.

1) Boot off the LiveCD

2) Open a Terminal and type in the following commands, noting that the first command will put you into the grub "prompt", and the next 3 commands will be executed there. Also note that hd0,0 implies the first hard drive and the first partition on that drive, which is where you probably installed grub to during installation. If not, then adjust accordingly.

$ sudo grub
> find /boot/grub/stage1
> root <the output of above command>
> setup (hd0)
> quit


Reboot (removing the livecd), and your boot menu should be back.

3 comments:

prabinraz said...

third command donot run in grub. so instead we have to use
>quit

Anonymous said...

thnxs...for uploading this it helped me a lot......

Unknown said...

I dont have the stage1 file O.O