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

From: fsmithred <[email-masked]>
Date: Fri, 8 Jan 2021 07:08:13 -0500

Package: devuan-installer

Build#171 netinstall-amd64.iso

UEFI netinstall boots to grub prompt. It's possible to manually boot from
there.

Running grub-install and update-grub both complete without error, grub.cfg
is created, bootloader in /boot/efi/EFI/devuan is created, system still
boots to grub prompt.

This bug is a result of the fix for bug#411 and bug#452
https://bugs.devuan.org/cgi/bugreport.cgi?bug=411
https://bugs.devuan.org/cgi/bugreport.cgi?bug=452

grub-efi signed needs the bootloader to be in /boot/efi/EFI/debian/
Setting ID=devuan in /etc/os-release breaks this - grub can't find the
boot menu.
Switching to the unsigned grub would exclude use of secure boot.

Setting ID=debian and running update-grub fixes the problem of the missing
boot menu but then it says "Debian". This can be changed to "Devuan" by
editing /etc/default/grub, but there's no easy way to do that in the
installer.

I don't know what the solution is.

fsmithred

---

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.

---

From: "Devuan bug Tracking System" <[email-masked]>
Date: Sun, 10 Jan 2021 02:33:06 +0000

This is an automatic notification regarding your bug report
which was filed against the devuan-installer package:

#535: No grub menu on uefi install

It has been closed by Ralph Ronnquist <[email-masked]>.

Their explanation is attached below along with your original report.
If this explanation is unsatisfactory and you have not received a
better one in a separate message then please contact Ralph Ronnquist <[email-masked]> by
replying to this email.

-- 
535: https://bugs.devuan.org/cgi/bugreport.cgi?bug=535
Devuan Bug Tracking System
Contact [email-masked] with problems

Subject: Re: No grub menu on uefi install
From: Ralph Ronnquist <[email-masked]>
To: [email-masked]
Date: Sun, 10 Jan 2021 13:18:17 +1100

The move of grub.cfg is installed via a magic-touch patch that
register a finish-install.d script to perform the move at the very end
of the installation.

Subject: No grub menu on uefi install
From: fsmithred <[email-masked]>
To: [email-masked]
Date: Fri, 8 Jan 2021 07:08:13 -0500

fsmithred