Bug#1040455: update-grub: when generating new grub.cfg entries from 40_custom not show as output on screen

mh m.hatzold at web.de
Thu Jul 6 12:06:09 BST 2023


Am Thu, 6 Jul 2023 11:20:32 +0100
schrieb Steve McIntyre <steve at einval.com>:

> Hi,
>
> On Thu, Jul 06, 2023 at 10:03:23AM +0200, mh wrote:
> >Package: grub-pc
> >Version: 2.06-14
> >Severity: important
> >
> >Dear Maintainer,
> >
> >* What led up to the situation?
> >executing "update-grub" (os-prober disabled!)
> >
> >* What exactly did you do (or not do) that was effective (or
> >     ineffective)?
> >"update-grub" as root (os-prober disabled!)
> >
> >* What was the outcome of this action?
> >On screen (xterm) I saw all the installed kernels of system grub was
> >  running from. In addition all bootable siduction-live.iso files
> > were listed and appended to the list (due to a script in
> >  /etc/grub.d/60_fll-fromiso). The entries defined in
> >  /etc/grub.d/40_custom did not appear in this on screen list.
> >
> >This leads  to the seemingly obvious conclusion they were not found
> >or honoured. Only further investigation will show they had been
> >copied to /boot/grub/grub.cfg .
>
> Sorry, but this bug report is way too vague to be useful. You've shown
> no output here, so we can only guess at what you're seeing. You're
> comparing normal output to what an extra local script is saying,
> maybe?
>

Sorry, you are right, I should have shown what's the output on screen
(xterm) and how the generated file /boot/grub/grub.cfg looks. Here it
is:

This what the user sees in xterm:

**********************************
# update-grub
Generating grub configuration file ...
Found linux image: /boot/vmlinuz-6.3.11-1-siduction-amd64
Found initrd image: /boot/initrd.img-6.3.11-1-siduction-amd64
Found linux image: /boot/vmlinuz-6.3.4-1-siduction-amd64
Found initrd image: /boot/initrd.img-6.3.4-1-siduction-amd64
Found linux image: /boot/vmlinuz-6.3.0-2-amd64
Found initrd image: /boot/initrd.img-6.3.0-2-amd64
Found memtest86+x64 image: /boot/memtest86+x64.bin
Warning: os-prober will not be executed to detect other bootable
partitions. Systems on them will not be added to the GRUB boot
configuration. Check GRUB_DISABLE_OS_PROBER documentation entry.
Found fromiso: siduction-21.1.0-cblues-lxqt-amd64-202102141944.iso on
/dev/sdc3
Found fromiso: siduction-future-plasma-amd64-latest.iso on /dev/sdc3
Found fromiso: siduction-patience-lxqt-amd64-latest.iso on /dev/sdc3
done
**********************************

And this is the generated /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 part_msdos
insmod ext2
set root='hd1,msdos1'
if [ x$feature_platform_search_hint = xy ]; then
  search --no-floppy --fs-uuid --set=root --hint-bios=hd1,msdos1
--hint-efi=hd1,msdos1 --hint-baremetal=ahci1,msdos1 --hint='hd1,msdos1'
 UUID-edited else search
--no-floppy --fs-uuid --set=root UUID-edited fi
    font="/usr/share/grub/unicode.pf2"
fi

if loadfont $font ; then
  set gfxmode=1280x1024
  load_video
  insmod gfxterm
  set locale_dir=$prefix/locale
  set lang=de_DE
  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/10_linux ###
