Ubuntu – Configure Dual Boot, Windows 7 and Ubuntu 12.04 with or without EFI

bootdual-bootgrub2uefiwindows 7

I have just installed Ubuntu 12.04 on a laptop with Windows 7 but I don't get to boot from Ubuntu.

First, during the installation I made these partitions (may be too many):

/dev/sda1 FAT32 SYSTEM 200Mb boot (EFI boot, i guess)
/dev/sda2 unknown file system 128 Mb msftres (Windows Boot Manager)
/dev/sda3 NTFS OS 100 Gb (Windows 7)
/dev/sda4 NTFS DATOS 315 Gb (Data partition)
/dev/sda5 ext4 28 Gb (/home)
/dev/sda8 unknown file system 1 Gb biog_grub (i'm not very sure why i made this one)
/dev/sda6 ext4 17 Gb (/ Ubuntu 12.03 installed withou errors aparently)
/dev/sda7 linex-swap 2 GB (swap)

I can boot from Windows perfectly. Actually I tried to configure Windows Boot Manager with EasyBCD but it doesn't recognize any boot entry. Anyway, I added an Ubuntu Entry and it configured it automatically.

Now I have boot entries the Windows 7 one that appear to work and the Ubuntu 12.04 that it prompt a "No application found" message.

I re-started from a USB with Ubuntu and tried to fix GRUB from the command-line and with boot-repair. No results.

As far as I understand I have to tell the Windows Boot Manager where my Ubuntu boot loader is.

So I have two problems:

  1. Actually, I don't know where my Ubuntu boot loader, GRUB or GRUB2 or whatever, is.
  2. I don't know how to set my Ubuntu entry in Windows Boot Manager. I guess using BCDedit.exe as EasyBCD didn't show me the entries. Anyway, I don't know what parameters to use.

I read several articles about it but i didn't find out anything useful.

Best Answer

Your partition layout looks odd, but then again this is how manufacturers do their OEM installations.

If this is a UEFI system, then reinstalling would be the quickest and straight forward way for getting a working installation. I recommend removing partitions sda5 through sda7, as they seem to be created by you. Then install Ubuntu from ubuntu-12.04-desktop-amd64.iso in UEFI mode (when selecting to boot from CD at boot time there should be two options for booting from CD one with UEFI and one without) to ensure that you're installing with UEFI support enabled. A partition layout with a Ubuntu partition and a separate home partition is a good choice. For using suspend to HDD (hibernate) you should choose at least the size of your RAM as the size of the swap partition. There is one additional step to be performed to re-enable hibernate in 12.04. After installation has finished you should have a Ubuntu with the grub-efi-amd64 package installed on your hard drive. The installer should have recognized the correct UEFI system partition (there is a specific GPT partition code for the UEFI system partition), put a grub-efi-stub in there and register it in the UEFI boot variables.

In the end you should have at least an entry each for Windows and Ubuntu in your UEFI boot up selection available. If you don't have a Windows related entry there, then this is probably not a UEFI system and you shouldn't attempt to try my suggested solution (you wouldn't be able to boot the CD in UEFI mode). Dual booting should be working via GRUBs chainloading mechanism, so setting Ubuntu via UEFI as the default boot option should work like dual booting worked in the past with GRUB.

Related Question