Bug#1058818: grub-common: fwsetup --is-supported not supported, boots into setup instead

Georg Lukas georg at op-co.de
Sat Dec 16 21:07:02 GMT 2023


Package: grub-common
Version: 2.12~rc1-12
Severity: important

The `fwsetup --is-supported` call from grub.d/30_uefi-firmware doesn't
query for support, but instead reboots right into the BIOS setup. This
makes the system unusable, as the command is executed when reading the
config file.

Removing /etc/grub.d/30_uefi-firmware and re-running update-grub
works around the issue.


-- Package-specific info:

*********************** BEGIN /proc/mounts
/dev/mapper/ssd--vg-ssd--root / ext4 rw,noatime,nodiratime,discard,errors=remount-ro 0 0
/dev/nvme0n1p2 /boot ext4 rw,relatime 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-afc8989e-fe3d-41e3-98fa-45a5959c6982' {
	load_video
	insmod gzio
	if [ x$grub_platform = xxen ]; then insmod xzio; insmod lzopio; fi
	insmod part_gpt
	insmod ext2
	search --no-floppy --fs-uuid --set=root d880c702-5a61-4007-85e8-7d93eb1339f9
	echo	'Loading Linux 6.5.0-5-amd64 ...'
	linux	/vmlinuz-6.5.0-5-amd64 root=/dev/mapper/ssd--vg-ssd--root ro resume=/dev/mapper/ssd--vg-ssd--swap quiet rd.luks.options=discard acpi_backlight=native
	echo	'Loading initial ramdisk ...'
	initrd	/initrd.img-6.5.0-5-amd64
}
submenu 'Advanced options for Debian GNU/Linux' $menuentry_id_option 'gnulinux-advanced-afc8989e-fe3d-41e3-98fa-45a5959c6982' {
	menuentry 'Debian GNU/Linux, with Linux 6.5.0-5-amd64' --class debian --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-6.5.0-5-amd64-advanced-afc8989e-fe3d-41e3-98fa-45a5959c6982' {
		load_video
		insmod gzio
		if [ x$grub_platform = xxen ]; then insmod xzio; insmod lzopio; fi
		insmod part_gpt
		insmod ext2
		search --no-floppy --fs-uuid --set=root d880c702-5a61-4007-85e8-7d93eb1339f9
		echo	'Loading Linux 6.5.0-5-amd64 ...'
		linux	/vmlinuz-6.5.0-5-amd64 root=/dev/mapper/ssd--vg-ssd--root ro resume=/dev/mapper/ssd--vg-ssd--swap quiet rd.luks.options=discard acpi_backlight=native
		echo	'Loading initial ramdisk ...'
		initrd	/initrd.img-6.5.0-5-amd64
	}
	menuentry 'Debian GNU/Linux, with Linux 6.5.0-5-amd64 (recovery mode)' --class debian --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-6.5.0-5-amd64-recovery-afc8989e-fe3d-41e3-98fa-45a5959c6982' {
		load_video
		insmod gzio
		if [ x$grub_platform = xxen ]; then insmod xzio; insmod lzopio; fi
		insmod part_gpt
		insmod ext2
		search --no-floppy --fs-uuid --set=root d880c702-5a61-4007-85e8-7d93eb1339f9
		echo	'Loading Linux 6.5.0-5-amd64 ...'
		linux	/vmlinuz-6.5.0-5-amd64 root=/dev/mapper/ssd--vg-ssd--root ro single single dis_ucode_ldr resume=/dev/mapper/ssd--vg-ssd--swap
		echo	'Loading initial ramdisk ...'
		initrd	/initrd.img-6.5.0-5-amd64
	}
	menuentry 'Debian GNU/Linux, with Linux 6.5.0-4-amd64' --class debian --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-6.5.0-4-amd64-advanced-afc8989e-fe3d-41e3-98fa-45a5959c6982' {
		load_video
		insmod gzio
		if [ x$grub_platform = xxen ]; then insmod xzio; insmod lzopio; fi
		insmod part_gpt
		insmod ext2
		search --no-floppy --fs-uuid --set=root d880c702-5a61-4007-85e8-7d93eb1339f9
		echo	'Loading Linux 6.5.0-4-amd64 ...'
		linux	/vmlinuz-6.5.0-4-amd64 root=/dev/mapper/ssd--vg-ssd--root ro resume=/dev/mapper/ssd--vg-ssd--swap quiet rd.luks.options=discard acpi_backlight=native
		echo	'Loading initial ramdisk ...'
		initrd	/initrd.img-6.5.0-4-amd64
	}
	menuentry 'Debian GNU/Linux, with Linux 6.5.0-4-amd64 (recovery mode)' --class debian --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-6.5.0-4-amd64-recovery-afc8989e-fe3d-41e3-98fa-45a5959c6982' {
		load_video
		insmod gzio
		if [ x$grub_platform = xxen ]; then insmod xzio; insmod lzopio; fi
		insmod part_gpt
		insmod ext2
		search --no-floppy --fs-uuid --set=root d880c702-5a61-4007-85e8-7d93eb1339f9
		echo	'Loading Linux 6.5.0-4-amd64 ...'
		linux	/vmlinuz-6.5.0-4-amd64 root=/dev/mapper/ssd--vg-ssd--root ro single single dis_ucode_ldr resume=/dev/mapper/ssd--vg-ssd--swap
		echo	'Loading initial ramdisk ...'
		initrd	/initrd.img-6.5.0-4-amd64
	}
	menuentry 'Debian GNU/Linux, with Linux 6.1.0-4-amd64' --class debian --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-6.1.0-4-amd64-advanced-afc8989e-fe3d-41e3-98fa-45a5959c6982' {
		load_video
		insmod gzio
		if [ x$grub_platform = xxen ]; then insmod xzio; insmod lzopio; fi
		insmod part_gpt
		insmod ext2
		search --no-floppy --fs-uuid --set=root d880c702-5a61-4007-85e8-7d93eb1339f9
		echo	'Loading Linux 6.1.0-4-amd64 ...'
		linux	/vmlinuz-6.1.0-4-amd64 root=/dev/mapper/ssd--vg-ssd--root ro resume=/dev/mapper/ssd--vg-ssd--swap quiet rd.luks.options=discard acpi_backlight=native
		echo	'Loading initial ramdisk ...'
		initrd	/initrd.img-6.1.0-4-amd64
	}
	menuentry 'Debian GNU/Linux, with Linux 6.1.0-4-amd64 (recovery mode)' --class debian --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-6.1.0-4-amd64-recovery-afc8989e-fe3d-41e3-98fa-45a5959c6982' {
		load_video
		insmod gzio
		if [ x$grub_platform = xxen ]; then insmod xzio; insmod lzopio; fi
		insmod part_gpt
		insmod ext2
		search --no-floppy --fs-uuid --set=root d880c702-5a61-4007-85e8-7d93eb1339f9
		echo	'Loading Linux 6.1.0-4-amd64 ...'
		linux	/vmlinuz-6.1.0-4-amd64 root=/dev/mapper/ssd--vg-ssd--root ro single single dis_ucode_ldr resume=/dev/mapper/ssd--vg-ssd--swap
		echo	'Loading initial ramdisk ...'
		initrd	/initrd.img-6.1.0-4-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/20_memtest86+ ###
