Restore GRUB after installing Windows

By | November 7, 2008

Whenever you reinstall Windows with an existing Linux installation already present on the hard drive, the MBR gets an overwrite. You can restore GRUB to the previous settings by booting a Linux Live CD and following the steps below:

1. Insert the Live CD and reboot your computer;

2. After reaching the desktop, open up a Terminal and do a su – to access the root account. In Ubuntu you’ll have to previously give a password to the root account with sudo passwd root;

3. Type grub in the root prompt;

4. The Grub prompt has appeared and you should type find /boot/grub/stage1 in it then hit Enter. You’ll get an output similar to (hd0) or (hd0,2);

5. Type root(hd0,x) if this is the output you got earlier then hit Enter;

6. Type setup and hit Enter;

7. Type quit and hit Enter;

8. Reboot the system and remove the Live CD from the tray.

Leave a Reply

Your email address will not be published. Required fields are marked *