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 am trying to install Ubuntu as a Dual Boot with my preloaded Windows 7. I have a 1 TB hard disk. Primary Partition for windows is limited at 80gb and the rest of the space was unallocated and i booted from the Ubuntu CD.

According to one of the Tutorial i created a 2GB swap space and allocated 50GB as Primary ext4 partition and installed Ubuntu.

Now when i boot the PC and try to load into Windows i get the following error

enter image description here

I googled and found that its the boot loader error on the grub2. But i am not sure how i can fix the error after trying out a few ways as described in these forums hence am posting a question here.

Update 1

I booted into a Windows 7 Live CD and went to the Command Prompt and ran the following two commands

bootrec.exe /fixboot

bootrec.exe /fixmbr

Now the PC boots directly into Windows and doesnt allow me to Boot into Ubuntu :P Any idea now how to recover my Linux Installation ?

Update 2

I booted into Ubuntu Live and installed boot-repair and tried to run it.

But even after 1 hour it keeps saying Scanning and doesnt go forward as suggested by many forums.

share|improve this question
    
Please indicate your Boot-Info URL ( help.ubuntu.com/community/Boot-Info ) –  LovinBuntu Apr 21 '13 at 11:10
    
@LovinBuntu it never gets to that screen :( –  Harsha M V Apr 21 '13 at 15:14
    
That's not normal. Please could you boot an Ubuntu disc, choose Try Ubuntu, then indicate the output of the following commands: sudo parted -l , sudo fdisk -l , sudo os-prober , df -h –  LovinBuntu Apr 21 '13 at 21:16
    
@LovinBuntu will get to office try and let you know :D –  Harsha M V Apr 22 '13 at 3:43
add comment

2 Answers

You need to provide more details, like when you installed Ubuntu how did you install it and which partition you selected as boot partition. However I think the following link shall help you already-answered-here. Good luck

share|improve this answer
    
i choose an unallocated space and created 50gb from it and choose ext4 and installed it on that. –  Harsha M V Apr 20 '13 at 7:22
    
i am trying to run boot-repair from last 30min its saying scanning systems from the live CD :P –  Harsha M V Apr 20 '13 at 7:24
    
Scanning the partitions takes long, but by no means 30 mins. I would at max 5 mins. Why dont you restart it. –  Vivek Sharma Apr 20 '13 at 8:44
    
i tried to do that still it takes the same time weird :( –  Harsha M V Apr 20 '13 at 12:40
add comment

This answer comes from Getting started Ubuntu 12.04. Use the Ubuntu live cd or live usb, and do the following things.

$ sudo fdisk -l

Tis output means that your system (Linux, on whi Ubuntu is based) is installed on device /dev/sda, but your computer is booting to /dev/sda (where Windows is located). We need to rectify this by telling the computer to boot to the Linux device instead. To do this, first create a place to manipulate your Ubuntu installation:

$ sudo mkdir /media/root

Next, link your Ubuntu installation and this new folder:

$ sudo mount /dev/sda1 /media/root

If you’ve done this correctly, then you should see the following:

$ ls /media/root
bin dev home lib mnt root srv usr
boot etc initrd lib64 opt sbin sys var
cdrom initrd.img media proc selinux tmp vmlinuz

Now, you can reinstall Grub:

$ sudo grub-install --root-directory=/media/root /dev/sda
Installation finished. No error reported.
This is the contents of the device map /boot/grub/device.map.
Check if this is correct or not. If any of the lines is incorrect,
fix it and re-run the script grub-install.
(hd0) /dev/sda
share|improve this answer
    
i will try it out and let you know. thank you –  Harsha M V Apr 20 '13 at 8:36
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.