Friday, July 6, 2012


Reinstall grub2 after installing windows 7 (XP/Vista)

1. boot the ubuntu LiveCD

2. Open a terminal and type

sudo fdisk -1

This list the partition tables, and in my case root (/) partition is on /dev/sda9.

3. Mount that partition using following command.

sudo mount /dev/sda9 /mnt

4. Run the grub-install command as below. This will reinstall the grub 2

sudo grub-install --root-directory=/mnt /dev/sda

Here "sda" is the hard disk on which your Linux distribution is installed!

5. Reboot

6. Finally Refresh the grub 2 menu using following command

sudo update-grub

Now everything should be fine :)

No comments:

Post a Comment