Search code examples
linuxlinux-kerneldebianopenmediavaultlinux-kernel-headers

Unable to install linux headers after kernel update


I recently did a full system upgrade on my OpenMediaVault machine. The update included a kernel update. After the update, I realized that my nvidia card was no longer working as intended, as the drivers were not correctly loaded. After some troubleshooting, I found that the linux-headers-amd64 package was not installed and that no headers were on the system. After I've tried to download it, I get this error:

# apt-get install linux-headers-amd64
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
 linux-headers-amd64 : Depends: linux-headers-6.1.0-0.deb11.21-amd64 (= 6.1.90-1~bpo11+1) but it is not installable
E: Unable to correct problems, you have held broken packages.

Here's some informations about the system:

# uname -a
Linux openmediavault 6.1.0-0.deb11.21-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.1.90-1~bpo11+1 (2024-05-06) x86_64 GNU/Linux
# dpkg -l | grep linux-
ii  binutils-x86-64-linux-gnu          2.35.2-2                             amd64        GNU binary utilities, for x86-64-linux-gnu target
ii  firmware-linux-free                20200122-1                           all          Binary firmware for various drivers in the Linux kernel
ii  firmware-linux-nonfree             20230210-5~bpo11+1                   all          Binary firmware for various drivers in the Linux kernel (metapackage)
ii  linux-base                         4.6                                  all          Linux image base package
ii  linux-compiler-gcc-10-x86          5.10.221-1                           amd64        Compiler for Linux on x86 (meta-package)
ii  linux-image-6.1.0-0.deb11.21-amd64 6.1.90-1~bpo11+1                     amd64        Linux 6.1 for 64-bit PCs (signed)
ic  linux-image-6.1.0-0.deb11.7-amd64  6.1.20-2~bpo11+1                     amd64        Linux 6.1 for 64-bit PCs (signed)
ic  linux-image-amd64                  6.1.90-1~bpo11+1                     amd64        Linux for 64-bit PCs (meta-package)
ii  linux-kbuild-5.10                  5.10.221-1                           amd64        Kbuild infrastructure for Linux 5.10
ii  linux-libc-dev:amd64               5.10.221-1                           amd64        Linux support headers for userspace development

I've done apt-get update and apt-get upgrade multiple times already and the system is fully up to date.

When I do apt-cache search linux-headers I can see that the linux-headers-6.1.0-0.deb11.22-amd64 exists, but no sign of the one I need

Note: as of now, all nvidia drivers have been uninstalled, I will reinstall them once the kernel-headers are installed


Solution

  • I've found the solution.

    I had to run omv-release-upgrade to upgrade to version 7 of OpenMediaVault. Once fully upgraded, I had to first reset the network configuration with omv-firstaid and then I could update and install linux-image-amd64 which installed a new kernel. I could then install the headers for that kernel without any more trouble.