f-log

just another web log

25 Feb 2024:
grub does what now

You know what I love? My computer not booting.

Oh, wait, no. It's the opposite of that!!

I take great pains to try and keep my system humming along, including doing regular updates and following the messages from said updates.

So when Gentoo updated a load of packages as well as Grub, I thought I was prepared. Especially as I remembered having an issue with Grub's update last time

Update message

 * Messages for package sys-boot/grub-2.12-r1:

 * For information on how to configure GRUB2 please refer to the guide:
 *     https://wiki.gentoo.org/wiki/GRUB2_Quick_Start
 * 
 * Re-run grub-install to update installed boot code!
 * Re-run grub-mkconfig to update grub.cfg!
 *

My interpretation of that message

Those exclamation marks ! at the end of the Re-run instructions seem pretty definitive. So I had better run them!

My actions

As per my blog a case sensitive little grub

grub-install --efi-directory=/boot/EFI
grub-mkconfig

no errors!

So ...

What happened next

The system would not boot :(

Loading Linux 6.1.19-gentoo ...
error: symbol `grub_is_shim_lock_enabled` not found

press any key to continue

What I did

Googling around I found a lot of conflicting advice.

From disabling Secure Boot in your BIOS to simply selecting a different drive partition from the boot menu and running every command under that sun in between.

Nothing was working, so I

  1. Created a bootable USB drive with the Gentoo minimal image
  2. Found that my front panel USB ports are not recognised in the BIOS * face palms
  3. Used the ports on the motherboard directly
  4. mounted my /boot drive
  5. manually fixed the file location issue

(no chroot-ing or rerunning any grub commands)

Before:

ls -Rl /mnt/sda1/EFI

/mnt/sda1/EFI/:
total 2
drwxr-xr-x 2 root root 512 Nov 28  2022 BOOT
drwxr-xr-x 3 root root 512 Jul 13  2023 EFI
drwxr-xr-x 2 root root 512 Nov 28  2022 gentoo

/mnt/sda1/EFI/BOOT:
total 132
-rwxr-xr-x 1 root root 135168 Nov 29  2022 BOOTX64.EFI

/mnt/sda1/EFI/EFI:
total 1
drwxr-xr-x 2 root root 512 Jul 13  2023 gentoo

/mnt/sda1/EFI/EFI/gentoo:
total 136
-rwxr-xr-x 1 root root 139264 Feb 24 23:12 grubx64.efi

/mnt/sda1/EFI/gentoo:
total 132
-rwxr-xr-x 1 root root 135168 Nov 29  2022 grubx64.efi

Note the only file with a recent timestamp is in the /mnt/sda1/EFI/EFI/gentoo folder.

cp /mnt/sda1/EFI/EFI/gentoo/grub64.efi /mnt/sda1/EFI/gentoo/

and now

ls -Rl /mnt/sda1/EFI

/mnt/sda1/EFI/:
total 2
drwxr-xr-x 2 root root 512 Nov 28  2022 BOOT
drwxr-xr-x 3 root root 512 Jul 13  2023 EFI
drwxr-xr-x 2 root root 512 Nov 28  2022 gentoo

/mnt/sda1/EFI/BOOT:
total 132
-rwxr-xr-x 1 root root 135168 Nov 29  2022 BOOTX64.EFI

/mnt/sda1/EFI/EFI:
total 1
drwxr-xr-x 2 root root 512 Jul 13  2023 gentoo

/mnt/sda1/EFI/EFI/gentoo:
total 136
-rwxr-xr-x 1 root root 139264 Feb 24 23:12 grubx64.efi

/mnt/sda1/EFI/gentoo:
total 136
-rwxr-xr-x 1 root root 139264 Feb 25 11:29 grubx64.efi

Sync, umount and reboot

...

IT WORKS!!!

Apparently the grub-install command will add the /EFI to the end of the path specified in

grub-install --efi-directory=

so

grub-install --efi-directory=/boot/EFI

creates /boot/EFI/EFI

but it didn't use to ...

17 Feb 2024:
1kg filament finally used up

Very quick progress post.

I have finally used up a whole 1kg filament spool!

Here are some relevant posts tagged from the last 3 years.

and some bonus posts from 2018

loading results, please wait loading animateloading animateloading animate
[More tags]
rss feed

email

root

flog archives


Disclaimer: This page is by me for me, if you are not me then please be aware of the following
I am not responsible for anything that works or does not work including files and pages made available at www.jumpstation.co.uk I am also not responsible for any information(or what you or others do with it) available at www.jumpstation.co.uk In fact I'm not responsible for anything ever, so there!