menuentry "Memory test (memtest86+)" {
	insmod part_gpt
	insmod ext2
	search --no-floppy --fs-uuid --set=root d880c702-5a61-4007-85e8-7d93eb1339f9
	linux16	/memtest86+.bin
}
menuentry "Memory test (memtest86+, serial console 115200)" {
	insmod part_gpt
	insmod ext2
	search --no-floppy --fs-uuid --set=root d880c702-5a61-4007-85e8-7d93eb1339f9
	linux16	/memtest86+.bin console=ttyS0,115200n8
}
menuentry "Memory test (memtest86+, experimental multiboot)" {
	insmod part_gpt
	insmod ext2
	search --no-floppy --fs-uuid --set=root d880c702-5a61-4007-85e8-7d93eb1339f9
	multiboot	/memtest86+_multiboot.bin
}
menuentry "Memory test (memtest86+, serial console 115200, experimental multiboot)" {
	insmod part_gpt
	insmod ext2
	search --no-floppy --fs-uuid --set=root d880c702-5a61-4007-85e8-7d93eb1339f9
	multiboot	/memtest86+_multiboot.bin console=ttyS0,115200n8
}
### END /etc/grub.d/20_memtest86+ ###

### BEGIN /etc/grub.d/25_bli ###
if [ "$grub_platform" = "efi" ]; then
  insmod bli
