linux poison RSS
linux poison Email

How to restore Grub 2 after reinstalling Windows

GRUB 2 introduces many new changes. GRUB 2 has better portability and modularity, supports non-ASCII characters, dynamic loading of modules, real memory management, and more and is totally different from its predecessor, menu.lst doesnt even exist it is replaced by grub.cfg which have little resemblance with menu.lst

There are times when you inadvertently overwrite your Master Boot Record. The end result being that you are unable to boot into Linux. This is especially true when you are dual booting between windows and Linux OSes or installing/upgrading your windows OS

This is what you do to restore the GRUB2 boot loader when faced with the above problem. First you need a Linux distribution CD, Ubuntu Jaunty, Karmic Live CD.



Insert Ubuntu 9.10 karmic live cd or higher and select "Try ubuntu without any change to current system" option, Open Accessories > terminal and type following command to restore your GRUB2 boot loader

Firstly, you need to find out on which partition your Linux system is installed:
sudo fdisk -l
the above command will list all the partition on your disk, from this list figure out your ubuntu root partition.

Now, we must mount this partition:
sudo mount /dev/sda1 /mnt
Where "sda1" is the partition where I have installed Ubuntu. It could be "sda5", "sda6", etc. for you.

Install grub to the partition you've mounted:
sudo grub-install --root-directory=/mnt/ /dev/sda
Restart your computer. As previous Grub2 entries are removed, run the following command to restore them back:
sudo update-grub


1 comments:

bishop__ said...

I have also re-installed my Vista in my laptop and recovered my linux using another method. If only I have found this site, I could have tried your steps also.

Post a Comment

Related Posts with Thumbnails