Today I did update my system which was originally installed following Ubuntu 20.04 Root on ZFS. While updating, I see that there is an update for grub, which failed to run the included grub-install.
So I decided to replay the grub installation from the guide:
grub-install --target=x86_64-efi --efi-directory=/boot/efi \
--bootloader-id=ubuntu --recheck --no-floppy
cp -a /boot/efi/EFI /boot/efi2
grub-install --target=x86_64-efi --efi-directory=/boot/efi2 \
--bootloader-id=ubuntu-2 --recheck --no-floppy
(i'm on a mirror)
which failed too. I can still reboot my system with success but I guess it still run the old grub binaries.
Am I the only one facing this issue? What's the incidence of it ?
Here is some more infos:
dpkg -l | grep grub
ii grub-common 2.04-1ubuntu26.7 amd64 GRand Unified Bootloader (common files)
ii grub-efi-amd64 2.04-1ubuntu26.7 amd64 GRand Unified Bootloader, version 2 (EFI-AMD64 version)
ii grub-efi-amd64-bin 2.04-1ubuntu26.7 amd64 GRand Unified Bootloader, version 2 (EFI-AMD64 modules)
ii grub-efi-amd64-signed 1.142.9+2.04-1ubuntu26.7 amd64 GRand Unified Bootloader, version 2 (EFI-AMD64 version, signed)
ii grub2-common 2.04-1ubuntu26.7 amd64 GRand Unified Bootloader (common files for version 2)
running :
grub-install --target=x86_64-efi --efi-directory=/boot/efi \ --bootloader-id=ubuntu --recheck --no-floppy -vv
...
grub-install: info: writing 656 bytes of a fixup block starting at 0xe000.
grub-install: info: adding a relocation entry for 0xf010.
grub-install: info: adding a relocation entry for 0xf018.
grub-install: info: adding a relocation entry for 0xf028.
grub-install: info: adding a relocation entry for 0xf030.
grub-install: info: adding a relocation entry for 0xf040.
grub-install: info: adding a relocation entry for 0xf048.
grub-install: info: adding 393 padding fixup entries.
grub-install: info: writing 808 bytes of a fixup block starting at 0xf000.
grub-install: info: reading /usr/lib/grub/x86_64-efi/crypto.mod.
grub-install: info: reading /usr/lib/grub/x86_64-efi/gcry_crc.mod.
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: reading /usr/lib/grub/x86_64-efi/search_fs_uuid.mod.
grub-install: info: reading /boot/grub/x86_64-efi/load.cfg.
grub-install: info: kernel_img=0x556fae524f00, kernel_size=0x1a000.
grub-install: info: the core size is 0x31b40.
grub-install: info: writing 0x34000 bytes.
grub-install: info: copying `/usr/lib/grub/x86_64-efi-signed/grubx64.efi.signed' -> `/boot/efi2/EFI/ubuntu-2/grubx64.efi'.
grub-install: info: copying `/usr/lib/shim/shimx64.efi.signed' -> `/boot/efi2/EFI/ubuntu-2/shimx64.efi'.
grub-install: info: copying `/usr/lib/shim/mmx64.efi' -> `/boot/efi2/EFI/ubuntu-2/mmx64.efi'.
grub-install: info: copying `/usr/lib/shim/BOOTX64.CSV' -> `/boot/efi2/EFI/ubuntu-2/BOOTX64.CSV'.
grub-install: info: copying `/boot/grub/x86_64-efi/load.cfg' -> `/boot/efi2/EFI/ubuntu-2/grub.cfg'.
grub-install: info: copying `/usr/lib/shim/shimx64.efi.signed' -> `/boot/efi2/EFI/BOOT/BOOTX64.EFI'.
grub-install: info: copying `/usr/lib/shim/fbx64.efi' -> `/boot/efi2/EFI/BOOT/fbx64.efi'.
grub-install: info: copying `/usr/lib/shim/mmx64.efi' -> `/boot/efi2/EFI/BOOT/mmx64.efi'.
grub-install: info: Registering with EFI: distributor = `ubuntu-2', path = `\EFI\ubuntu-2\shimx64.efi', ESP at hostdisk//dev/sdl,gpt1.
grub-install: warning: Internal error.
grub-install: error: failed to register the EFI boot entry: Operation not permitted.
How do I fix this ?