Subject: bug#535: No grub menu on uefi install

From: Ralph Ronnquist <[email-masked]>
Date: Sat, 9 Jan 2021 09:49:51 +1100

This is verified to happen also for server-amd64.iso, using QEMU with
TianoCORE UEFI.

There is an initial quirk with TianoCORE, that if the target disk has
an EFI partition then its first boot option will be atttempted first,
rather than using the ISO's boot option. In that case, one must exit
the grub prompt so as to enter the TianCORE setup menu, and then go
into the "Boot Manager" to select the boot option from the second ISO
(called DVD) parition, which boots the installer.

An alternative way to recover from that quirk is to simply delete the
partitions e.g. with fdisk.

The installer creates an EFI partition on the target disk that contains:
    EFI/devuan/shimx64.efi
    EFI/devuan/grubx64.efi
    EFI/devuan/mmx64.efi
    EFI/devuan/fbx64.efi
    EFI/devuan/BOOTX64.CSV
    EFI/devuan/grub.cfg

It has "EFI/debian" embedded into the grubx64.efi binary, which
apparently is used for trying to find "grub.cfg". So, I changed that
partition to be:
    EFI/devuan/shimx64.efi
    EFI/devuan/grubx64.efi
    EFI/devuan/mmx64.efi
    EFI/devuan/fbx64.efi
    EFI/devuan/BOOTX64.CSV
    EFI/debian/grub.cfg
(i.e. created EFI/debian and moved EFI/devuan/grub.cfg to there)

It now boots nicely. The UEFI boot option says "devuan" (you don't
normally see this though) and the grub menu menu says "Devuan".

No other patch; i.e., not running any grub-*

I imagine there is a solution using the ID_LIKE entry in
/etc/os-release to make that happen as part of the grub installation
or update.

Ralph.