On 22/08/2024 16:44, Felix Miata wrote:
# ls -gG/boot/efi/EFI/opensusetw/
total 148
-rwxr-xr-x 1 151552 Aug 21 16:08 grubx64.efi

Am I right that you either do not use Secure Boot or generated a local key instead of/in addition to Microsoft and SUSE ones?

In the case of default or almost default install with a Debian key (mokutil --list-enrolled)

ls -gG /boot/efi/EFI/debian/
total 5960
-rwx------ 1     108 Oct  9  2023 BOOTX64.CSV
-rwx------ 1   87328 Oct  9  2023 fbx64.efi
-rwx------ 1     112 Oct  9  2023 grub.cfg
-rwx------ 1 4199872 Oct  9  2023 grubx64.efi
-rwx------ 1  849616 Oct  9  2023 mmx64.efi
-rwx------ 1  948768 Oct  9  2023 shimx64.efi

Shim and grub are shipped signed, so install-grub can not embed location of /boot/grub2/grub.cfg (search.fs_uuid) into grubx64.efi. So grub.cfg specifying a partition with /boot is written to EFI/debian/grub.cfg:

search.fs_uuid 12345678-90ab-4cde-f012-34567890abcd root
set prefix=($root)'/grub'
configfile $prefix/grub.cfg

I have found an upstream bug:

<https://savannah.gnu.org/bugs/index.php?57381>
bug #57381: EFI image with wrong prefix when bootload-id is specified

that confirms that "debian" is fixed in the EFI/debian/grub.cfg path when grubx64.efi is taken from grub-efi-amd64-signed. I have no idea if EFI binaries can determine their own location to implement relative path for the configuration file. Depending on that hardcoded .cfg path is either grub or UEFI limitation.

Reply via email to