Bug#954405: grub-common: No provision for using grub-theme-* with 05_debian_theme

T. Joseph Carter tjcarter at blocksfree.com
Sat Mar 21 09:38:00 GMT 2020


Package: grub-common
Version: 2.04-5
Severity: minor

Researching why gfx didn't work in grub for me on this system, I
discovered that 05_debian_theme blocks the use of grub's native theming,
including grub-theme-starfield. The suggestion I've found elsewhere is
to chmod -x /etc/grub.d/05_debian_theme so it doesn't do that. This
seems like a poor solution.

You could check for $GRUB_THEME to be set and bail early if it is, I
suppose, but there's no guarantee that $GRUB_THEME was able to be used
other than to repeat these tests currently around line 278 of 00_header:

    if [ "x$GRUB_THEME" != x ] && [ -f "$GRUB_THEME" ] \
	&& is_path_readable_by_grub "$GRUB_THEME"; then

If you bail on the Debian theme if $GRUB_THEME is set under those
conditions, it would be as robust as 00_header is. Checking that and
adding options to override the colors as requested in #714414 would make
the cosmetics pretty configurable without altering package-installed
files.

(As for my own config and why it didn't work? LUKS2, which is obvious
once I thought about it. I'd file a bug about it, if I had a brilliant
suggestion for a solution, other than maybe to make a note in some
README file I probably wouldn't have looked at before I got this far
into it anyway.)

-- Package-specific info:

*********************** BEGIN /proc/mounts
/dev/mapper/chiyo--vg-root / ext4 rw,relatime,discard,errors=remount-ro 0 0
/dev/nvme0n1p2 /boot ext4 rw,relatime,discard 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
/dev/mapper/sdb1_crypt /srv ext4 rw,relatime,discard 0 0
/dev/fuse /run/user/1000/doc fuse rw,nosuid,nodev,relatime,user_id=1000,group_id=1000 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
}

insmod part_gpt
insmod ext2
if [ x$feature_platform_search_hint = xy ]; then
  search --no-floppy --fs-uuid --set=root  ee1fddd0-b814-417a-a985-4cc0a2c3f7b2
else
  search --no-floppy --fs-uuid --set=root ee1fddd0-b814-417a-a985-4cc0a2c3f7b2
fi
if loadfont /grub/unicode.pf2 ; then
  set gfxmode=800x600x24
  load_video
  insmod gfxterm
  set locale_dir=$prefix/locale
  set lang=en_US
  insmod gettext
fi
terminal_output gfxterm
insmod part_gpt
insmod ext2
if [ x$feature_platform_search_hint = xy ]; then
  search --no-floppy --fs-uuid --set=root  ee1fddd0-b814-417a-a985-4cc0a2c3f7b2
else
  search --no-floppy --fs-uuid --set=root ee1fddd0-b814-417a-a985-4cc0a2c3f7b2
fi
insmod png
background_image -m stretch /grub/custom-splash/desktop-grub.png
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 part_gpt
insmod ext2
if [ x$feature_platform_search_hint = xy ]; then
  search --no-floppy --fs-uuid --set=root  ee1fddd0-b814-417a-a985-4cc0a2c3f7b2
else
  search --no-floppy --fs-uuid --set=root ee1fddd0-b814-417a-a985-4cc0a2c3f7b2
