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.

I wanted to install Ubuntu on my computer as second OS. I shrank the Windows partition and gave Ubuntu about 40Gb of space. After this I created a live USB having Ubuntu 12.04.1, and booted using the USB stick, everything went like it should.

Having booted to the live Ubuntu I started the installation of Ubuntu. I allowed the installer to do its magic and install Ubuntu side by side with Windows 7. The installation finished without issues, cool.

However, when I restarted my computer, Windows 7 started loading immediately. This suggests that installation of Grub either failed, or it ended up in the wrong place.

Edit: Here is the list of partitions on my hard drive

Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *        2048      206847      102400    7  HPFS/NTFS/exFAT
/dev/sda2          206848  1827614719   913703936    7  HPFS/NTFS/exFAT
/dev/sda3      1827616766  1909534719    40958977    5  Extended
Partition 3 does not start on physical sector boundary.
/dev/sda4      1909534720  1953521663    21993472    7  HPFS/NTFS/exFAT
/dev/sda5      1827616768  1892798463    32590848   83  Linux
/dev/sda6      1892800512  1909534719     8367104   82  Linux swap / Solaris

How could I get the boot loader sorted out properly? I assume using the live USB and terminal, but what should I do with it?

Thanks

share|improve this question
add comment

1 Answer 1

I found the answer from Ubuntu forums.

Boot to live Ubuntu

sudo mount /dev/sda5 /mnt
sudo grub-install --root-directory=/mnt /dev/sda
sudo umount /mnt

Reboot

Original thread: http://ubuntuforums.org/showthread.php?t=1499828&page=2

share|improve this answer
add comment

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.