Bug#698914: grub-efi booting Windows 8 in UEFI mode
Steve McIntyre
steve at einval.com
Fri Jan 25 08:34:33 UTC 2013
Package: grub-efi
Version: 1.99-26
Severity: important
Hi,
On a new machine that came pre-configured with UEFI and Windows 8
(Lenovo G580), I've installed Debian dual-boot and grub-efi works well
for booting that Debian system. However, the menu entries created for
Windows on this machine (the primary Windows installation and the
recovery partition) both fail to boot with the same message:
error: unknown command `drivemap'.
error: invalid EFI file path.
Press any key to continue...
The grub.cfg entries for these are:
### BEGIN /etc/grub.d/30_os-prober ###
menuentry "Windows Recovery Environment (loader) (on /dev/sda3)" --class windows --class os {
insmod part_gpt
insmod fat
set root='(hd0,gpt3)'
search --no-floppy --fs-uuid --set=root 4411-65A9
drivemap -s (hd0) ${root}
chainloader +1
}
menuentry "Windows 8 (loader) (on /dev/sda5)" --class windows --class os {
insmod part_gpt
insmod ntfs
set root='(hd0,gpt5)'
search --no-floppy --fs-uuid --set=root A48815AD88157ECC
drivemap -s (hd0) ${root}
chainloader +1
}
### END /etc/grub.d/30_os-prober ###
I'm guessing "drivemap" isn't a valid thing in grub-efi and this would
work in BIOS mode?
Based on information found from a web search, I've added by hand an
extra stanza to load the main Windows 8 entry in UEFI mode:
### BEGIN /etc/grub.d/40_custom ###
# This file provides an easy way to add custom menu entries. Simply type the
# menu entries you want to add after this comment. Be careful not to change
# the 'exec tail' line above.
menuentry "Windows (UEFI)" {
search --set=root --file /EFI/Microsoft/Boot/bootmgfw.efi
chainloader /EFI/Microsoft/Boot/bootmgfw.efi
}
### END /etc/grub.d/40_custom ###
and this works flawlessly for me. I don't know how easy this would be
to integrate into os-prober; does that know that it's running on an
EFI system at all?
It would be lovely to get this sorted for Wheezy... :-)
-- System Information:
Debian Release: 7.0
APT prefers testing
APT policy: (500, 'testing')
Architecture: amd64 (x86_64)
Foreign Architectures: i386
Kernel: Linux 3.2.0-4-amd64 (SMP w/4 CPU cores)
Locale: LANG=en_GB.UTF-8, LC_CTYPE=en_GB.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Versions of packages grub-efi depends on:
ii grub-common 1.99-26
ii grub-efi-amd64 1.99-26
grub-efi recommends no packages.
grub-efi suggests no packages.
-- no debconf information
More information about the Pkg-grub-devel
mailing list