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.

3 Answers3

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

Vivek Sharma
  • 1,170
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
sugab
  • 4,367
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.

Gayan Weerakutti
  • 3,770
  • 26
  • 38