Bug#810932: EFI boot entry non-functional on NVMe system
Josh Triplett
josh at joshtriplett.org
Wed Jan 13 21:48:17 UTC 2016
Package: grub-efi-amd64
Version: 2.02~beta2-33
Severity: important
[Reporting as "important" because it breaks booting on this system
without manual configuration, but not RC because it may not apply to all
EFI systems, or even all EFI systems with NVMe.]
On a laptop with an NVMe disk (accessible as /dev/nvme0n1), GRUB
installs a non-functional boot entry into the EFI firmware. GRUB
installs the following entry (read via "efibootmgr -v"):
Boot0001* debian HD(1,0,00000000000000000000000000000000,0x0,0x0)/File(\EFI\debian\grubx64.efi)
By contrast, if I use the firmware's option to browse for an EFI binary
to boot, and select \EFI\debian\grubx64.efi, that successfully boots;
after booting, the boot entries contain the following:
Boot0005* \EFI\debian\grubx64.efi PciRoot(0x0)/Pci(0x1c,0x4)/Pci(0x0,0x0)/NVMe(0x1,00-00-00-00-00-00-00-00)/HD(1,GPT,37ea4958-49da-48da-bc44-39d3f5ea6b7d,0x800,0x100000)/File(\EFI\debian\grubx64.efi)
This differs both in providing a specific NVMe device, and in using
"GPT" and a UUID for the HD rather than all zeroes.
Also, any subsequent run of "update-grub" will *remove* that entry,
making the system unbootable without again manually selecting the
bootloader by path.
- Josh Triplett
-- Package-specific info:
*********************** BEGIN /proc/mounts
/dev/nvme0n1p2 / ext4 rw,noatime,errors=remount-ro,data=ordered 0 0
/dev/nvme0n1p1 /boot/efi vfat rw,relatime,fmask=0077,dmask=0077,codepage=437,iocharset=utf8,shortname=mixed,errors=remount-ro 0 0
*********************** END /proc/mounts
*********************** BEGIN /boot/grub/grub.cfg
#
# DO NOT EDIT THIS FILE
#
# It is automatically generated by grub-mkconfig using templates
# from /etc/grub.d and settings from /etc/default/grub
#
### BEGIN /etc/grub.d/00_header ###
if [ -s $prefix/grubenv ]; then
set have_grubenv=true
load_env
fi
if [ "${next_entry}" ] ; then
set default="${next_entry}"
set next_entry=
save_env next_entry
set boot_once=true
else
set default="0"
fi
if [ x"${feature_menuentry_id}" = xy ]; then
menuentry_id_option="--id"
else
menuentry_id_option=""
fi
export menuentry_id_option
if [ "${prev_saved_entry}" ]; then
set saved_entry="${prev_saved_entry}"
save_env saved_entry
set prev_saved_entry=
save_env prev_saved_entry
set boot_once=true
fi
function savedefault {
if [ -z "${boot_once}" ]; then
saved_entry="${chosen}"
save_env saved_entry
fi
}
function load_video {
if [ x$feature_all_video_module = xy ]; then
insmod all_video
else
insmod efi_gop
insmod efi_uga
insmod ieee1275_fb
insmod vbe
insmod vga
insmod video_bochs
insmod video_cirrus
fi
}
terminal_input console
terminal_output console
if [ "${recordfail}" = 1 ] ; then
set timeout=30
else
if [ x$feature_timeout_style = xy ] ; then
set timeout_style=menu
set timeout=5
# Fallback normal timeout code in case the timeout_style feature is
# unavailable.
else
set timeout=5
fi
fi
### END /etc/grub.d/00_header ###
### BEGIN /etc/grub.d/05_debian_theme ###
set menu_color_normal=cyan/blue
set menu_color_highlight=white/blue
### END /etc/grub.d/05_debian_theme ###
### BEGIN /etc/grub.d/10_linux ###
function gfxmode {
set gfxpayload="${1}"
}
set linux_gfx_mode=
export linux_gfx_mode
menuentry 'Debian GNU/Linux' --class debian --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-simple-d3294916-5507-427d-bdcc-38f7f0cf8794' {
load_video
insmod gzio
if [ x$grub_platform = xxen ]; then insmod xzio; insmod lzopio; fi
insmod part_gpt
insmod ext2
if [ x$feature_platform_search_hint = xy ]; then
search --no-floppy --fs-uuid --set=root d3294916-5507-427d-bdcc-38f7f0cf8794
else
search --no-floppy --fs-uuid --set=root d3294916-5507-427d-bdcc-38f7f0cf8794
fi
echo 'Loading Linux 4.4.0-rc8+ ...'
linux /boot/vmlinuz-4.4.0-rc8+ root=UUID=d3294916-5507-427d-bdcc-38f7f0cf8794 ro quiet
echo 'Loading initial ramdisk ...'
initrd /boot/initrd.img-4.4.0-rc8+
}
submenu 'Advanced options for Debian GNU/Linux' $menuentry_id_option 'gnulinux-advanced-d3294916-5507-427d-bdcc-38f7f0cf8794' {
menuentry 'Debian GNU/Linux, with Linux 4.4.0-rc8+' --class debian --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-4.4.0-rc8+-advanced-d3294916-5507-427d-bdcc-38f7f0cf8794' {
load_video
insmod gzio
if [ x$grub_platform = xxen ]; then insmod xzio; insmod lzopio; fi
insmod part_gpt
insmod ext2
if [ x$feature_platform_search_hint = xy ]; then
search --no-floppy --fs-uuid --set=root d3294916-5507-427d-bdcc-38f7f0cf8794
else
search --no-floppy --fs-uuid --set=root d3294916-5507-427d-bdcc-38f7f0cf8794
fi
echo 'Loading Linux 4.4.0-rc8+ ...'
linux /boot/vmlinuz-4.4.0-rc8+ root=UUID=d3294916-5507-427d-bdcc-38f7f0cf8794 ro quiet
echo 'Loading initial ramdisk ...'
initrd /boot/initrd.img-4.4.0-rc8+
}
menuentry 'Debian GNU/Linux, with Linux 4.4.0-rc8+ (recovery mode)' --class debian --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-4.4.0-rc8+-recovery-d3294916-5507-427d-bdcc-38f7f0cf8794' {
load_video
insmod gzio
if [ x$grub_platform = xxen ]; then insmod xzio; insmod lzopio; fi
insmod part_gpt
insmod ext2
if [ x$feature_platform_search_hint = xy ]; then
search --no-floppy --fs-uuid --set=root d3294916-5507-427d-bdcc-38f7f0cf8794
else
search --no-floppy --fs-uuid --set=root d3294916-5507-427d-bdcc-38f7f0cf8794
fi
echo 'Loading Linux 4.4.0-rc8+ ...'
linux /boot/vmlinuz-4.4.0-rc8+ root=UUID=d3294916-5507-427d-bdcc-38f7f0cf8794 ro single
echo 'Loading initial ramdisk ...'
initrd /boot/initrd.img-4.4.0-rc8+
}
menuentry 'Debian GNU/Linux, with Linux 4.3.0-1-amd64' --class debian --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-4.3.0-1-amd64-advanced-d3294916-5507-427d-bdcc-38f7f0cf8794' {
load_video
insmod gzio
if [ x$grub_platform = xxen ]; then insmod xzio; insmod lzopio; fi
insmod part_gpt
insmod ext2
if [ x$feature_platform_search_hint = xy ]; then
search --no-floppy --fs-uuid --set=root d3294916-5507-427d-bdcc-38f7f0cf8794
else
search --no-floppy --fs-uuid --set=root d3294916-5507-427d-bdcc-38f7f0cf8794
fi
echo 'Loading Linux 4.3.0-1-amd64 ...'
linux /boot/vmlinuz-4.3.0-1-amd64 root=UUID=d3294916-5507-427d-bdcc-38f7f0cf8794 ro quiet
echo 'Loading initial ramdisk ...'
initrd /boot/initrd.img-4.3.0-1-amd64
}
menuentry 'Debian GNU/Linux, with Linux 4.3.0-1-amd64 (recovery mode)' --class debian --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-4.3.0-1-amd64-recovery-d3294916-5507-427d-bdcc-38f7f0cf8794' {
load_video
insmod gzio
if [ x$grub_platform = xxen ]; then insmod xzio; insmod lzopio; fi
insmod part_gpt
insmod ext2
if [ x$feature_platform_search_hint = xy ]; then
search --no-floppy --fs-uuid --set=root d3294916-5507-427d-bdcc-38f7f0cf8794
else
search --no-floppy --fs-uuid --set=root d3294916-5507-427d-bdcc-38f7f0cf8794
fi
echo 'Loading Linux 4.3.0-1-amd64 ...'
linux /boot/vmlinuz-4.3.0-1-amd64 root=UUID=d3294916-5507-427d-bdcc-38f7f0cf8794 ro single
echo 'Loading initial ramdisk ...'
initrd /boot/initrd.img-4.3.0-1-amd64
}
}
### END /etc/grub.d/10_linux ###
### BEGIN /etc/grub.d/20_linux_xen ###
### END /etc/grub.d/20_linux_xen ###
### BEGIN /etc/grub.d/30_os-prober ###
### END /etc/grub.d/30_os-prober ###
### BEGIN /etc/grub.d/30_uefi-firmware ###
menuentry 'System setup' $menuentry_id_option 'uefi-firmware' {
fwsetup
}
### END /etc/grub.d/30_uefi-firmware ###
### 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.
### END /etc/grub.d/40_custom ###
### BEGIN /etc/grub.d/41_custom ###
if [ -f ${config_directory}/custom.cfg ]; then
source ${config_directory}/custom.cfg
elif [ -z "${config_directory}" -a -f $prefix/custom.cfg ]; then
source $prefix/custom.cfg;
fi
### END /etc/grub.d/41_custom ###
*********************** END /boot/grub/grub.cfg
*********************** BEGIN /proc/mdstat
cat: /proc/mdstat: No such file or directory
*********************** END /proc/mdstat
*********************** BEGIN /dev/disk/by-id
total 0
lrwxrwxrwx 1 root root 13 Jan 13 13:31 mmc-CGND3R_0x578d4443 -> ../../mmcblk0
*********************** END /dev/disk/by-id
*********************** BEGIN /dev/disk/by-uuid
total 0
lrwxrwxrwx 1 root root 15 Jan 13 13:31 CBD5-7DAB -> ../../nvme0n1p1
lrwxrwxrwx 1 root root 15 Jan 13 13:31 d3294916-5507-427d-bdcc-38f7f0cf8794 -> ../../nvme0n1p2
*********************** END /dev/disk/by-uuid
-- System Information:
Debian Release: stretch/sid
APT prefers unstable
APT policy: (500, 'unstable'), (1, 'experimental')
Architecture: amd64 (x86_64)
Kernel: Linux 4.4.0-rc8+ (SMP w/4 CPU cores)
Locale: LANG=C.UTF-8, LC_CTYPE=C.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)
Versions of packages grub-efi-amd64 depends on:
ii debconf [debconf-2.0] 1.5.58
ii grub-common 2.02~beta2-33
ii grub-efi-amd64-bin 2.02~beta2-33
ii grub2-common 2.02~beta2-33
ii ucf 3.0031
grub-efi-amd64 recommends no packages.
grub-efi-amd64 suggests no packages.
-- debconf information:
* grub2/linux_cmdline:
grub2/force_efi_extra_removable: false
grub2/device_map_regenerated:
grub2/kfreebsd_cmdline_default: quiet
grub2/kfreebsd_cmdline:
* grub2/linux_cmdline_default: quiet
More information about the Pkg-grub-devel
mailing list