Ubuntu – Where to install boot loader on a Zenbook Prime

12.04bootloaderssd

I cannot figure out where to install the boot loader on my Zenbook UX31A Prime. I have installed Ubuntu many times on normal hard drives, but this is the first SSD and I am struggling.

Installed Ubuntu 12.04 64-bit selecting "UEFI: general" boot entry.

  • Installation type: Something Else
  • Created partition /sda5 mount as /, /sda6 mount as /home, /sda7 mount as swap
  • Selected /dev/sda for boot loader installation. Other options are /dev/sda, /dev/sda1/dev/sda3 Windows 7 (loader) …

Grub comes up with 6 entries

  1. Ubuntu – this runs great
  2. Linux 3.2.0-29-generic recovery mode: mode hangs with "fb: conflicting fb hw usae interdrnfb vs EFI VGA – removing generic adapter"
  3. memtest86:erro: unknown command `linux 16'
  4. memtest86 serial: unknown command `linux 16'
  5. Windows 7 (loader) (on /dev/sda3): invalid EFI file path
  6. Windows Recovery Environment (on /dev/sda8): unknown command drivemap, invalid EFI file path.

My workaround for booting Windows 7 is hitting ESC during boot, windows boot manager comes up and
* for booting into Windows 7 I select "WIndows Boot Manager (PO: SanDisk ….".
* for booting into Ubuntu I select ubuntu (P0: SanDisk…)

How can I boot into Windows from Grub?

Best Answer

I struggled with the same problem for quite a while, but found a solution now.

The first thing to know is that the Zenbook Prime uses a UEFI-boot mechanism and not a BIOS-based one. The second thing is that the disk is formatted using a GPT partitioning scheme and not the older MBR (Master Boot Record) based one. This is the reason why there is an EFI System Partition (ESP) on /dev/sda1 on the Zenbook.

The boot-loader should be installed on the EFI partition (/dev/sda1).

Also you need to boot your Ubuntu-disk or USB-stick in UEFI-mode (as you did), since otherwise the installer will apparently be confused and install GRUB to the MBR instead of the EFI partition (it seems to me that the installer should be smarter and detect what kind of disk we have, regardless of how the installation medium was booted, but maybe there's a technical limitation somewhere?).

Finally as a workaround it is also possible to add a custom entry to GRUB which points to the right EFI file.

  1. First do sudo blkid and look up the UUID of the EFI partition (/dev/sda1)
  2. Do sudo gedit /etc/grub.d/40_custom
  3. Add the following entry to the file:

menuentry "Windows 7" {
insmod part_gpt
insmod ntfs
insmod search_fs_uuid
insmod chain
search --fs-uuid --no-floppy --set=root 20B1-C9F3
chainloader (${root})/EFI/Microsoft/Boot/bootmgfw.efi
}

Where you replace "20B1-C9F3" with the UUID you looked up in step 1.

Save the file and then run sudo update-grub2.

After rebooting you will see your new entry which should work now.

If you want to remove the other broken GRUB entries from the menu you can easily do it using the grub-customizer program from the repos.

Related Question