Bug#945001: grub-efi-amd64: GRUB-EFI messes up boot variables

Heinrich Schuchardt xypron.glpk at gmx.de
Mon Nov 18 09:16:43 GMT 2019


Package: grub-efi-amd64
Version: 2.04-4
Severity: critical

Dear Maintainer,

I have multiple disk with different operating systems each with its own
bootloader.

Updating GRUB delete all existing UEFI variables BOOTxxxx and put in
some values that do not make any sense for my system. I had a lot of
trouble to get my system running again.

As this "makes unrelated software on the system (or the whole system)
break" I mark this error as critical.

One of the deleted entries was my second instance of Debian Buster
installed on device /dev/sda. GRUB did neither create a BOOTxxxx
variable for it nor did it add an entry to grub.conf.

I do not expect GRUB to ever touch my UEFI variables without my explicit
consent. Please, provide a dialogue.

Bug report 913916 seems to be related but I am not sure if it is
reporting the same issue.

Best regards

Heinrich Schuchardt

-- Package-specific info:

*********************** BEGIN /proc/mounts
/dev/mapper/LVM1-root / ext4 rw,relatime,errors=remount-ro 0 0
/dev/nvme0n1p2 /boot ext2 rw,relatime 0 0
/dev/mapper/LVM1-home /home ext4 rw,relatime 0 0
/dev/nvme0n1p1 /boot/efi vfat
rw,relatime,fmask=0077,dmask=0077,codepage=437,iocharset=ascii,shortname=mixed,utf8,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
}

if [ x$feature_default_font_path = xy ] ; then
   font=unicode
else
insmod lvm
insmod ext2
set
root='lvmid/z7Vz2e-hUSn-2wTk-3QEB-n2Eu-642O-EFG8XU/GuEKrb-SY50-1B2I-zLFX-pZef-iGBh-joFZ5o'
if [ x$feature_platform_search_hint = xy ]; then
  search --no-floppy --fs-uuid --set=root
--hint='lvmid/z7Vz2e-hUSn-2wTk-3QEB-n2Eu-642O-EFG8XU/GuEKrb-SY50-1B2I-zLFX-pZef-iGBh-joFZ5o'
 b7e77dc3-85a0-4768-b18f-2774d561e90b
else
  search --no-floppy --fs-uuid --set=root
b7e77dc3-85a0-4768-b18f-2774d561e90b
fi
    font="/usr/share/grub/unicode.pf2"
fi

if loadfont $font ; then
  set gfxmode=auto
  load_video
  insmod gfxterm
  set locale_dir=$prefix/locale
  set lang=en_US
  insmod gettext
fi
terminal_output gfxterm
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 ###
insmod lvm
insmod ext2
set
root='lvmid/z7Vz2e-hUSn-2wTk-3QEB-n2Eu-642O-EFG8XU/GuEKrb-SY50-1B2I-zLFX-pZef-iGBh-joFZ5o'
if [ x$feature_platform_search_hint = xy ]; then
  search --no-floppy --fs-uuid --set=root
--hint='lvmid/z7Vz2e-hUSn-2wTk-3QEB-n2Eu-642O-EFG8XU/GuEKrb-SY50-1B2I-zLFX-pZef-iGBh-joFZ5o'
 b7e77dc3-85a0-4768-b18f-2774d561e90b
else
  search --no-floppy --fs-uuid --set=root
b7e77dc3-85a0-4768-b18f-2774d561e90b
fi
insmod png
if background_image
/usr/share/desktop-base/futureprototype-theme/grub/grub-4x3.png; then
  set color_normal=white/black
  set color_highlight=black/white
else
  set menu_color_normal=cyan/blue
  set menu_color_highlight=white/blue
fi
### 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-b7e77dc3-85a0-4768-b18f-2774d561e90b' {
	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
1a42361e-b451-4f35-8bcc-4af14900c379
	else
	  search --no-floppy --fs-uuid --set=root
1a42361e-b451-4f35-8bcc-4af14900c379
	fi
	echo	'Loading Linux 5.2.0-3-amd64 ...'
	linux	/vmlinuz-5.2.0-3-amd64 root=/dev/mapper/LVM1-root ro  quiet
