You are not logged in.

#26 2023-09-23 13:30:58

knightluffy
Member
Registered: 2023-09-23
Posts: 1

Re: GRUB update - symbol "grub_is_shim_lock_enabled" not found

Jark5455 wrote:

Maybe try disabling the shim lock in your grub-install command? I believe  the option is '--disable-shim-lock'

I have the same issue. When I run 'sudo grub-mkconfig -o /boot/grub/grub.cfg' on my arch linux and then restart arch linux, it will show 【symbol "grub_is_shim_lock_enabled" not found】 . After a lot of test, add --disbale-shim-lock worked for me. I run the command under the arch linux live cd with the following commands:
mount /dev/sda2 /mnt
mount /dev/sda1 /mnt/boot
arch-chroot /mnt

rm -rf /boot/grub
grub-install --target=x86_64-efi --efi-directory=/boot --disable-shim-lock
grub-mkconfig -o /boot/grub/grub.cfg

If I'm not add --disable-shim-lock in the live cd, the error will still show after I run 'sudo grub-mkconfig -o /boot/grub/grub.cfg'  and restart in the arch linux system the next time

Offline

#27 2023-10-05 01:20:44

matafan
Member
Registered: 2013-11-29
Posts: 7

Re: GRUB update - symbol "grub_is_shim_lock_enabled" not found

I ran into this same issue just now.

For me, the problem was that grub used to install itself under /EFI/GRUB/ on the EFI partition. But after a recent update, it looks like it now installs itself under /EFI/arch/ instead. So you end up with the new binary at /EFI/arch/grubx64.efi, but your bios still running the old /EFI/GRUB/grubx64.efi binary.

The solution was to change the boot list in my bios to run /EFI/arch/grubx64.efi instead of /EFI/GRUB/grubx64.efi. Then /EFI/GRUB can be deleted completely.

Offline

#28 2024-03-17 09:32:19

plieschn
Member
Registered: 2024-03-17
Posts: 1

Re: GRUB update - symbol "grub_is_shim_lock_enabled" not found

Hello everybody!

As I also had the same issue and could finally resolve it, here are a couple of findings, hopefully this can help someone else running into this pesky issue. First of all thanks to @sailor-2, the remark using efibootmgr to visualize the specific boot loaders of the system brought me on the right track to understand what is going on and why! Thank you a lot! So in any case using efibootmgr to determine where the grub efi image is expected to be located by the UEFI subsystem and comparing this information with the EFI installation on the disk is always a good point to start!

In more detail it is important to know that grub uses two components when installed in UEFI mode: The grub core image (*.efi) and the grub modules (/boot/grub/x86-64-efi/*.mod). These two components have to match regarding the version, if they mismatch you get exactly these issues like "is_shim_lock_enabled" error messages. This has nothing to do with shim lock itself, the call to the specific method that is expected to be present in one component simply does not exist in the other one and so the call and the whole booting process fails. Starting with grub 2.12 there seems to be an additional pitfall that the default install location for the core module has changed from EFI/BOOT/BOOTX64.EFI to EFI/<dist>/grubx64.efi. So just updating grub und running grub-install is very likely to end up with a mismatching configuration because the UEFI subsystem already knows the old grub installation of EFI/BOOT/BOOTX64.EFI and tries to use them with the newly installed modules.

What can you do in this situation?

One thing to mention is the flag --removable of grub-install. This will install the grub core module into the old location EFI/BOOT/BOOTX64.EFI and therefore is likely to already resolve the issue. In this case you would end up having two core modules installed and we just hope that the UEFI loader uses any of them, but there is also not really a reason why it would not.

How I resolved the issue: After running efibootmgr I found out that I had multiple old boot loader installations and started to clean this up, I also tried at some point systemd-boot which was also not working, so I cleaned up everything that belonged to Linux and grub. So basically everything besides my MS Windows boot loader that resides in the same structure. I removed all boot loaders (again except Win) in the UEFI setup (can also be done in efibootmgr to spare the reboot) and installed grub again using grub-install --efi-directory=/boot. I checked efibootmgr again to veryfy that the installation is matching the newly installed boat loader on /boot/EFI and it did. After reboot everything worked again.

Hopefully this can help someone, I tried my best to explain the issue as good as I can. Please correct me if you have different insights into the problem!

Best regards everyone and thank you again for helping me out!

Offline

#29 2024-03-29 15:34:36

anayrat
Member
Registered: 2018-05-24
Posts: 8

Re: GRUB update - symbol "grub_is_shim_lock_enabled" not found

Thanks @plieschn
I followed your instructions and helped me a lot !

Offline

Board footer

Powered by FluxBB