function gfxmode {
	set gfxpayload="${1}"
}
set linux_gfx_mode=1280x1024
export linux_gfx_mode
menuentry 'siduction 2018.3.0 Patience (Xorg) GNU/Linux, with Linux
6.3.11-1-siduction-amd64' --class siduction --class gnu-linux --class
gnu --class os $menuentry_id_option
'gnulinux-6.3.11-1-siduction-amd64-advanced-UUID-edited'
{ load_video gfxmode $linux_gfx_mode insmod gzio if [ x$grub_platform =
xxen ]; then insmod xzio; insmod lzopio; fi insmod part_msdos
	insmod ext2
	set root='hd1,msdos1'
	if [ x$feature_platform_search_hint = xy ]; then
	  search --no-floppy --fs-uuid --set=root
--hint-bios=hd1,msdos1 --hint-efi=hd1,msdos1
--hint-baremetal=ahci1,msdos1 --hint='hd1,msdos1'
UUID-edited else search --no-floppy
--fs-uuid --set=root UUID-edited fi
echo	'Loading Linux 6.3.11-1-siduction-amd64 ...' linux
/boot/vmlinuz-6.3.11-1-siduction-amd64
root=UUID=UUID-edited ro  quiet
systemd.show_status=1 echo	'Loading initial ramdisk ...'
initrd	/boot/initrd.img-6.3.11-1-siduction-amd64 } menuentry
'siduction 2018.3.0 Patience (Xorg) GNU/Linux, with Linux
6.3.4-1-siduction-amd64' --class siduction --class gnu-linux --class
gnu --class os $menuentry_id_option
'gnulinux-6.3.4-1-siduction-amd64-advanced-UUID-edited'
{ load_video gfxmode $linux_gfx_mode insmod gzio if [ x$grub_platform =
xxen ]; then insmod xzio; insmod lzopio; fi insmod part_msdos insmod
ext2 set root='hd1,msdos1'
	if [ x$feature_platform_search_hint = xy ]; then
	  search --no-floppy --fs-uuid --set=root
--hint-bios=hd1,msdos1 --hint-efi=hd1,msdos1
--hint-baremetal=ahci1,msdos1 --hint='hd1,msdos1'
UUID-edited else search --no-floppy
--fs-uuid --set=root UUID-edited fi
echo	'Loading Linux 6.3.4-1-siduction-amd64 ...' linux
/boot/vmlinuz-6.3.4-1-siduction-amd64
root=UUID=UUID-edited ro  quiet
systemd.show_status=1 echo	'Loading initial ramdisk ...'
initrd	/boot/initrd.img-6.3.4-1-siduction-amd64 } menuentry
'siduction 2018.3.0 Patience (Xorg) GNU/Linux, with Linux
6.3.0-2-amd64' --class siduction --class gnu-linux --class gnu --class
os $menuentry_id_option
'gnulinux-6.3.0-2-amd64-advanced-UUID-edited'
{ load_video gfxmode $linux_gfx_mode insmod gzio if [ x$grub_platform =
xxen ]; then insmod xzio; insmod lzopio; fi insmod part_msdos insmod
ext2 set root='hd1,msdos1'
	if [ x$feature_platform_search_hint = xy ]; then
	  search --no-floppy --fs-uuid --set=root
--hint-bios=hd1,msdos1 --hint-efi=hd1,msdos1
--hint-baremetal=ahci1,msdos1 --hint='hd1,msdos1'
UUID-edited else search --no-floppy
--fs-uuid --set=root UUID-edited fi
echo	'Loading Linux 6.3.0-2-amd64 ...' linux
/boot/vmlinuz-6.3.0-2-amd64
root=UUID=UUID-edited ro  quiet
systemd.show_status=1 echo	'Loading initial ramdisk ...'
initrd	/boot/initrd.img-6.3.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/20_memtest86+ ###
menuentry "Memory test (memtest86+x64.bin)" {
	insmod part_msdos
	insmod ext2
	set root='hd1,msdos1'
	if [ x$feature_platform_search_hint = xy ]; then
	  search --no-floppy --fs-uuid --set=root
--hint-bios=hd1,msdos1 --hint-efi=hd1,msdos1
--hint-baremetal=ahci1,msdos1 --hint='hd1,msdos1'
UUID-edited else search --no-floppy
--fs-uuid --set=root UUID-edited fi
linux /boot/memtest86+x64.bin }
menuentry 'Memory test (memtest86+x64.bin, serial console)' {
	insmod part_msdos
	insmod ext2
	set root='hd1,msdos1'
	if [ x$feature_platform_search_hint = xy ]; then
	  search --no-floppy --fs-uuid --set=root
--hint-bios=hd1,msdos1 --hint-efi=hd1,msdos1
--hint-baremetal=ahci1,msdos1 --hint='hd1,msdos1'
UUID-edited else search --no-floppy
--fs-uuid --set=root UUID-edited fi
linux /boot/memtest86+x64.bin console=ttyS0,115200 }
### END /etc/grub.d/20_memtest86+ ###

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

### BEGIN /etc/grub.d/30_uefi-firmware ###
### 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.

#manuelle Kopie aus /boot/grub/grub.cfg### BEGIN
/etc/grub.d/30_os-prober ### menuentry 'siduction 2018.3.0 Patience
(LXQt) GNU/Linux (on /dev/sdb2)' --class gnu-linux --class gnu --class
os $menuentry_id_option
'gnulinux-/boot/vmlinuz-6.1.8-1-siduction-amd64--UUID-edited'
{ insmod part_msdos insmod ext2 set root='hd1,msdos2' if [
x$feature_platform_search_hint = xy ]; then search --no-floppy
--fs-uuid --set=root --hint-bios=hd1,msdos2 --hint-efi=hd1,msdos2
--hint-baremetal=ahci1,msdos2 --hint='hd1,msdos2'
UUID-edited else search --no-floppy
--fs-uuid --set=root UUID-edited fi
linux /boot/vmlinuz-6.1.8-1-siduction-amd64
root=UUID=UUID-edited ro quiet
systemd.show_status=1 initrd /boot/initrd.img-6.1.8-1-siduction-amd64 }

menuentry 'notinstalltion' {
search --no-floppy --fs-uuid --set=root
UUID-edited linux /vmlinuz
root=UUID=UUID-edited initrd
/initrd.img }


### 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_fll-fromiso ###
menuentry "siduction-21.1.0-cblues-lxqt-amd64-202102141944
(5.10.16-towo.1-siduction-amd64)" { insmod iso9660
	insmod part_msdos
	insmod ext2
	set root='hd3,msdos3'
	if [ x$feature_platform_search_hint = xy ]; then
	  search --no-floppy --fs-uuid --set=root
--hint-bios=hd2,msdos3 --hint-efi=hd2,msdos3
--hint-baremetal=ahci2,msdos3 --hint='hd3,msdos3'
UUID-editedbdb else search --no-floppy
--fs-uuid --set=root UUID-editedbdb fi
loopback loop
/sidon/siduction-21.1.0-cblues-lxqt-amd64-202102141944.iso linux
(loop)/boot/vmlinuz-5.10.16-towo.1-siduction-amd64
fromhd=UUID=UUID-editedbdb
fromiso=/sidon/siduction-21.1.0-cblues-lxqt-amd64-202102141944.iso
boot=fll lang=de_DE tz=Europe/Berlin quiet systemd.show_status=1
noeject initrd (loop)/boot/initrd.img-5.10.16-towo.1-siduction-amd64 }
menuentry "siduction-future-plasma-amd64-latest
(5.13.1-2-siduction-amd64)" { insmod iso9660 insmod part_msdos insmod
ext2 set root='hd3,msdos3' if [ x$feature_platform_search_hint = xy ];
then search --no-floppy --fs-uuid --set=root --hint-bios=hd2,msdos3
--hint-efi=hd2,msdos3 --hint-baremetal=ahci2,msdos3 --hint='hd3,msdos3'
UUID-editedbdb else search --no-floppy
--fs-uuid --set=root UUID-editedbdb fi
loopback loop /sidon/siduction-future-plasma-amd64-latest.iso linux
(loop)/boot/vmlinuz-5.13.1-2-siduction-amd64
fromhd=UUID=UUID-editedbdb
fromiso=/sidon/siduction-future-plasma-amd64-latest.iso boot=fll
lang=de_DE tz=Europe/Berlin quiet systemd.show_status=1 noeject initrd
(loop)/boot/initrd.img-5.13.1-2-siduction-amd64 } menuentry
"siduction-patience-lxqt-amd64-latest (5.10.7-towo.1-siduction-amd64)"
{ insmod iso9660 insmod part_msdos insmod ext2 set root='hd3,msdos3'
	if [ x$feature_platform_search_hint = xy ]; then
	  search --no-floppy --fs-uuid --set=root
--hint-bios=hd2,msdos3 --hint-efi=hd2,msdos3
--hint-baremetal=ahci2,msdos3 --hint='hd3,msdos3'
UUID-editedbdb else search --no-floppy
--fs-uuid --set=root UUID-editedbdb fi
loopback loop /sidon/siduction-patience-lxqt-amd64-latest.iso linux
(loop)/boot/vmlinuz-5.10.7-towo.1-siduction-amd64
fromhd=UUID=UUID-editedbdb
fromiso=/sidon/siduction-patience-lxqt-amd64-latest.iso boot=fll
lang=de_DE tz=Europe/Berlin quiet systemd.show_status=1 noeject initrd
(loop)/boot/initrd.img-5.10.7-towo.1-siduction-amd64 } ### END
/etc/grub.d/60_fll-fromiso ###
*************************************************************

(I edited the three different UUIDs which gepresent system partition,
40_custom partition, fll-fromiso-partition)

Obviously the 40_custom partition are in /boot/grub/grub.cfg, but not
visible on screen output after "update-grub"

If you need still morer info, please let me know.

Thanks

Michael



More information about the Pkg-grub-devel mailing list