Iām not after a flame war either. Iām here looking around EOS because it was time to look away from ubuntu, no trying to say that is the one true way, far from it, just what I had with grub installed to test against. I just did the grub install on my EOS, and will be updating my posts with what EOS does.
This is the cut down grub-install -v from an EOS grub install.
grub-install effectively compiles a specific grubx64.efi for the current boot environment, the grub-install logs looks a lot like the old link loaders combining object files into an executable. This also means that the core.efi from /usr/lib/grub is only the source, not the final product that gets installed into /boot/efi.
You can see normal.mod, as a sample grub module, and grub-mkimage building the efi to be installed in /boot/efi, and leaving a copy in /boot/grub, so this should be compared to what is on /boot/efi I guess.
Note that I am using /efi, not /boot/efi, so different, and that Iām using a ZFS root which isnāt a viable grub /boot directory, I would have to use a reparition to a separate /boot partition, which is one reason Iām using systemd boot at the moment.
I hope this gives @chromiell a better idea of where to check the files to compare against. This is a vastly cut down log of the grub-install -v process. But note the references to shim_lock_verifier etc.
# grub-install -v --bootloader-id=grub --efi-directory=/efi /dev/sda > /tmp/grub.log 2>&1
Installing for x86_64-efi platform.
...
grub-install: info: copying `/usr/lib/grub/x86_64-efi/normal.mod' -> `/boot/grub/x86_64-efi/normal.mod'.
...
grub-install: info: grub-mkimage --directory '/usr/lib/grub/x86_64-efi' --prefix '(,gpt2)/ROOT/eos@/boot/grub' --output '/boot/grub/x86_64-efi/core.efi' --dtb '' --sbat '' --format 'x86_64-efi' --compression 'auto' 'zfs' 'p
art_gpt'
.
grub-install: info: the total module size is 0x16118.
...
grub-install: info: locating shim_lock_verifier at 0xf880 (0xf7c0).
grub-install: info: locating grub_shim_lock_verifier_setup at 0x6c30 (0x1000).
...
grub-install: info: locating grub_is_shim_lock_enabled at 0x6d08 (0x1000).
...
grub-install: info: reading /usr/lib/grub/x86_64-efi/kernel.img.
grub-install: info: reading /usr/lib/grub/x86_64-efi/gzio.mod.
grub-install: info: reading /usr/lib/grub/x86_64-efi/zfs.mod.
grub-install: info: reading /usr/lib/grub/x86_64-efi/part_gpt.mod.
grub-install: info: kernel_img=0x560c71614760, kernel_size=0x1c000.
grub-install: info: the core size is 0x32118.
grub-install: info: writing 0x35000 bytes.
...
grub-install: info: grub-mkimage --directory '/usr/lib/grub/x86_64-efi' --prefix '' --output '/boot/grub/x86_64-efi/grub.efi' --dtb '' --sbat '' --format 'x86_64-efi' --compression 'auto' 'zfs' 'part_gpt'
.
grub-install: info: the total module size is 0x16100.
...
grub-install: info: locating shim_lock_verifier at 0xf880 (0xf7c0).
grub-install: info: locating grub_shim_lock_verifier_setup at 0x6c30 (0x1000).
...
grub-install: info: locating grub_is_shim_lock_enabled at 0x6d08 (0x1000).
...
grub-install: info: reading /usr/lib/grub/x86_64-efi/kernel.img.
grub-install: info: reading /usr/lib/grub/x86_64-efi/gzio.mod.
grub-install: info: reading /usr/lib/grub/x86_64-efi/zfs.mod.
grub-install: info: reading /usr/lib/grub/x86_64-efi/part_gpt.mod.
grub-install: info: kernel_img=0x560c71614760, kernel_size=0x1c000.
grub-install: info: the core size is 0x32100.
grub-install: info: writing 0x35000 bytes.
grub-install: info: copying `/boot/grub/x86_64-efi/core.efi' -> `/efi/EFI/grub/grubx64.efi'.
...
grub-install: info: executing efibootmgr -b 0005 -B.
BootCurrent: 0002
Timeout: 0 seconds
BootOrder: 0002,0004,0001,0003,0000
Boot0002* UEFI QEMU QEMU HARDDISK PciRoot(0x0)/Pci(0x2,0x2)/Pci(0x0,0x0)/SCSI(1,0){auto_created_boot_option}
Boot0003* EFI Internal Shell FvVol(7cb8bdc9-f8eb-4f34-aaea-3ee4af6516a1)/FvFile(7c04a583-9e3e-4f1c-ad65-e05268d0b4d1)
Boot0004* Linux Boot Manager HD(1,GPT,a9bcd511-8248-446a-ac6b-fdeb762bf4e8,0x800,0x200000)/File(\EFI\systemd\systemd-bootx64.efi)
...
grub-install: info: executing efibootmgr -c -d /dev/sda -p 1 -w -L grub -l \EFI\grub\grubx64.efi.
BootCurrent: 0002
Timeout: 0 seconds
BootOrder: 0005,0002,0004,0001,0003,0000
Boot0002* UEFI QEMU QEMU HARDDISK PciRoot(0x0)/Pci(0x2,0x2)/Pci(0x0,0x0)/SCSI(1,0){auto_created_boot_option}
Boot0003* EFI Internal Shell FvVol(7cb8bdc9-f8eb-4f34-aaea-3ee4af6516a1)/FvFile(7c04a583-9e3e-4f1c-ad65-e05268d0b4d1)
Boot0004* Linux Boot Manager HD(1,GPT,a9bcd511-8248-446a-ac6b-fdeb762bf4e8,0x800,0x200000)/File(\EFI\systemd\systemd-bootx64.efi)
Boot0005* grub HD(1,GPT,a9bcd511-8248-446a-ac6b-fdeb762bf4e8,0x800,0x200000)/File(\EFI\grub\grubx64.efi)
Installation finished. No error reported.
Looking the above, the symbol grub_is_shim_lock_enabled seems to be located.
$ cd /usr/lib/grub/x86_64-efi
$ for i in *mod kernel.img; do nm $i | sed 's/^/'$i'/'; done | grep shim
nm: all_video.mod: no symbols
linux.mod U grub_is_shim_lock_enabled
kernel.img0000000000005d08 T grub_is_shim_lock_enabled
kernel.img0000000000005c30 T grub_shim_lock_verifier_setup
kernel.img00000000000000c0 D shim_lock_verifier
$
So it seems linux.mod want grub_is_shim_lock_enabled, and kernel.img will provide grub_is_shim_lock_enabled. I tried to check /boot/grub/x86_64-efi, however the symbols are stripped so nm doesnāt help.