Ubuntu – Why are there so many “linux-” kernel packages on the machine, and what do they all do

kernel

In my usage of Ubuntu, I have noticed a baffling array of different Linux kernel packages. Some of them are listed below:

  • linux-generic
  • linux-headers-generic
  • linux-headers-generic-pae
  • linux-headers-x.x.xx-xx
  • linux-headers-x.x.xx-xx-generic
  • linux-image-generic
  • linux-image-generic-pae
  • linux-image-x.x.xx-xx-generic
  • linux-image-x.x.xx-xx-generic-pae
  • linux-image-extra-x.x.xx-xx-generic
  • linux-image-extra-x.x.xx-xx-generic-pae

My question is, why are there so many different kernel packages, often for the same version number (e.g., 3.5.0-24), and what are the differences between them?

Edit to deduplicate: This question is not asking about the differences between generic, server, and virtual kernel packages; instead, it is asking about what all of those packages (as well as the ones in the list) are.

Best Answer

A kernel image package is related to the kernel image and modules which are loaded when your OS is booted. A header package provide files that are necessary to build out-of-tree kernel modules and/ or some other programs from source.

linux-image-generic

Usually you install the linux-image-generic package. That is a meta-package that does not ship any files itself. Instead, it depends on the latest kernel version provided by Ubuntu, for example linux-image-3.8.0-19-generic. This package is needed to receive kernel updates.

linux-headers-generic

A similar story holds for the linux-headers-generic package. You need to install this package if you use external kernel modules such as proprietary video drivers. The linux-generic package is a meta-package that ensures that both the linux-headers-generic and linux-image-generic packages are installed.

-generic-pae

This is a variant of the -generic packages. See What's the meaning of "-pae" at the end of kernel version?

linux-image-extra-*

This package was introduced with Ubuntu 12.10 and provides additional kernel modules (drivers). See What is the linux-image-extra package for and do I need it?.

Why multiple linux packages with the different version numbers?

The kernel is a critical piece of your system. Newer kernel versions may introduce a bug that make you unable to start your system successfully. With multiple kernels installed simultaneously, you can change the kernel version in the boot menu.