Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have installed Ubuntu 12.04 on my laptop with Windows 8 pre-installed. But when selecting Windows 8 to boot I get following error:

error: unknown command 'drivemap' 
error: invalid EFI filepath

I ran boot-repair more than once. The output can be found here: Hope you can help me.

share|improve this question
Have you tried the boot-repair utility? – John Dec 18 '13 at 18:06
yes...I've pasted the url as well which is generated after running the boot repair utility. It's been 3 days now and I am not able to run the dual ubuntu and windows ... please help me out :( – pArAs Dec 18 '13 at 18:07

Boot-Repair ran the fix for "buggy" UEFI which may not be required. But with the fix the only boot entry that will correctly boot Windows is the Boot-Repair one that also seems to be misnamed.

menuentry "Windows UEFI recovery bkpbootmgfw.efi" {

With the rename it lets the UEFI boot the Windows efi file, but it really is grub2's shim. Some UEFI only boot Windows. If you can boot the ubuntu entry from your UEFI menu you should undo the rename.

To undo & to rename files to their original names, you just need to tick the "Restore EFI backups" option of Boot-Repair.

Also you cannot use the grub update or the boot stanza by os-prober as your version still has the bug. This is a BIOS boot entry that will not work with UEFI. Fix in 13.10's version of grub.

menuentry "Windows Recovery Environment (loader) (on /dev/sda3)"

It looks like you originally installed Ubuntu in BIOS boot mode and from that you would not be able to boot Windows. Boot-Repair converted install to UEFI by uninstalling grub-pc and installing grub-efi. Both systems must be in UEFI mode to dual boot from grub menu. You may have been able to boot from UEFI menu in Legacy/CSM/BIOS mode for Ubuntu and UEFI mode for Windows. But now both are UEFI which is preferred.

If you left Windows hibernated you will still have issues.

share|improve this answer

Here is a website that explains the process a lot better than I can but I will give you the sparknotes:

(Optional) 1) boot up Ubuntu 12.04 live CD

You can run this on your Ubuntu 12.04 running on your hard disk but I wouldn't just because when you're done you will have a lot of clutter files.

Step 2) Run the following commands:

sudo add-apt-repository ppa:yannubuntu/boot-repair
sudo apt-get update
sudo apt-get install -y boot-repair
boot-repair &

This will start the boot-repair utility. Just start off by clicking Recommended Repair because that fixes most common problems.

share|improve this answer
I already ran boot-repair but it didn't work.... do you want me to run it again? – pArAs Dec 18 '13 at 18:14
Yeah, try running it on the live CD. – John Dec 18 '13 at 18:16
I've tried but its not working! – pArAs Dec 18 '13 at 18:22
Then try booting Windows from your BIOS, if you can't find Windows in your BIOS then your MBR got screwed up and you will need to use a windows repair disk to fix the damage. – John Dec 18 '13 at 18:24

First of all, enter BIOS settings and disable Secure Boot. That alone may do the trick.

If it doesn't, the problem can be worked around creating a custom GRUB config in order to manually point GRUB to Win8. With GRUB2, it is done by editing /etc/grub.d/40_custom and then updating GRUB (update-grub).

More details are here:

Dual-boot Ubuntu 12.10 on UEFI along Windows 8

Dual boot problem Windows 8 & Ubuntu 12.04

P.S. The bug may have nothing to do with GRUB2, but rather your laptop vendor's failure to adhere to the EFI standard. Or so I heard.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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