How can I boot into Ubuntu after repairing Windows 7? [duplicate]

Solution 1:

The only problem is the MBR section which now has replaced windows. Whenever you repair windows, it repairs MBR and uninstall the GRUB or whatever is written on it. So now your GRUB is not in the MBR and it directly boots you into windows.

To repair GRUB, you can use any live cd to boot into ubuntu and open up terminal and then issue the command sudo grub-install . Well, in many cases, that fails. For that, you have to manually mount the root partition and then re-install the GRUB into it. It follows as:

sudo fdisk -l 
...list of devices and partions
//here find out the root partition (mine is sda3, so i am condireing /dev/sda3 here)

sudo mkdir /mnt/anyname
sudo mount /dev/sda3 /mnt/anyname
cd /mnt/anyname
sudo grub-install --root-directory=/mnt/anyname /dev/sda

This will re-install your GRUB. If you are encountering any problem in installing the GRUB, just go to google, there are millions of guides on "installing the grub in linux". :)

Solution 2:

In addition to @ashutosh answer, you can use a graphical utility called Boot Repair to re-install Ubuntu bootloader:

  • Article in Ubuntu Wiki
  • Article on WebUpd8

Picture: Boot Repair

There's also a detailed article in Ubuntu wiki which lists different ways of recovering the bootloader after installing Windows