Linux kernel flavours in modern releases

Nowadays (18.04+) there are much more kernel flavours, and not all of them are well described. I see those ones:

  • generic, the default one, with possible -hwe branch;
  • virtual — same as generic but excluding modules-extra. Can have -hwe branch too;
  • kvm;
  • azure, aws, gcp, gke — targeting cloud providers;
  • oem — who is that?;
  • oracle — what Oracle systems?

So, how do I choose? For example, VPS probably doesn't need generic kernel, virtual would require way less valuable disk space, but maybe kvm is even better? What is the difference in the first place?

Wiki has a page on the subject (https://wiki.ubuntu.com/Kernel/Dev/Flavours), but it is way outdated.


Solution 1:

Ubuntu Kernel Team has a dedicated web site that links to various reports on kernel packages and versions on Ubuntu. From there, see package versions to quickly view what kernels are currently maintained on available Ubuntu releases.

List of kernel flavours prepackaged for Ubuntu:

  • linux that provides generic kernels (12.04+)
  • linux-hwe that provides Ubuntu LTS enablement stack
  • linux-hwe-edge has kernels newer than linux-hwe
  • linux-kvm that provides kernels for virtual systems (16.04+)
  • linux-aws that provides kernels for Amazon Web Services (14.04+)
  • linux-aws-edge has kernels newer than linux-aws (16.04+)
  • linux-aws-hwe may provide kernels newer than linux-aws-edge
  • linux-azure that provides kernels for Azure systems (14.04+)
  • linux-euclid that provides kernels for Intel Euclid systems (16.04)
  • linux-gcp that provides kernels for Google Cloud Platform (16.04+)
  • linux-gcp-edge may provide kernels newer than linux-gcp (18.04)
  • linux-oem that provides kernels for OEM systems including Dell, Lenovo, Acer, etc. (16.04+)
  • linux-oem-osp1 has kernels newer than linux-oem (18.04+)
  • linux-oracle that provides kernels for Oracle systems (16.04+)
  • linux-oracle-edge has kernels newer than linux-oracle (no release yet)
  • linux-raspi2 that provides kernels for the BCM2709 architecture (16.04+)
  • linux-snapdragon that provides kernels for the Qualcomm Snapdragon 410c architecture (16.04+)

What have been listed here excludes some meta and transitional packages that are not found in the package versions, but otherwise found in the Ubuntu Packages Search. Each description has been adapted from the Ubuntu packages or alternatively description from the apt-cache show <package> command.

So, how do I choose?

Admittedly, there is no definite guide for choosing which kernels to use case by case.

End-users usually do not need to choose a different Linux kernel, for example, when installing Ubuntu Desktop in a virtual machine--it will just work. If the provided download images do not fulfill the needs, and instead user had to decide which kernels to use, then most likely the user needs to ask whomever that provides the service to run Ubuntu. They should have the answer.

What is the difference in the first place?

In one word: Optimization.

End-users usually do not go as far to find out what things are optimized for each and every kernels prepackaged for Ubuntu. There is no easy way to know what is the difference in the first place, unless the documentation was done properly. There is one place to find out: Changelog.

The changelogs are specific to each package and the currently supported releases. For example, the changelog for linux in bionic has noted more changes related to optimization for various platforms in general, whilst the changelog for linux-kvm in bionic has noted more changes related to the containers (OS-level virtualization).

TL;DR End-users do not need to choose and instead use whichever kernels included in the Ubuntu images. Else, look for someone with the knowledge--the service provider or whomever that is.