this post was submitted on 20 Nov 2024
6 points (100.0% liked)

Linux 101 stuff. Questions are encouraged, noobs are welcome!

1069 readers
7 users here now

Linux introductions, tips and tutorials. Questions are encouraged. Any distro, any platform! Explicitly noob-friendly.

founded 1 year ago
MODERATORS
 

cross-posted from: https://feddit.nl/post/24216224

Problem: new kernels not showing up in boot menu

I can install new kernels, and I see them in /boot/efi/{PARITION_UUID}, but they don't show up in the systemd-boot menu.

Data

Normally, Fedora shows the 3 latest kernels (plus a recovery kernel) in the boot menu. I only see up to 6.11.6 in the systemd-boot menu. On the /boot partition, I see much newer kernel versions (both labeled fc40 and fc41)

➜  ~ sudo ls /boot/efi/808f2c9ae4464f1ab2f0a7d367da1b30 -l
total 20
drwx------. 2 root root 4096 Jul  4 19:25 0-rescue
drwx------. 2 root root 4096 Nov  8 12:42 6.11.6-200.fc40.x86_64
drwx------. 2 root root 4096 Nov 18 17:57 6.11.7-200.fc40.x86_64
drwx------. 2 root root 4096 Nov 12 16:47 6.11.7-300.fc41.x86_64
drwx------. 2 root root 4096 Nov 20 10:10 6.11.8-300.fc41.x86_64
➜  ~ sudo ls /boot/efi/808f2c9ae4464f1ab2f0a7d367da1b30/6.11.8-300.fc41.x86_64 -l 
total 72484
-rwx------. 1 root root 57917440 Nov 20 10:10 initrd
-rwx------. 1 root root 16304488 Nov 20 10:10 linux

Systemd-boot

I started with other distros on this disk before I settled on Fedora. Since I was happy with systemd-boot and its automatic discovery of boot entries, I chose to use systemd-boot when I installed Fedora. I know that Grub is the default bootloader and manager for Fedora, but I have systemd-boot. It's an option in the installer.

Major OS upgrades and rolling back the rollback

Last weekend I upgraded from Fedora 40 KDE Spin to Fedora 41. On the next Monday morning, screensharing in Edge Browser had stopped working, so I rolled back to a Fedora 40 snapshot with BTRFS Assistant. This turned out to be an issue in the latest Edge version, not in the underlying OS, so I rolled back the rollback and went to the Monday evening snapshot, then upgraded my packages.

Ever since, I'm not seeing new Kernels in the systemd-boot menu. Any idea how I can fix this, short of a fresh install of Fedora 41 KDE?

top 2 comments
sorted by: hot top controversial new old
[–] timewarp 2 points 1 day ago (1 children)

What initram app does Fedora use? Is it dracut? Have you tried changing the kernel arguments to load one of the other ones to see if they're working? Have you looked in your systemd-boot entries files to see if the issue might be from there? I haven't used dracut extensively but if it is anything like mkinitcpio then there is prob some hook that is supposed to write new entries to systemd-boot conf file and something got forked there. It should be a pretty easy fix though.

[–] [email protected] 1 points 23 hours ago* (last edited 22 hours ago)

Thanks for the pointers!

/etc/dracut.conf and /etc/dracut/conf.d are empty, except for comments. According to my search skills, that is correct, as dracut defaults are fine.

systemd-boot entries files were missing for the missing kernels. bootctl update and bootctl install showed error codes, probably bescause systemd-boot was set up by a partition/OS that I no longer have. /usr/lib/systemd/boot was empty, but /boot/efi/EFI/systemd contained the systemdx64 efi file.

I ended up manually creating a new boot entry for the new 6.11.8 kernel, based on the one I booted off of, and due to failures in bootctl install and bootctl update copied over the /boot/efi/EFI/systemd/systemd-bootx64.efi file to the /usr/lib/systemd/boot/efi dir, then re-triggering bootctl install. I have no idea if this fixes the issue, but the Linux Specialist ChatGPT took me this way based off of your suggestion and my OP.

I will be back here if the issue persists. Hopefully this systemd-boot failing fixes it.