You are not logged in.
So the issue started by my PC freezing, which it does weirdly often. After rebooting, grub spit out "symbol 'grub_is_shim_lock_enabled' not found". While in BIOS, if looking at bootable devices, this grub is called 'UEFI boot'
After a while I "fixed" the error. The fix in question was to install a new grub, which is called "GRUB" in BIOS:
# grub-install --target=x86_64-efi --efi-directory=/boot/EFI --bootloader-id=GRUB --disable-shim-lock"GRUB" works fine and boots correctly. However it is installed on sda2, on /boot/, which is a mistake because I meant to override sda1 ('UEFI boot') to basically remove it and create a new one in its place. I forgot to mount sda1 to /boot/. So now I have 2 bootable grubs, 'UEFI boot' on sda1 (the smaller partition meant for booting), and 'GRUB' on sda2 (the larger partition where Arch is).
Now, after noticing this I thought 'Hmm thats not correct, lets fix that by actually mounting sda1 and installing a new grub there!'. The new grub was called 'GRUBBER':
$~ sudo grub-install --target=x86_64-efi --efi-directory=/boot/EFI --bootloader-id=GRUBBER --disable-shim-lockI now have 3 bootable grubs. GRUBBER doesn't work at all. It shows up in BIOS but just freezes BIOS for a second. UEFI does not work, it still shows "symbol 'grub_is_shim_lock_enabled' not found" when I try to boot into Arch. GRUB is the only one that works, but it sits on sda2 which I assume is a bad thing.
Any help on how to get out of this situation would be appreciated.
The main question is:
How do I remove GRUBBER and UEFI Boot?
Sub questions are:
Is it bad that I boot into the grub on sda2 directly rather than through the smaller partition?
Can I actually remove and put a new GRUB on sda1 without bricking everything?
Last edited by Cosmonaught (2024-09-27 21:40:47)
Offline
Most UEFIs will remove an entry if you delete the corresponding EFI binary/folder, i.e. /boot/EFI/UEFI boot and /boot/EFI/GRUBBER. should that not be the case for some reason, look at efibootmgr -B option. https://wiki.archlinux.org/title/Unifie … efibootmgr
It will generally not matter where you're running GRUB from, what's much more important where you actually mounted things to and whether e.g. your kernel images now land on a partition or root and this potentially being the trip up reason for the other entry. To properly answer those sub questions mount "/dev/sda1" to the mount point you think is correct (did you use /boot or /boot/EFI?) and post
lsblk -f
ls -lR /bootunmount and repeat for "/dev/sda2" (general note: these identifiers are not stable, make sure they were not accidentally mixed up between tries and you ultimately operating on the same baseline
Offline
Hey thanks for the answer! Sorry to tell you I solved it my own very painful and stupid way.
I chose to try to rm -rf /boot on both sda1 and sda2 which removed everything. I had installed a grub before i rebooted but it sadly did not work for some reason so for the past 2 hours I have been trying to make a new grub.cfg file but it never detected Arch as a bootable os (os-prober does not work from within arch-chroot at all).
Your solution makes a lot of sense, I think that's the way forward.
Solution is:
Delete the unneeded EFI files inside /boot/EFI on both the main and bootable partitions.
If you need to you can delete all, or some, of /boot on either partition and reinstall but make sure you have a backup of your grub.cfg file and make sure that the backup works before you reboot.
PS: If you happen to find yourself in a never ending loop of trying and failing to find Arch with grub-mkconfig or os-prober, run pacman -S linux. os-prober should find it now.
Offline