On Mi, 06.07.22 16:13, Gerd Hoffmann (kraxel@redhat.com) wrote:
grub2 doesn't find it. Support not implemented?
afics grub2 upstream has no native support for boot loader spec stuff. (or has that changed?)
The fedora version of grub2 implements a flavour of type #1 boot loader spec entries (i.e. .conf entries), but not type #2 (i.e. unified kernels), iirc.
Ok, lets try systemd-boot instead. Install. Chainload from grub for now:
root@fedora ~/mkosi-initrd (main)# cat /boot/grub2/custom.cfg if [ "$grub_platform" = "efi" ]; then menuentry 'systemd boot loader' { chainloader (hd0,gpt1)/efi/systemd/systemd-bootx64.efi } fi
systemd-boot doesn't find it either. Double-checking. ESP mounted at /boot/efi. Directory looks fine to me:
root@fedora ~/mkosi-initrd (main)# ll /boot/efi/EFI/Linux total 77832 -rwx------. 1 root root 79698816 Jul 6 15:36 unified-5.18.9-200.fc36.x86_64.efi
Any clues?
I am not a grub guy, haven't used it in a long time. But my educated guess is this: I think grub might load the chainloaded binary into memory itself, and then execute it from there, instead of invoking it directly from the ESP file system. This matters because if sd-boot is invoked from a synthetic file in memory we cannot derive the directory tree of the ESP from it, and thus not find boot loader entries.
Lennart
-- Lennart Poettering, Berlin