Bug#1054373: Regression in monolithic EFI normal disk boot image with --removable and --bootloader-id

Pascal Hambourg pascal at plouf.fr.eu.org
Sun Oct 22 20:07:57 BST 2023


Package: src:grub2
Version: 2.06-14

Commit 5171e04d ("Bundle unicode.pf2 in a squashfs memdisk attached to 
the signed EFI binary") removed (memdisk)/grub.cfg from monolithic EFI 
normal disk boot images.

So now the normal disk boot image looks for grub.cfg in /EFI/debian only 
and not in $cmdpath any more. This breaks boot from the removable media 
path when installed with --removable, and normal boot when installed 
with --bootloader-id or $GRUB_DISTRIBUTOR != "debian".

Expected behaviour: GRUB loads $cmdpath/grub.cfg and displays the menu.
Observed behaviour: GRUB does not load $cmdpath/grub.cfg and enters 
command-line mode instead of displaying the menu.

Proposed fix: add a new grub.cfg into normal disk boot images instead of 
re-adding the previously used one which seems to be intended for CD boot 
images.

Option A: the new embedded grub.cfg looks for grub.cfg in $cmdpath first 
then in $prefix as fallback.

Option B: the new embedded grub.cfg looks for grub.cfg in $cmdpath only.
Caveats:
- For boot from the removable media path to keep working when installed 
with --force-extra-removable, this change requires to patch grub-install 
to install grub.cfg into the removable media path too.
- For boot from live and installation ISO-hybrid images to keep working, 
this change requires to patch the image builders to install grub.cfg 
into the removable media path.

Note: option A may also require grub-install --force-extra-removable to 
install grub.cfg in /EFI/Boot in order to boot properly from the 
removable media path when combined with --no-nvram and --bootloader-id 
or $GRUB_DISTRIBUTOR != "debian", which was already broken.



More information about the Pkg-grub-devel mailing list