Dual boot menu not showing after installation of Ubuntu 12.04

Before installing Ubuntu 12.04, Windows XP with three drives were there. I've installed Ubuntu 12.04 64 bit in of the three drives which I've mentioned above, installation went fine but after installation Dual boot screen is not showing, windows is automatically loading.

I've tried answers which are found here and other Ubuntu forums but non of them is worked for me. From forums what I came to know is,Grub missing. To install or to repair it, I'm unable to login to Ubuntu, then how can upgrade grub in ubuntu.


You can repair Grub by booting an Ubuntu Live-CD and using the program "Boot-Repair".

If you have an Internet connection you can just insert your Ubuntu CD (the one you used for installing ubuntu 12.04) and select "Try Ubuntu". It will then boot a live environment of Ubuntu from the CD. Here you can install Boot-Repair via the Terminal. Type:

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

sudo apt-get install -y boot-repair && boot-repair

After that launch Boot-Repair and select "Recommended Repair". That should do the trick and reconfigure/-install Grub.

Better and more detailed instructions can be found here: https://help.ubuntu.com/community/Boot-Repair

Good luck! :)


If you did not install inside windows xp, now boot to your Ubuntu Live CD or your bootable USB Stick with Ubuntu inside. Open Terminal.

Enter:

sudo blkid

and press enter.

Then you will see a detail list of all your drives and devices. Your first drive looks like this:

...
/dev/sda1: UUID="xxxxxxx..." TYPE="ext4"
...

Enter:

sudo mount -t ext4 /dev/sda1 /mnt

to mount your first drive.

Finally:

sudo grub-install --boot-directory=/mnt/boot /dev/sda
Note that your final command here does not end with /dev/sda1, it ends with /dev/sda, because grub-install must install grub on MBR (the Boot Record of whole your harddisk), not Boot Record of any drive (likes C:, D:, E: on windows).

Now exit terminal and reboot your computer.