Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
(SOLVED) error: symbol `grub_is_shim_lock_enabled` not found
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware
View previous topic :: View next topic  
Author Message
osugi_sakae
n00b
n00b


Joined: 24 Oct 2002
Posts: 28
Location: Columbus, OH

PostPosted: Thu Mar 21, 2024 10:36 pm    Post subject: (SOLVED) error: symbol `grub_is_shim_lock_enabled` not found Reply with quote

This started happening at boot after the recent grub and installkernel updates.

I did at first have the issue some have had because we forgot to rerun grub-install. I used the live disc to chroot and fix that.

But then the shim lock error appeared. Grub comes up correctly, and I choose the 6.6.21 kernel. It starts to load, gives the "error: symbol `grub_is_shim_lock_enabled` not found" message, then loads the initial ramdisk, gives the same error again, and fails with "press any key to continue". Still seems to be in the small grub 2.12 window in the middle of the screen (hasn't switched to using the entire screen yet).

I've spent hours in the live dvd checking grub, efi, the entire boot directory, etc. Even recompiled the kernel.

I tried rerunning either grub-install or (I forget which command) with --disable-shim-lock, as someone somewhere suggested.

Root partition is LUKS encrypted, but the system isn't making it that far into the boot process for that to be an issue.

/boot is a separate partition, formatted vfat. Everything seems good in /boot and /boot/EFI.

Any thoughts? This system has booted many kernels without problem through the last few years, so I don't think it is a hardware issue or a forgotten config command somewhere.

If it might be helpful: ASRock mobo, AMD cpu from two or three years ago. Boot and root are partitions on the same SSD.

EDIT: Solved!

Turns out the error had nothing to do with secure boot, despite the error message. The problem was mismatch of grub64.efi files in /boot. grub-install put new files in /boot/EFI/EFI/gentoo/ but when booting grub is looking at /boot/EFI/gentoo/. (No idea why that is, but not going to deal with it just now.)

There was a grub64.efi from like 2021 in that dir, so it did not match the rest of the files (from init disk or grub dir or ???). Copied the new one into /boot/EFI/gentoo/ and machine booted into the new 6.6.21 kernel just fine.
_________________
I am not a number, I am a free man.
---- The Prisoner
Back to top
View user's profile Send private message
majoron
Apprentice
Apprentice


Joined: 12 Oct 2005
Posts: 239
Location: Frankfurt

PostPosted: Fri Mar 22, 2024 11:15 am    Post subject: Reply with quote

Same problem here. Similar setup.

I booted with a live USB, mounted / and /boot (my efi dir is /boot/EFI) and copied the newly created kernel from the wrong location to the right one:
Code:
cp /boot/EFI/EFI/gentoo/grubx64.efi /boot/EFI/gentoo/grubx64.efi

of course with the paths fixed according to the mount point.

With this I can boot.

I didn't find a bug report on bugzilla. I'll try to submit one later, if I can find the time...
_________________
Computers are like air conditioners, they stop working properly if you open Windows
Back to top
View user's profile Send private message
GDH-gentoo
Veteran
Veteran


Joined: 20 Jul 2019
Posts: 1534
Location: South America

PostPosted: Fri Mar 22, 2024 12:37 pm    Post subject: Reply with quote

I don't know how you people ran grub-install, but it has always installed grubx64.efi in /boot/efi/EFI/gentoo by default unless invoked with an --efi-directory option. This isn't new behaviour.

The need of --efi-directory and the correct value depends on where the EFI System Partition is mounted for any given computer. If it is mounted at /boot, then the correct invocation is grub-install --efi-directory=/boot, and grubx64.efi will be installed in /boot/EFI/gentoo indeed (i. e. directory \EFI\gentoo of the FAT filesystem of the ESP).
_________________
NeddySeagoon wrote:
I'm not a witch, I'm a retired electronics engineer :)
Ionen wrote:
As a packager I just don't want things to get messier with weird build systems and multiple toolchains requirements though :)
Back to top
View user's profile Send private message
osugi_sakae
n00b
n00b


Joined: 24 Oct 2002
Posts: 28
Location: Columbus, OH

PostPosted: Fri Mar 22, 2024 1:58 pm    Post subject: Reply with quote

Thanks for the info.

I think the question I have at this point is not so much how did grub64.efi get in /boot/efi/EFI/gentoo/, but why is grub not using that one and instead using the (very old, in my case) one in /boot/EFI/gentoo/?

Is there maybe a hierarchy of dirs that grub checks, and /boot/EFI/gentoo/ comes before /boot/EFI/EFI/gentoo/? The grub that is booting is the same one that installed the grub64.efi file, right? It seems like it should know where it put it.

Or am I misunderstanding something? I've not had to deal this much with boot stuff since the old days of LILO, so I'm not that familiar with all the modern intricacies.
_________________
I am not a number, I am a free man.
---- The Prisoner
Back to top
View user's profile Send private message
logrusx
Veteran
Veteran


Joined: 22 Feb 2018
Posts: 1538

PostPosted: Fri Mar 22, 2024 2:42 pm    Post subject: Reply with quote

I don't think /boot/efi/EFI has ever been the default. It was rather /boot/EFI with the ESP mounted on /boot.

Best Regards,
Georgi
Back to top
View user's profile Send private message
Slow_cyclist
n00b
n00b


Joined: 11 Apr 2009
Posts: 6

PostPosted: Mon Apr 15, 2024 3:54 pm    Post subject: Reply with quote

I had the same problem. In my case the solution was slightly different; to remove the whole folder of efi-files, and then re-run grub-install. I also had some old files lying around from having run grub-install with the incorrect --efi-directory (years ago). I seems like the upgrade of grub to 2.12 removed the ability of grub to cope with their presence.

In fact, having studied the matter for the first time in a long while, I appear to have been running grub-install with the wrong --efi-directory for years - /boot/EFI/ rather than /boot/. Somehow it's worked until now. (Just using the correct path now didn't solve the problem, though. I had to delete the spurious files).

Keep in mind, I'm not doing any dual-booting, so there was risk of removing something crucial to that.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum