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! :)

  • I've already found that link, whenever I give sudo add-apt-repository ppa:yannubuntu/boot-repair && sudo apt-get update, it showing the error as add-apt-repository: command not found – Mahesh.D Feb 17 '13 at 8:59
  • The trouble was with my Firewall, issue is solved now. But if I won't select any operating system for few seconds then Ubuntu is loading automatically, can I increase waiting time to select OS ? – Mahesh.D Feb 17 '13 at 10:38

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.


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"


sudo mount -t ext4 /dev/sda1 /mnt

to mount your first drive.


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.


In Ubuntu run the below command

sudo grub-mkconfig -o /boot/grub/grub.cfg

If your grub is grub2 like in CentOS7 and RHEL 7 then run the below one sudo grub2-mkconfig -o /boot/grub2/grub.cfg.

Here you can find the complete solution http://www.tecgeeks.com/ubuntu/dual-boot-windows-not-showing-after-installing-ubuntu/


I do had the same problem. It was all about loosing your boot up order.

Try restoring it...

You may use boot-repair.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.