Reinstalling GRUB2 on Ubuntu 12.04 | Windows 7 dual boot after Windows reinstallation

Posted by Shasteriskt on Ask Ubuntu See other posts from Ask Ubuntu or by Shasteriskt
Published on 2012-10-17T14:34:06Z Indexed on 2012/10/17 17:20 UTC
Read the original article Hit count: 297

Filed under:
|
|

So I had the perfect Ubuntu 12 / Windows 7 dual boot set-up -- until I had to re-install Windows 7.

After the deed, GRUB2 was of course wiped out, thus my Ubuntu installation is rendered inaccessible.

I have tried these steps:

mount /dev/sda5 /mnt   #This is where my Ubuntu installation resides.
mount /dev/sda1 /mnt/boot #Indicated by the `*` under `Boot` when doing `fdisk -l`
mount --bind /mnt/proc /proc
mount --bind /mnt/sys  /sys
mount --bind /mnt/dev  /dev
sudo chroot mnt
sudo grub-install /dev/sda
sudo update-grub
#Then unmounted everything...

Unfortunately, only my Windows 7 has been detected and the Ubuntu entries never appeared in the prompt. Only my Windows 7 installation (/dev/sda1) is available in the GRUB2 menu.

How can I rectify this?

© Ask Ubuntu or respective owner

Related posts about grub2

Related posts about dual-boot