I installed Ubuntu 12.04.5 on laptop (lenovo g4070 59417454) with existing Windows 8.1. But when I select Windows 8.1 in grub menu:

error: unknown command 'drivemap'
error: invalid EFI file path.


Boot Mode: UEFI

ubuntu (WDC WD5000LPCX-24C6HTO)
Windows Boot Manager
ubuntu (WDC WD5000LPCX-24C6HTO)

No idea why I got 2 ubuntu options. Maybe after I used Boot Repair.

Using 2nd EFI option (Windows Boot Manager), it will successfully boot to Windows 8.1.

Using 3rd option, it will go to grub prompt.

UEFI Test:

cat /etc/fstab
# /etc/fstab: static file system information.
# Use 'blkid' to print the universally unique identifier for a
# device; this may be used with UUID= as a more robust way to name devices
# that works even if disks are added and removed. See fstab(5).
# <file system> <mount point>   <type>  <options>       <dump>  <pass>
proc            /proc           proc    nodev,noexec,nosuid 0       0
# / was on /dev/sda11 during installation
UUID=a83b92ee-6243-4fd8-9008-17c05ef8715e /               ext4    errors=remount-ro 0       1
# /boot/efi was on /dev/sda2 during installation
#UUID=C0A6-125C  /boot/efi       vfat    defaults        0       1
# /home was on /dev/sda10 during installation
UUID=bb008f49-2160-43d6-9ee2-84023072b571 /home           ext4    defaults        0       2
# swap was on /dev/sda9 during installation
UUID=d7de343e-1cad-446a-b7ba-355414132816 none            swap    sw              0       0
UUID=C0A6-125C  /boot/efi   vfat    defaults    0   1

UEFI Test:

[ -d /sys/firmware/efi ] && echo "EFI boot on HDD" || echo "Legacy boot on HDD" 
EFI boot on HDD


uname -r

Boot Repair Log:

  • Best to see details, post link from summary report from Boot-Repair. Also with UEFI better to use 14.04 or even 15.04 as they have major updates to better support UEFI. What brand/model system? – oldfred Mar 4 '15 at 23:35
  • I added the boot-repair summary. I need to use Ubuntu 12.04 – JR Galia Mar 5 '15 at 0:35
  • Are you using 64 bit Ubuntu? – Organic Marble Mar 5 '15 at 1:04
  • yes, 64-bit Ubuntu 12.0.4 then updated to 12.0.5, also i updated kernel – JR Galia Mar 5 '15 at 3:09
  • It looks like your version still has the old broken os-prober which only created a BIOS boot entry that will never work with UEFI. But Boot-Repair added correct chain to efi file boot stanzas in 25_custom using bootx64.efi. It would be better to have an entry to directly boot bootmgfw.efi directly which I do not see. – oldfred Mar 5 '15 at 5:06

Add this to 40_custom.

gksudo gedit /etc/grub.d/40_custom
sudo update-grub

menuentry "Windows 8 UEFI" {
 insmod part_gpt
 insmod fat
 insmod search_fs_uuid
 insmod chain
 set root='(hd0,gpt2)'
 search --fs-uuid --no-floppy --set=root C0A6-125C 
  chainloader (${root})/efi/Microsoft/Boot/bootmgfw.efi
  • 1
    If others are reviewing this, note that set=root UUID was specific to this user, since he had posted details. Others will have to change to correct UUID for efi partition. Also efi partition is not always hd0,gpt2 sometimes sda1 or other partitions. – oldfred Mar 5 '15 at 14:59
  • This works for me but I got message "error: efidisk read error" before grub menu. I posted the question at askubuntu.com/questions/596346/… – JR Galia Mar 13 '15 at 23:24

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.