Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

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.

share|improve this question

3 Answers 3

up vote 3 down vote accepted

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

share|improve this answer
    
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.

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.

share|improve this answer

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

Try restoring it...

You may use boot-repair.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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