Friday, January 13, 2012

Reinstalling Grub2 in ubuntu

This is a guide to reinstall the grub 2 boot loader in Ubuntu. This guide will be useful for those who had the grub-xputs not found error and those who installed a windows in a system which already has a Ubuntu.

If you have installed Widows after a ubuntu installtion, windows bootloader will wipe the linux’s grub bootloader before it scrubs into MBR. You need to reinstall grub if you want a dual boot system.

There are several methods for correcting the broken Grub 2. Following are the easiest

Solution 1

Open terminal and type ( in a dual boot scenario, you need to use a live CD).

sudo grub-install /dev/sda
 
This installs grub 2 to the first hard disk

sudo update-grub
 
This updates the grub and now you can boot directly to your repaired grub 2.
optionally  you can run

sudo grub-probe -t device /boot/grub
 
to find current location of grub but this doesn’t actually change the procedure.

Solution 2

Ubuntu provides a graphical tool for recovering the broken grub 2 boot loader. It still 352MB in size but provide an easy solution than many others.
Download Ubuntu Boot-Repair.

Solution 3

Use RESCATUX from Super Grub Disk website. Its 334 MB but does the job very well.

No comments:

Post a Comment

Please leave your comments here