0

I'm having trouble finding an answer on this from the Googles. I'm using Debian Stretch (which I shamelessly promote as being a great experience).

However, I noticed my kernel was upgrading with basic apt upgrade commands. These upgrades were not reflected in linux-image obtained with apt search linux-image or dpkg --list | grep linux-image

Example:

$ apt search linux-image
  linux-image-4.8.0-2-amd64/now 4.8.15-2 amd64 [installed,local]
  Header files for Linux 4.8.0-2-amd64

and

$ dpkg --list | grep linux-image
  ii  linux-image-4.8.0-2-amd64             4.8.15-2 

Also linux-headers- they're 100% analogous to one another. Example:

$ apt search linux-headers
  linux-headers-4.8.0-2-amd64/now 4.8.15-2 amd64 [installed,local]
  Header files for Linux 4.8.0-2-amd64

and

$ dpkg --list | grep linux-headers
  ii  linux-headers-4.8.0-2-amd64           4.8.15-2    

The same goes for grub, it does not update the name of the image, even when using update-grub. I am not assuming this bug, but it seems like an odd default behavior. What is the thinking behind the installed image and header versions not being reflected in their names?

4

The kernel version stored in the package name, e.g. 4.8.0-2 in the linux-image-4.8.0-2-amd64 and linux-headers-4.8.0-2-amd64 packages, reflects the kernel ABI: it only changes when the ABI changes (which means that external packages depending on the kernel ABI, in particular out-of-tree kernel modules, need to be rebuilt). By convention in Debian, the version used is the upstream kernel version, with a .0 suffix, ignoring the stable release number, followed by a hyphen and a monotonically increasing number which is bumped whenever the ABI changes. Thus all versions of the 4.8.0-2 kernel packages are ABI-compatible, and the ABI was bumped once in the 4.8 series.

This approach has a couple of advantages: you automatically get compatible kernel upgrades, without needing a meta-package update (linux-image-amd64, which is maintained in another source package); and you don't need to recompile out-of-tree modules for every kernel update.

In Debian, GRUB ignores the specific version of the kernel, it just lists the package name. This is perhaps less than ideal, but it doesn't matter all that much because you can't have two different ABI-compatible kernels installed, so you don't need to be able to choose between them.

You'll find more information in the Debian kernel handbook, in particular the section on versions and ABIs.

  • Thanks for clearing that up, that was really helpful, and so comprehensive! I hope this post helps other people, too. – AveryFreeman Feb 12 '17 at 5:01

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.