acpi_enforce_resources=lax
	echo	'Loading initial ramdisk ...'
	initrd	/initrd.img-5.2.0-3-amd64
}
submenu 'Advanced options for Debian GNU/Linux' $menuentry_id_option
'gnulinux-advanced-b7e77dc3-85a0-4768-b18f-2774d561e90b' {
	menuentry 'Debian GNU/Linux, with Linux 5.2.0-3-amd64' --class debian
--class gnu-linux --class gnu --class os $menuentry_id_option
'gnulinux-5.2.0-3-amd64-advanced-b7e77dc3-85a0-4768-b18f-2774d561e90b' {
		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
1a42361e-b451-4f35-8bcc-4af14900c379
		else
		  search --no-floppy --fs-uuid --set=root
1a42361e-b451-4f35-8bcc-4af14900c379
		fi
		echo	'Loading Linux 5.2.0-3-amd64 ...'
		linux	/vmlinuz-5.2.0-3-amd64 root=/dev/mapper/LVM1-root ro  quiet
acpi_enforce_resources=lax
		echo	'Loading initial ramdisk ...'
		initrd	/initrd.img-5.2.0-3-amd64
	}
	menuentry 'Debian GNU/Linux, with Linux 5.2.0-3-amd64 (recovery mode)'
--class debian --class gnu-linux --class gnu --class os
$menuentry_id_option
'gnulinux-5.2.0-3-amd64-recovery-b7e77dc3-85a0-4768-b18f-2774d561e90b' {
		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
1a42361e-b451-4f35-8bcc-4af14900c379
		else
		  search --no-floppy --fs-uuid --set=root
1a42361e-b451-4f35-8bcc-4af14900c379
		fi
		echo	'Loading Linux 5.2.0-3-amd64 ...'
		linux	/vmlinuz-5.2.0-3-amd64 root=/dev/mapper/LVM1-root ro single
		echo	'Loading initial ramdisk ...'
		initrd	/initrd.img-5.2.0-3-amd64
	}
	menuentry 'Debian GNU/Linux, with Linux 5.2.0-2-amd64' --class debian
--class gnu-linux --class gnu --class os $menuentry_id_option
'gnulinux-5.2.0-2-amd64-advanced-b7e77dc3-85a0-4768-b18f-2774d561e90b' {
		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
1a42361e-b451-4f35-8bcc-4af14900c379
		else
		  search --no-floppy --fs-uuid --set=root
1a42361e-b451-4f35-8bcc-4af14900c379
		fi
		echo	'Loading Linux 5.2.0-2-amd64 ...'
		linux	/vmlinuz-5.2.0-2-amd64 root=/dev/mapper/LVM1-root ro  quiet
acpi_enforce_resources=lax
		echo	'Loading initial ramdisk ...'
		initrd	/initrd.img-5.2.0-2-amd64
	}
	menuentry 'Debian GNU/Linux, with Linux 5.2.0-2-amd64 (recovery mode)'
--class debian --class gnu-linux --class gnu --class os
$menuentry_id_option
'gnulinux-5.2.0-2-amd64-recovery-b7e77dc3-85a0-4768-b18f-2774d561e90b' {
		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
1a42361e-b451-4f35-8bcc-4af14900c379
		else
		  search --no-floppy --fs-uuid --set=root
1a42361e-b451-4f35-8bcc-4af14900c379
		fi
		echo	'Loading Linux 5.2.0-2-amd64 ...'
		linux	/vmlinuz-5.2.0-2-amd64 root=/dev/mapper/LVM1-root ro single
		echo	'Loading initial ramdisk ...'
		initrd	/initrd.img-5.2.0-2-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 ###

### BEGIN /etc/grub.d/42_custom ###
menuentry "Kubuntu" {
	insmod ext2
	set root=(hd0,msdos1)
	chainloader (hd0,msdos1)/efi/debian/grubx64.efi
	boot
}
### END /etc/grub.d/42_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  9 Nov 15 13:14
ata-SAMSUNG_DVDWBD_SH-B083L_R78L6GHZ314644 -> ../../sr0
lrwxrwxrwx 1 root root  9 Nov 15 13:14
ata-Samsung_SSD_840_PRO_Series_S1ATNEAD709406K -> ../../sda
lrwxrwxrwx 1 root root 10 Nov 15 13:14
ata-Samsung_SSD_840_PRO_Series_S1ATNEAD709406K-part1 -> ../../sda1
lrwxrwxrwx 1 root root 10 Nov 15 13:14
ata-Samsung_SSD_840_PRO_Series_S1ATNEAD709406K-part2 -> ../../sda2
lrwxrwxrwx 1 root root 10 Nov 15 13:14
ata-Samsung_SSD_840_PRO_Series_S1ATNEAD709406K-part3 -> ../../sda3
lrwxrwxrwx 1 root root 10 Nov 15 13:14 dm-name-LVM1-home -> ../../dm-3
lrwxrwxrwx 1 root root 10 Nov 15 13:14 dm-name-LVM1-root -> ../../dm-1
lrwxrwxrwx 1 root root 10 Nov 15 13:14 dm-name-LVM1-swap -> ../../dm-2
lrwxrwxrwx 1 root root 10 Nov 15 13:14 dm-name-nvme0n1p3_crypt -> ../../dm-0
lrwxrwxrwx 1 root root 10 Nov 15 13:14
dm-uuid-CRYPT-LUKS2-f68f0f941de747e8b8da73db18f57523-nvme0n1p3_crypt ->
../../dm-0
lrwxrwxrwx 1 root root 10 Nov 15 13:14
dm-uuid-LVM-z7Vz2ehUSn2wTk3QEBn2Eu642OEFG8XUGuEKrbSY501B2IzLFXpZefiGBhjoFZ5o
-> ../../dm-1
lrwxrwxrwx 1 root root 10 Nov 15 13:14
dm-uuid-LVM-z7Vz2ehUSn2wTk3QEBn2Eu642OEFG8XUtcYCospG9ziy6W2Vww0FDn5CRwzeDAcl
-> ../../dm-3
lrwxrwxrwx 1 root root 10 Nov 15 13:14
dm-uuid-LVM-z7Vz2ehUSn2wTk3QEBn2Eu642OEFG8XUxvvDhKab6TMUucYa2Nkf4hjorxnTbysc
-> ../../dm-2
lrwxrwxrwx 1 root root 10 Nov 15 13:14
lvm-pv-uuid-Qb67ql-h0HH-M3hc-38uJ-ZOOK-AWyj-7lSfOC -> ../../dm-0
lrwxrwxrwx 1 root root 13 Nov 15 13:14
nvme-SAMSUNG_MZVLW256HEHP-000L7_S35ENA2K530185 -> ../../nvme1n1
lrwxrwxrwx 1 root root 15 Nov 15 13:14
nvme-SAMSUNG_MZVLW256HEHP-000L7_S35ENA2K530185-part1 -> ../../nvme1n1p1
lrwxrwxrwx 1 root root 15 Nov 15 13:14
nvme-SAMSUNG_MZVLW256HEHP-000L7_S35ENA2K530185-part2 -> ../../nvme1n1p2
lrwxrwxrwx 1 root root 15 Nov 15 13:14
nvme-SAMSUNG_MZVLW256HEHP-000L7_S35ENA2K530185-part3 -> ../../nvme1n1p3
lrwxrwxrwx 1 root root 13 Nov 15 13:14
nvme-Samsung_SSD_970_PRO_1TB_S462NF0M513719F -> ../../nvme0n1
lrwxrwxrwx 1 root root 15 Nov 15 13:14
nvme-Samsung_SSD_970_PRO_1TB_S462NF0M513719F-part1 -> ../../nvme0n1p1
lrwxrwxrwx 1 root root 15 Nov 15 13:14
nvme-Samsung_SSD_970_PRO_1TB_S462NF0M513719F-part2 -> ../../nvme0n1p2
lrwxrwxrwx 1 root root 15 Nov 15 13:14
nvme-Samsung_SSD_970_PRO_1TB_S462NF0M513719F-part3 -> ../../nvme0n1p3
lrwxrwxrwx 1 root root 13 Nov 15 13:14 nvme-eui.0025385591b1b6f2 ->
../../nvme0n1
lrwxrwxrwx 1 root root 15 Nov 15 13:14 nvme-eui.0025385591b1b6f2-part1
-> ../../nvme0n1p1
lrwxrwxrwx 1 root root 15 Nov 15 13:14 nvme-eui.0025385591b1b6f2-part2
-> ../../nvme0n1p2
lrwxrwxrwx 1 root root 15 Nov 15 13:14 nvme-eui.0025385591b1b6f2-part3
-> ../../nvme0n1p3
lrwxrwxrwx 1 root root 13 Nov 15 13:14 nvme-eui.002538b5810565e6 ->
../../nvme1n1
lrwxrwxrwx 1 root root 15 Nov 15 13:14 nvme-eui.002538b5810565e6-part1
-> ../../nvme1n1p1
lrwxrwxrwx 1 root root 15 Nov 15 13:14 nvme-eui.002538b5810565e6-part2
-> ../../nvme1n1p2
lrwxrwxrwx 1 root root 15 Nov 15 13:14 nvme-eui.002538b5810565e6-part3
-> ../../nvme1n1p3
lrwxrwxrwx 1 root root  9 Nov 15 13:14 wwn-0x50025385503e8fc6 -> ../../sda
lrwxrwxrwx 1 root root 10 Nov 15 13:14 wwn-0x50025385503e8fc6-part1 ->
../../sda1
lrwxrwxrwx 1 root root 10 Nov 15 13:14 wwn-0x50025385503e8fc6-part2 ->
../../sda2
lrwxrwxrwx 1 root root 10 Nov 15 13:14 wwn-0x50025385503e8fc6-part3 ->
../../sda3
*********************** END /dev/disk/by-id

*********************** BEGIN /dev/disk/by-uuid
total 0
lrwxrwxrwx 1 root root 10 Nov 15 13:14 13DA-A2AC -> ../../sda1
lrwxrwxrwx 1 root root 15 Nov 15 13:14
1a42361e-b451-4f35-8bcc-4af14900c379 -> ../../nvme0n1p2
lrwxrwxrwx 1 root root 15 Nov 15 13:14
1be0f7ff-1a17-4e03-b2d9-03d430817655 -> ../../nvme1n1p3
lrwxrwxrwx 1 root root 15 Nov 15 13:14
4782e9d8-3fe8-42ef-ae6f-a5e4d92dea47 -> ../../nvme1n1p2
lrwxrwxrwx 1 root root 10 Nov 15 13:14
777fd5c3-089c-4add-a7c1-d57c242d6f9f -> ../../dm-2
lrwxrwxrwx 1 root root 10 Nov 15 13:14
7e3b94a7-1160-4d8a-b9fd-3e7828eab3d4 -> ../../dm-3
lrwxrwxrwx 1 root root 10 Nov 15 13:14
83a689da-d599-4de8-b55f-40b6a52d6806 -> ../../sda3
lrwxrwxrwx 1 root root 15 Nov 15 13:14 8E69-ED56 -> ../../nvme0n1p1
lrwxrwxrwx 1 root root 15 Nov 15 13:14 F949-B700 -> ../../nvme1n1p1
lrwxrwxrwx 1 root root 10 Nov 15 13:14
b7e77dc3-85a0-4768-b18f-2774d561e90b -> ../../dm-1
lrwxrwxrwx 1 root root 10 Nov 15 13:14
e3affeeb-d6d9-4508-a32b-c76e1b8b636a -> ../../sda2
lrwxrwxrwx 1 root root 15 Nov 15 13:14
f68f0f94-1de7-47e8-b8da-73db18f57523 -> ../../nvme0n1p3
*********************** END /dev/disk/by-uuid

-- System Information:
Debian Release: bullseye/sid
  APT prefers testing
  APT policy: (500, 'testing')
Architecture: amd64 (x86_64)

Kernel: Linux 5.2.0-3-amd64 (SMP w/16 CPU cores)
Kernel taint flags: TAINT_PROPRIETARY_MODULE, TAINT_OOT_MODULE,
TAINT_UNSIGNED_MODULE
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8),
LANGUAGE=en_US:en (charmap=UTF-8)
Shell: /bin/sh linked to /usr/bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled

Versions of packages grub-efi-amd64 depends on:
ii  debconf [debconf-2.0]  1.5.73
ii  grub-common            2.04-4
ii  grub-efi-amd64-bin     2.04-4
ii  grub2-common           2.04-4
ii  ucf                    3.0038+nmu1

grub-efi-amd64 recommends no packages.

grub-efi-amd64 suggests no packages.

-- debconf information:
* grub2/linux_cmdline:
  grub2/force_efi_extra_removable: false
* grub2/linux_cmdline_default: quiet acpi_enforce_resources=lax
  grub2/kfreebsd_cmdline_default: quiet
  grub2/kfreebsd_cmdline:
  grub2/update_nvram: true



More information about the Pkg-grub-devel mailing list