fi
### END /etc/grub.d/25_bli ###

### BEGIN /etc/grub.d/30_os-prober ###
### END /etc/grub.d/30_os-prober ###

### BEGIN /etc/grub.d/30_uefi-firmware ###
if [ "$grub_platform" = "efi" ]; then
	fwsetup --is-supported
	if [ "$?" = 0 ]; then
		menuentry 'UEFI Firmware Settings' $menuentry_id_option 'uefi-firmware' {
			fwsetup
		}
	fi
fi
### 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
Personalities : [linear] [multipath] [raid0] [raid1] [raid6] [raid5] [raid4] [raid10] 
unused devices: <none>
*********************** END /proc/mdstat

*********************** BEGIN /dev/disk/by-id
total 0
lrwxrwxrwx 1 root root 10 Dec 16 20:54 dm-name-ssd -> ../../dm-0
lrwxrwxrwx 1 root root 10 Dec 16 20:54 dm-name-ssd--vg-ssd--root -> ../../dm-1
lrwxrwxrwx 1 root root 10 Dec 16 20:54 dm-name-ssd--vg-ssd--swap -> ../../dm-2
lrwxrwxrwx 1 root root 10 Dec 16 20:54 dm-uuid-CRYPT-LUKS2-25e7963981314c999814a23c23eff4eb-ssd -> ../../dm-0
lrwxrwxrwx 1 root root 10 Dec 16 20:54 dm-uuid-LVM-VmLuI3lShD0uerqohXyoZYdDnZ5bkDFcFaWzT7LgWcbHLqouzMEvzdLcdYfBMO0T -> ../../dm-2
lrwxrwxrwx 1 root root 10 Dec 16 20:54 dm-uuid-LVM-VmLuI3lShD0uerqohXyoZYdDnZ5bkDFcxZcmDJnBbnVm5M8250iX0wxSErg95ge5 -> ../../dm-1
lrwxrwxrwx 1 root root 10 Dec 16 20:54 lvm-pv-uuid-rU2EGb-bIE8-U3Ul-wjtU-Uu2K-rFkJ-6YdUoe -> ../../dm-0
lrwxrwxrwx 1 root root 13 Dec 16 20:54 nvme-Samsung_SSD_970_EVO_Plus_2TB_S4J4NZFR101859T -> ../../nvme0n1
lrwxrwxrwx 1 root root 15 Dec 16 20:54 nvme-Samsung_SSD_970_EVO_Plus_2TB_S4J4NZFR101859T-part1 -> ../../nvme0n1p1
lrwxrwxrwx 1 root root 15 Dec 16 20:54 nvme-Samsung_SSD_970_EVO_Plus_2TB_S4J4NZFR101859T-part2 -> ../../nvme0n1p2
lrwxrwxrwx 1 root root 15 Dec 16 20:54 nvme-Samsung_SSD_970_EVO_Plus_2TB_S4J4NZFR101859T-part3 -> ../../nvme0n1p3
lrwxrwxrwx 1 root root 13 Dec 16 20:54 nvme-Samsung_SSD_970_EVO_Plus_2TB_S4J4NZFR101859T_1 -> ../../nvme0n1
lrwxrwxrwx 1 root root 15 Dec 16 20:54 nvme-Samsung_SSD_970_EVO_Plus_2TB_S4J4NZFR101859T_1-part1 -> ../../nvme0n1p1
lrwxrwxrwx 1 root root 15 Dec 16 20:54 nvme-Samsung_SSD_970_EVO_Plus_2TB_S4J4NZFR101859T_1-part2 -> ../../nvme0n1p2
lrwxrwxrwx 1 root root 15 Dec 16 20:54 nvme-Samsung_SSD_970_EVO_Plus_2TB_S4J4NZFR101859T_1-part3 -> ../../nvme0n1p3
lrwxrwxrwx 1 root root 13 Dec 16 20:54 nvme-eui.00253851119e0743 -> ../../nvme0n1
lrwxrwxrwx 1 root root 15 Dec 16 20:54 nvme-eui.00253851119e0743-part1 -> ../../nvme0n1p1
lrwxrwxrwx 1 root root 15 Dec 16 20:54 nvme-eui.00253851119e0743-part2 -> ../../nvme0n1p2
lrwxrwxrwx 1 root root 15 Dec 16 20:54 nvme-eui.00253851119e0743-part3 -> ../../nvme0n1p3
*********************** END /dev/disk/by-id

