Bug 2333757 - initrd is not created if a dkms build fails leaving system boot to fail
Summary: initrd is not created if a dkms build fails leaving system boot to fail
Keywords:
Status: NEW
Alias: None
Product: Fedora
Classification: Fedora
Component: kernel
Version: 41
Hardware: Unspecified
OS: Linux
unspecified
high
Target Milestone: ---
Assignee: Kernel Maintainer List
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2024-12-22 17:56 UTC by Barry Scott
Modified: 2025-07-02 08:54 UTC (History)
21 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed:
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Barry Scott 2024-12-22 17:56:46 UTC
1. Please describe the problem:

If a dkms build fails as is not uncommon when the kernel version changes
the initrd is not created. This leave the system with grub set to boot a kernel
without an initrd.

2. What is the Version-Release number of the kernel:
Any of the 6.12 series

3. Did it work previously in Fedora? If so, what kernel version did the issue
   *first* appear?  Old kernels are available for download at
   https://koji.fedoraproject.org/koji/packageinfo?packageID=8 :

I do not recall this issue before, but that might be luck.

4. Can you reproduce this issue? If so, please provide the steps to reproduce
   the issue below:

Yes. I have a arm VM running under parallels. When its parallels tools build
that build fails.
May also be triggered by nvidia drivers being build in dkms (not verified).

There are a lot of reports of this issue on disccusion fedora
for example: https://discussion.fedoraproject.org/t/system-wont-boot-after-installing-kernel-core-6-12-5-200-fc41-x86-64/140259

5. Does this problem occur with the latest Rawhide kernel? To install the
   Rawhide kernel, run ``sudo dnf install fedora-repos-rawhide`` followed by
   ``sudo dnf update --enablerepo=rawhide kernel``:

Not tested

6. Are you running any modules that not shipped with directly Fedora's kernel?:

N/A

7. Please attach the kernel logs. You can get the complete kernel log
   for a boot with ``journalctl --no-hostname -k > dmesg.txt``. If the
   issue occurred on a previous boot, use the journalctl ``-b`` flag.


Reproducible: Always

Comment 1 Zvi Rozenberg 2024-12-24 14:27:05 UTC
Following Barry's comment on the fedora board, https://discussion.fedoraproject.org/t/system-updater-not-creating-initramfs-every-time-it-updates-the-kernel/140567/6

/*
Dec 24 14:06:34 fedora packagekitd[22655]: Error! hid-tmff2/0.82 is broken! Missing the source directory or the symbolic link pointing to it.
Dec 24 14:06:34 fedora packagekitd[22655]: Manual intervention is required!
Dec 24 14:06:34 fedora packagekitd[22921]: Sign command: /lib/modules/6.12.5-200.fc41.x86_64/build/scripts/sign-file
Dec 24 14:06:34 fedora packagekitd[22921]: Signing key: /var/lib/dkms/mok.key
Dec 24 14:06:34 fedora packagekitd[22921]: Public certificate (MOK): /var/lib/dkms/mok.pub
Dec 24 14:06:35 fedora packagekitd[22921]: Cleaning build area... done.
Dec 24 14:06:37 fedora packagekitd[22921]: Building module(s)...(bad exit status: 2)
Dec 24 14:06:37 fedora packagekitd[22921]: Failed command:
Dec 24 14:06:37 fedora packagekitd[22921]: 'make' KDIR=/lib/modules/6.12.5-200.fc41.x86_64/build
Dec 24 14:06:37 fedora packagekitd[23574]: Error! Bad return status for module build on kernel: 6.12.5-200.fc41.x86_64 (x86_64)
Dec 24 14:06:37 fedora packagekitd[23574]: Consult /var/lib/dkms/hid-tmff2/0.83/build/make.log for more information.
Dec 24 14:06:37 fedora packagekitd[22614]: Autoinstall on 6.12.5-200.fc41.x86_64 failed for module(s) hid-tmff2(10).
Dec 24 14:06:37 fedora packagekitd[23575]: Error! One or more modules failed to install during autoinstall.
Dec 24 14:06:37 fedora packagekitd[23575]: Refer to previous errors for more information.
Dec 24 14:06:37 fedora packagekitd[22575]: /usr/lib/kernel/install.d/40-dkms.install failed with exit status 11.
Dec 24 14:06:37 fedora packagekitd[1113]: warning: %posttrans(kernel-core-6.12.5-200.fc41.x86_64) scriptlet failed, exit status 11
*/

This resulted in the initramfs image not being created, so i had to run "dracut --kver 6.12.5-200.fc41.x86_64" manually.
The same issue occurred with 6.12.4-200, but i did not bother investigating it then, as i was busy with other things.
The previous kernel i was using is "6.11.10-300", which did not have this issue.

Comment 3 guimarcalsilva 2025-06-25 19:47:11 UTC
I hit this bug today after an update and a failed v4l2-loopback dkms module install. This is quite high severity because it renders the system unbootable. More info: https://discussion.fedoraproject.org/t/fedora-dead-after-kernel-6-15-3-200-update-no-initramfs-kernel-panic-unable-to-mount-root-fs-on-unknown-block-0-0/156457/

Comment 4 Justin M. Forbes 2025-06-27 16:15:59 UTC
This is one of the pitfalls of running out of tree modules.   I suppose there might be some method to work around it which is acceptable for some modules, but the most common out of tree modules are rather critical to system usage and creating an initramfs anyway would render an unbootable system which was more difficult to debug.


Note You need to log in before you can comment on or make changes to this bug.