Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

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: http://paste.ubuntu.com/5689718/

Hope you can help me.

share|improve this question

1 Answer 1

up vote 3 down vote accepted

Your Boot Repair output shows a GRUB configuration for Windows as on a BIOS-based computer, but you seem to be running in EFI mode. That's the root source of your problem. One solution is to create a manual GRUB stanza, like this:

menuentry "Windows 8" {
    insmod part_gpt
    insmod chain
    set root='(hd0,gpt2)'
    chainloader /EFI/Microsoft/Boot/bootmgfw.efi
}

You can place this directly in your /boot/grub/grub.cfg file, but it will be temporary. A better long-term solution is to put that in /etc/grub.d/40_custom and then run update-grub. This will create a new entry that will (perhaps) work.

One complication is that you seem to be using Secure Boot. I'm not sure about the version of GRUB that ships with Ubuntu 12.04 (presumably 12.04.2, actually), but some versions of GRUB have problems launching Windows in EFI mode with Secure Boot active. Thus, the preceding solution might not work unless you disable Secure Boot. You'll need to rummage about in your firmware settings to find how to disable Secure Boot; the details vary greatly from one computer to another. Even then, launching Windows from GRUB seems to be hit-or-miss; what works on one computer fails on another.

An entirely different option is to install rEFInd, which supplements or replaces GRUB. This also might require you to disable Secure Boot; and if you don't, you'll need to enroll rEFInd's key the first time you reboot; see rEFInd's Secure Boot documentation for details. (I'm assuming that Ubuntu 12.04.2 has an updated version of shim that supports MOKs. If it doesn't, Secure Boot becomes even trickier, since you'll need to install a new version of shim.) Ideally, though, simply installing the rEFInd Debian package should get things working correctly, especially if you first disable Secure Boot.

share|improve this answer
    
Hi Rod, updating the 40_custom file as you said an running update-grub did the trick. Thanks a lot. –  lonelypitcher Apr 9 '13 at 19:01
    
I already disabled the secure boot some days ago. –  lonelypitcher Apr 9 '13 at 19:04

Your Answer

 
discard

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.