1

Possible Duplicate:
How can I repair grub? (How to get Ubuntu back after installing Windows?)

I installed Ubuntu 12.04 alongside Windows 7. I then fiddled around with EasyBCD and managed to stuff up the boot info and Windows wouldn't boot, etc.

I then repaired Windows via an install CD but now I don't have an option to boot into Ubuntu, it boots straight into Windows.

How do I boot into Ubuntu now?

0

8 Answers 8

6

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". :)

5

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

Picture: Boot Repair

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

0

Maybe you should read this:

http://neosmart.net/wiki/display/EBCD/Ubuntu and start from the "Adding Ubuntu to the Windows Bootloader" part.

This worked for me.

0

Ubuntu's installation replaces the win7 bootloader in the boot sector. It prompts you to choose which system you want to start each time. I recommend Debian if you want to run two or more operating systems on one machine. You should try to make the system swap area about 2 GB as well, because that could lead to system freezing in the boot section, I think.

0

The same thing happened to me and I just reinstalled ubuntu after fixing windows. I don't know if I had to do that there might be an easier solution but it worked for me.

0

Maybe u should read this one ..

http://www.operationgeorge.com/tutorials/reinstalling-grub-and-getting-back-your-operating-systems-in-ubuntu

1
  • Welcome to Ask Ubuntu! Whilst this may theoretically answer the question, it would be preferable to include the essential parts of the answer here, and provide the link for reference.
    – fossfreedom
    May 10, 2012 at 12:35
0

If you are having a Ubuntu Live Cd then you could possibly try this, to recover your Ubuntu Grub which would allow you to get it back to normal.

0

https://help.ubuntu.com/community/Boot-Repair This really helped me, and is probably a better alternative if you're not used to using the terminal.

paste these into the terminal and hit automatically repair.

sudo add-apt-repository ppa:yannubuntu/boot-repair && sudo apt-get update
sudo apt-get install -y boot-repair && boot-repair

Not the answer you're looking for? Browse other questions tagged .