fi
insmod png
if background_image /grub/custom-splash/desktop-grub.png; then
  true
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-7471ddbe-d2c8-4f56-96c1-ee9612516d19' {
	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  ee1fddd0-b814-417a-a985-4cc0a2c3f7b2
	else
	  search --no-floppy --fs-uuid --set=root ee1fddd0-b814-417a-a985-4cc0a2c3f7b2
	fi
	echo	'Loading Linux 5.4.0-4-amd64 ...'
	linux	/vmlinuz-5.4.0-4-amd64 root=/dev/mapper/chiyo--vg-root ro  quiet splash amdgpu.ppfeaturemask=0xffff7fff
	echo	'Loading initial ramdisk ...'
	initrd	/initrd.img-5.4.0-4-amd64
}
submenu 'Advanced options for Debian GNU/Linux' $menuentry_id_option 'gnulinux-advanced-7471ddbe-d2c8-4f56-96c1-ee9612516d19' {
	menuentry 'Debian GNU/Linux, with Linux 5.4.0-4-amd64' --class debian --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-5.4.0-4-amd64-advanced-7471ddbe-d2c8-4f56-96c1-ee9612516d19' {
		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  ee1fddd0-b814-417a-a985-4cc0a2c3f7b2
		else
		  search --no-floppy --fs-uuid --set=root ee1fddd0-b814-417a-a985-4cc0a2c3f7b2
		fi
		echo	'Loading Linux 5.4.0-4-amd64 ...'
		linux	/vmlinuz-5.4.0-4-amd64 root=/dev/mapper/chiyo--vg-root ro  quiet splash amdgpu.ppfeaturemask=0xffff7fff
		echo	'Loading initial ramdisk ...'
		initrd	/initrd.img-5.4.0-4-amd64
	}
	menuentry 'Debian GNU/Linux, with Linux 5.4.0-4-amd64 (recovery mode)' --class debian --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-5.4.0-4-amd64-recovery-7471ddbe-d2c8-4f56-96c1-ee9612516d19' {
		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  ee1fddd0-b814-417a-a985-4cc0a2c3f7b2
		else
		  search --no-floppy --fs-uuid --set=root ee1fddd0-b814-417a-a985-4cc0a2c3f7b2
		fi
		echo	'Loading Linux 5.4.0-4-amd64 ...'
		linux	/vmlinuz-5.4.0-4-amd64 root=/dev/mapper/chiyo--vg-root ro single 
		echo	'Loading initial ramdisk ...'
		initrd	/initrd.img-5.4.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/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/60_grub-imageboot ###
### END /etc/grub.d/60_grub-imageboot ###
*********************** 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  9 Mar 21 01:55 ata-PLDS_DVDRW_BDROM_DH-6E2S_CN03TD2H736390AP51MP -> ../../sr0
lrwxrwxrwx 1 root root  9 Mar 21 01:55 ata-ST4000VN008-2DR166_ZDH5HMXN -> ../../sda
lrwxrwxrwx 1 root root 10 Mar 21 01:55 ata-ST4000VN008-2DR166_ZDH5HMXN-part1 -> ../../sda1
lrwxrwxrwx 1 root root 10 Mar 21 01:55 dm-name-chiyo--vg-root -> ../../dm-2
lrwxrwxrwx 1 root root 10 Mar 21 01:55 dm-name-chiyo--vg-swap_1 -> ../../dm-1
lrwxrwxrwx 1 root root 10 Mar 21 01:55 dm-name-nvme0n1p3_crypt -> ../../dm-0
lrwxrwxrwx 1 root root 10 Mar 21 01:55 dm-name-sdb1_crypt -> ../../dm-3
lrwxrwxrwx 1 root root 10 Mar 21 01:55 dm-uuid-CRYPT-LUKS2-8f2cbe0473c74b0aa181bb6625fb67b8-sdb1_crypt -> ../../dm-3
lrwxrwxrwx 1 root root 10 Mar 21 01:55 dm-uuid-CRYPT-LUKS2-d963a60526c945bdafa1d84da708e324-nvme0n1p3_crypt -> ../../dm-0
lrwxrwxrwx 1 root root 10 Mar 21 01:55 dm-uuid-LVM-4odAMIP5hthlccZnxTLnDnyj92ljvkWO8iPMIBHnf0C5NMItM9aU6sHPahJ3nhzM -> ../../dm-2
lrwxrwxrwx 1 root root 10 Mar 21 01:55 dm-uuid-LVM-4odAMIP5hthlccZnxTLnDnyj92ljvkWOYTgcNI8pHv1jcVc8FJXLlGlwrXoeKfiK -> ../../dm-1
lrwxrwxrwx 1 root root 10 Mar 21 01:55 lvm-pv-uuid-FrZ1Pt-7mzI-4cYd-aDon-mAMw-0RFf-4hCBw1 -> ../../dm-0
lrwxrwxrwx 1 root root 13 Mar 21 01:55 nvme-CT1000P1SSD8_1917E1FDD2CE -> ../../nvme0n1
lrwxrwxrwx 1 root root 15 Mar 21 01:55 nvme-CT1000P1SSD8_1917E1FDD2CE-part1 -> ../../nvme0n1p1
lrwxrwxrwx 1 root root 15 Mar 21 01:55 nvme-CT1000P1SSD8_1917E1FDD2CE-part2 -> ../../nvme0n1p2
lrwxrwxrwx 1 root root 15 Mar 21 01:55 nvme-CT1000P1SSD8_1917E1FDD2CE-part3 -> ../../nvme0n1p3
lrwxrwxrwx 1 root root 13 Mar 21 01:55 nvme-nvme.c0a9-313931374531464444324345-435431303030503153534438-00000001 -> ../../nvme0n1
lrwxrwxrwx 1 root root 15 Mar 21 01:55 nvme-nvme.c0a9-313931374531464444324345-435431303030503153534438-00000001-part1 -> ../../nvme0n1p1
lrwxrwxrwx 1 root root 15 Mar 21 01:55 nvme-nvme.c0a9-313931374531464444324345-435431303030503153534438-00000001-part2 -> ../../nvme0n1p2
lrwxrwxrwx 1 root root 15 Mar 21 01:55 nvme-nvme.c0a9-313931374531464444324345-435431303030503153534438-00000001-part3 -> ../../nvme0n1p3
lrwxrwxrwx 1 root root  9 Mar 21 01:55 usb-WD_My_Book_25EE_575832314443353941455432-0:0 -> ../../sdb
lrwxrwxrwx 1 root root 10 Mar 21 01:55 usb-WD_My_Book_25EE_575832314443353941455432-0:0-part1 -> ../../sdb1
lrwxrwxrwx 1 root root  9 Mar 21 01:55 wwn-0x5000c500b3cdc91a -> ../../sda
lrwxrwxrwx 1 root root 10 Mar 21 01:55 wwn-0x5000c500b3cdc91a-part1 -> ../../sda1
*********************** END /dev/disk/by-id

