#1091428 dkms no longer recommends linux-headers-* packages, leading to kernel headers absence

#1091428#5
Date:
2024-12-26 01:44:02 UTC
From:
To:
Hello,

It appears that in Trixie package `dkms` no longer recommends `linux-headers-*` packages, which leads to newer kernels not having headers installed, which in turn leads to DKMS being unable to build kernel modules.
I have encountered this issue with `zfs-dkms`, and although I have caught it before reboot, installed and built the kernel module, I still forgot to run `update-initramfs -u` and got an unbootable system.

While I see this change had a good reason behind it, it has introduced a different issue - I expect a bunch of systems to now end up without headers to build modules.

Maybe it makes sense to recommend installing the correct header package after install of DKMS or introduce a check that would throw/log a warning if no headers are found?

Best regards,
Ihor

#1091428#10
Date:
2025-08-13 22:42:14 UTC
From:
To:
Is the issue with not installing new headers?

I've checked my apt logs and it seems that "linux-headers-amd64:amd64
(6.12.38-1)" was removed by "autoremove" after I did system upgrade
yesterday, before new kernel was released. Makes sense -- nothing
"wanted" the package so it got out. Of course, after new update and
reboot I'm left with unbootable system. I will admit that dkms told me
that "Automatic installation of modules ... was skipped since the kernel
headers for this kernel do not seem to be installed" and I just didn't
notice that, but I think it will catch a lot of people by surprise as well.

As far as I understood, the header recommendation was removed because of
either dkms pulling wrong headers (#918918, #968763) or even pulling
kernels which are incompatible (#1059885). Creating a virtual package
and making it a dependency of dkms would be a solution to all of this,
unless I'm missing something. I'm not very well versed in how Debian
packaging works, otherwise I'd probably write a patch and test it