*********************** BEGIN /dev/disk/by-uuid
total 0
lrwxrwxrwx 1 root root 10 Dec 16 20:43 2023-07-22-10-52-30-00 -> ../../sda1
lrwxrwxrwx 1 root root 15 Dec 16 20:54 25e79639-8131-4c99-9814-a23c23eff4eb -> ../../nvme0n1p3
lrwxrwxrwx 1 root root 15 Dec 16 20:54 6158-17F0 -> ../../nvme0n1p1
lrwxrwxrwx 1 root root 10 Dec 16 20:54 7637a29d-ddd0-401e-977f-eec155320a38 -> ../../dm-2
lrwxrwxrwx 1 root root 10 Dec 16 20:43 DEB0-0001 -> ../../sda2
lrwxrwxrwx 1 root root 10 Dec 16 20:54 afc8989e-fe3d-41e3-98fa-45a5959c6982 -> ../../dm-1
lrwxrwxrwx 1 root root 15 Dec 16 20:54 d880c702-5a61-4007-85e8-7d93eb1339f9 -> ../../nvme0n1p2
*********************** END /dev/disk/by-uuid

-- System Information:
Debian Release: trixie/sid
  APT prefers unstable-debug
  APT policy: (500, 'unstable-debug'), (500, 'unstable'), (1, 'experimental-debug'), (1, 'experimental')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 6.5.0-5-amd64 (SMP w/16 CPU threads; PREEMPT)
Locale: LANG=en_US.utf8, LC_CTYPE=en_US.utf8 (charmap=UTF-8), LANGUAGE not set
Shell: /bin/sh linked to /usr/bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled

Versions of packages grub-common depends on:
ii  gettext-base        0.19.8.1-2
ii  libc6               2.37-8
ii  libdevmapper1.02.1  2:1.02.185-2
ii  libefiboot1         38-3
ii  libefivar1          38-3
ii  libfreetype6        2.13.2+dfsg-1
ii  libfuse3-3          3.14.0-4
ii  liblzma5            5.4.5-0.1

Versions of packages grub-common recommends:
ii  os-prober  1.65

Versions of packages grub-common suggests:
ii  console-setup  1.223
ii  desktop-base   12.0.6+nmu1
pn  grub-emu       <none>
ii  mtools         4.0.23-1
pn  multiboot-doc  <none>
ii  xorriso        1.5.6-1

-- Configuration Files:
/etc/grub.d/05_debian_theme changed [not included]

-- debconf-show failed



More information about the Pkg-grub-devel mailing list