*********************** BEGIN /dev/disk/by-uuid
total 0
lrwxrwxrwx 1 root root 10 Mar 21 01:55 1d1dbb99-da9d-4258-85ae-86f9cd94935f -> ../../dm-3
lrwxrwxrwx 1 root root 10 Mar 21 01:55 45ff0f98-30b6-4a3f-a9cc-458009a96e44 -> ../../dm-1
lrwxrwxrwx 1 root root 10 Mar 21 01:55 4d4ad86f-2c55-48cd-91d0-30b662439d8c -> ../../sdb1
lrwxrwxrwx 1 root root 10 Mar 21 01:55 7471ddbe-d2c8-4f56-96c1-ee9612516d19 -> ../../dm-2
lrwxrwxrwx 1 root root 15 Mar 21 01:55 86DD-4AE8 -> ../../nvme0n1p1
lrwxrwxrwx 1 root root 10 Mar 21 01:55 8f2cbe04-73c7-4b0a-a181-bb6625fb67b8 -> ../../sda1
lrwxrwxrwx 1 root root 15 Mar 21 01:55 d963a605-26c9-45bd-afa1-d84da708e324 -> ../../nvme0n1p3
lrwxrwxrwx 1 root root 15 Mar 21 01:55 ee1fddd0-b814-417a-a985-4cc0a2c3f7b2 -> ../../nvme0n1p2
*********************** END /dev/disk/by-uuid

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

Kernel: Linux 5.4.0-4-amd64 (SMP w/4 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8), LANGUAGE=en_US.UTF-8 (charmap=UTF-8)
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-10
ii  libc6               2.30-2
ii  libdevmapper1.02.1  2:1.02.167-1+b1
ii  libefiboot1         37-2
ii  libefivar1          37-2
ii  libfreetype6        2.10.1-2
ii  libfuse2            2.9.9-3
ii  liblzma5            5.2.4-1+b1

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

Versions of packages grub-common suggests:
ii  console-setup  1.194
ii  desktop-base   10.0.3
pn  grub-emu       <none>
pn  multiboot-doc  <none>
pn  xorriso        <none>

-- no debconf information



More information about the Pkg-grub-devel mailing list