Fedora Account System
Red Hat Associate
Red Hat Customer
Description of problem: When using systemd-boot, akmods wrongly reports that kernel source is not installed Version-Release number of selected component (if applicable): dnf list --installed \*akmods\* Installed packages (available for reinstall, available for upgrade) akmods.noarch 0.6.2-9.fc44 fedora How reproducible: Always Steps to Reproduce: 1. Use systemd-boot 2. Try to compile a custom module with akmods (in my case Nvidia), i.e run akmods (when the said module is not installed, so maybe uninstall it first) Actual results: sudo akmods Could not find files needed to compile modules for /boot/efi//3df672eef9054350b62cccb2eae56a38/7.1.3-201.fc44.x86_64/linux Are the development files for kernel /boot/efi//3df672eef9054350b62cccb2eae56a38/7.1.3-201.fc44.x86_64/linux or the appropriate kernel-devel package installed? Checking kmods exist for 7.1.3-201.fc44.x86_64 [ OK ] Expected results: The error message is not emitted. Additional info: Problem seems to be in the check_default_kernel() function. When after these two lines: if command -v grubby >/dev/null 2>&1 ; then default_kernel=$(grubby --default-kernel | sed -e 's/^.*vmlinuz-//') this code block is added, the problem disappears: if [[ "${default_kernel}" == *vmlinuz-* ]]; then default_kernel="${default_kernel##*vmlinuz-}" elif [[ "${default_kernel}" == */linux ]]; then default_kernel="$(basename "$(dirname "${default_kernel}")")" fi It seems the problem is only cosmetical - the build suceeds, only the error message is wrong. Disclosure: I used Claude to diagnose the bug. I verified the fix and wrote this bug report with my words.
Thanks for the report. Can you show the output of the "grubby --default-kernel" command under systemd-boot ? I assume you are using sdubby to have a proper grubby implementation ? (please show the version of sdubby)
sudo grubby --default-kernel /boot/efi//3df672eef9054350b62cccb2eae56a38/7.1.3-201.fc44.x86_64/linux dnf list --installed \*sdubby\* sdubby.noarch 1.0-14.fc44 fedora If I get it correctly, sdubby overwrites /usr/bin/grubby and does not have a separate binary.
> If I get it correctly, sdubby overwrites /usr/bin/grubby and does not have a separate binary. Both sdubby and grubby provide a /usr/bin/grubby implementation, but the former works with systemd-boot while the latter works with grub2 and others. Also can you show the output of: bootctl is-installed and bootctl list --json=short also verify if jq is installed on your system ? Maybe it's just a matter to change the preference of the tool to be used...
sudo bootctl is-installed yes sudo bootctl list --json=short [{"type":"type1","source":"esp","id":"3df672eef9054350b62cccb2eae56a38-7.1.3-201.fc44.x86_64.conf","path":"/boot/efi/loader/entries/3df672eef9054350b62cccb2eae56a38-7.1.3-201.fc44.x86_64.conf","root":"/boot/efi","title":"Fedora Linux 44 (Forty Four)","showTitle":"Fedora Linux 44 (Forty Four) (7.1.3-201.fc44.x86_64)","sortKey":"fedora","version":"7.1.3-201.fc44.x86_64","machineId":"3df672eef9054350b62cccb2eae56a38","options":"root=UUID=a84d55b0-4c25-4bfe-a78e-323a78963d67 systemd.machine_id=3df672eef9054350b62cccb2eae56a38","linux":"/3df672eef9054350b62cccb2eae56a38/7.1.3-201.fc44.x86_64/linux","initrd":["/3df672eef9054350b62cccb2eae56a38/7.1.3-201.fc44.x86_64/initrd"],"isReported":true,"isDefault":true,"isSelected":true,"addons":null,"cmdline":"root=UUID=a84d55b0-4c25-4bfe-a78e-323a78963d67 systemd.machine_id=3df672eef9054350b62cccb2eae56a38"},{"type":"type1","source":"esp","id":"3df672eef9054350b62cccb2eae56a38-7.1.3-200.fc44.x86_64.conf","path":"/boot/efi/loader/entries/3df672eef9054350b62cccb2eae56a38-7.1.3-200.fc44.x86_64.conf","root":"/boot/efi","title":"Fedora Linux 44 (Forty Four)","showTitle":"Fedora Linux 44 (Forty Four) (7.1.3-200.fc44.x86_64)","sortKey":"fedora","version":"7.1.3-200.fc44.x86_64","machineId":"3df672eef9054350b62cccb2eae56a38","options":"root=UUID=a84d55b0-4c25-4bfe-a78e-323a78963d67 systemd.machine_id=3df672eef9054350b62cccb2eae56a38","linux":"/3df672eef9054350b62cccb2eae56a38/7.1.3-200.fc44.x86_64/linux","initrd":["/3df672eef9054350b62cccb2eae56a38/7.1.3-200.fc44.x86_64/initrd"],"isReported":true,"isDefault":false,"isSelected":false,"addons":null,"cmdline":"root=UUID=a84d55b0-4c25-4bfe-a78e-323a78963d67 systemd.machine_id=3df672eef9054350b62cccb2eae56a38"},{"type":"type1","source":"esp","id":"3df672eef9054350b62cccb2eae56a38-7.0.13-200.fc44.x86_64.conf","path":"/boot/efi/loader/entries/3df672eef9054350b62cccb2eae56a38-7.0.13-200.fc44.x86_64.conf","root":"/boot/efi","title":"Fedora Linux 44 (Forty Four)","showTitle":"Fedora Linux 44 (Forty Four) (7.0.13-200.fc44.x86_64)","sortKey":"fedora","version":"7.0.13-200.fc44.x86_64","machineId":"3df672eef9054350b62cccb2eae56a38","options":"rhgb quiet root=UUID=a84d55b0-4c25-4bfe-a78e-323a78963d67 systemd.machine_id=3df672eef9054350b62cccb2eae56a38","linux":"/3df672eef9054350b62cccb2eae56a38/7.0.13-200.fc44.x86_64/linux","initrd":["/3df672eef9054350b62cccb2eae56a38/7.0.13-200.fc44.x86_64/initrd"],"isReported":true,"isDefault":false,"isSelected":false,"addons":null,"cmdline":"rhgb quiet root=UUID=a84d55b0-4c25-4bfe-a78e-323a78963d67 systemd.machine_id=3df672eef9054350b62cccb2eae56a38"},{"type":"type1","source":"esp","id":"3df672eef9054350b62cccb2eae56a38-0-rescue.conf","path":"/boot/efi/loader/entries/3df672eef9054350b62cccb2eae56a38-0-rescue.conf","root":"/boot/efi","title":"Fedora Linux 44 (Forty Four) - Rescue Image","showTitle":"Fedora Linux 44 (Forty Four) - Rescue Image","version":"7.0.10-201.fc44.x86_64","machineId":"3df672eef9054350b62cccb2eae56a38","options":"rhgb root=UUID=a84d55b0-4c25-4bfe-a78e-323a78963d67 quiet","linux":"/3df672eef9054350b62cccb2eae56a38/0-rescue/linux","initrd":["/3df672eef9054350b62cccb2eae56a38/0-rescue/initrd"],"isReported":true,"isDefault":false,"isSelected":false,"addons":null,"cmdline":"rhgb root=UUID=a84d55b0-4c25-4bfe-a78e-323a78963d67 quiet"},{"type":"auto","source":"esp","id":"auto-reboot-to-firmware-setup","path":"/sys/firmware/efi/efivars/LoaderEntries-4a67b082-0a4c-41cf-b6c7-440b29bb8c4f","title":"Reboot Into Firmware Interface","showTitle":"Reboot Into Firmware Interface","isReported":true,"isDefault":false,"isSelected":false,"addons":null}] jq --version jq-1.8.1
Thanks for the answer on this. I should be able to setup a reproduce VM in order to properly test this. Can you report which doc you have followed to setup systemd-boot (do you have secure boot enabled ?) The previous bootctl output is likely truncated, can you test the following instead ? bootctl list --json=short 2>/dev/null |jq -r '.[] | select(.isDefault).version' Also I wonder if jq can be assumed to be installed (or need to be enforced) ? which components can bring it in your local system ? rpm -e jq --test Basically, using the bootctl over the grubby output should likely be more relevant instead of parsing back and both from more or less broken assumptions. I'm going to prefer using bootctl instead. (which could also works under grub2 either or not "bootctl is-installed" returns true.
I do not think it is really properly documented anywhere. To install with systemd-boot use netinstall(Fedora Everything here: https://fedoraproject.org/misc/), and before booting it, in grub, press E and add inst.sdboot to the kernel (?) parametres. Then it will install with systemd-boot. sudo bootctl list --json=short 2>/dev/null |jq -r '.[] | select(.isDefault).version' [sudo] password for drew: 7.1.3-201.fc44.x86_64 rpm -e jq --test does not do anything. Not sure if jq is available by default or not.
FEDORA-2026-a175fbd017 (akmods-0.6.2-14.fc45) has been submitted as an update to Fedora 45. https://bodhi.fedoraproject.org/updates/FEDORA-2026-a175fbd017
FEDORA-2026-a175fbd017 (akmods-0.6.2-14.fc45) has been pushed to the Fedora 45 stable repository. If problem still persists, please make note of it in this bug report.
I've added a different fix that now uses bootctl by default. What was difficult is to consider older rhel because isDefault is not available and even the json output is missing on EL8 But bootctl is-installed is harder to achieve there unless using a dedicated non standard systemd-boot. I've also fixed a broken assumption about expected path for testing vmlinuz location, so all in all fixing the value will be less needed. Please test the fix in this report https://koji.fedoraproject.org/koji/taskinfo?taskID=148443897 I've referenced the issue on the commit message, that should count as "reported by" Thanks for the report.
Bodhi ticket for f44: https://bodhi.fedoraproject.org/updates/FEDORA-2026-f0ca40a976
Thanks. Though, weirdly, without me touching anything (bar dnf update on July 18), I cannot reproduce the error on my system, so I cannot really verify the fix either. But I guess you reproduced it before fixing, right :-)?
(In reply to Tomáš Hnyk from comment #11) > Thanks. Though, weirdly, without me touching anything (bar dnf update on > July 18), I cannot reproduce the error on my system, so I cannot really > verify the fix either. But I guess you reproduced it before fixing, right > :-)? Note quite, I never managed to get into a situation where kernel was located in /boot/efi//3df672eef9054350b62cccb2eae56a38/7.1.3-201.fc44.x86_64/linux But there are many cases and possibilities !
Yeah, that is where I have them :-). I remember when installing, I was not sure where to mount EFI. Per bootloader spec: https://uapi-group.org/specifications/specs/boot_loader_specification/#mount-points I seemed to have choosen the one unrecommended mountpoint :-).