0

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.

4
  • Please indicate your Boot-Info URL ( help.ubuntu.com/community/Boot-Info )
    – LovinBuntu
    Apr 21, 2013 at 11:10
  • @LovinBuntu it never gets to that screen :(
    – Harsha M V
    Apr 21, 2013 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, 2013 at 21:16
  • @LovinBuntu will get to office try and let you know :D
    – Harsha M V
    Apr 22, 2013 at 3:43

3 Answers 3

1

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

4
  • i choose an unallocated space and created 50gb from it and choose ext4 and installed it on that.
    – Harsha M V
    Apr 20, 2013 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, 2013 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. Apr 20, 2013 at 8:44
  • i tried to do that still it takes the same time weird :(
    – Harsha M V
    Apr 20, 2013 at 12:40
1

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
0
0

/fixmbr normally rewrites the bootloader, so you should expect non-microsoft operating systems to disappear.

You may have installed Ubuntu in the wrong mode. First make sure if your current Windows 7 installation is installed in UEFI mode or the legacy BIOS mode? Then boot your Ubuntu live media in the correct mode.

Easiest thing would be to reinstall Ubuntu. Or you could reinstall grub, but this require some slapping in the commandline.

// chroot, then grub-install --efi-directory=DIR /dev/sda

This guide should help reinstall your grub bootloader: http://www.reversiblean.com/install-windows-after-linux/

And this will answer some of the most common issues when trying to dual boot Windows and Linux: http://www.reversiblean.com/fix-partition-table-issues-win-linux/

Normally, if Ubuntu-Installer does not throw any warnings you should be fine.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .