Ubuntu 20.04 can be kept on Linux 5.4. This you must do

Ubuntu 20.04 with Linux 5.4

We have new versions of Ubuntu every six months, but the big ones, where they put all the meat on the grill and the most stable ones, come out even-numbered years in April. Users who choose the LTS versions do so because they need or prefer stability, but this can be adversely affected by kernel updates. Because, for example, Ubuntu 20.04 it was released with Linux 5.4, but since last week it has gone up to Linux 5.11.

Canonical doesn’t do things the wrong way, but I think it should include an “opt out” option to allow users of the LTS versions of Ubuntu to stay on the LTS version of the kernel. In an official way, like it or not, Ubuntu will upload the kernel in every point release, approximately every six months, but you can prevent me from updating the kernel to a higher one following these steps.

Ubuntu 20.04 and any LTS version without uploading the kernel

Before continuing, it must be explained that following these steps will not stop receiving support. The LTS kernel will continue to update, but to fix bugs. What it will not do is go up to another series, and will always be kept on Linux 5.4.x. With this explained, what you have to do is take these two steps:

  1. You have to remove the HWE meta packages (Hardware Enablement) with this command, changing «{image, headers}» by the numbering of what we want to eliminate (dpkg –list | grep linux-image in the terminal to see them all). This must be done with everyone except Linux 5.4:
sudo apt remove linux-{image,headers}-generic-hwe-20.04
  1. Once these packages are removed, you have to install the generic one:
sudo apt install linux-generic

Once that is done, the kernel will be updated, but to a 5.4.0.x that will receive security updates.

The above valid for any LTS version, but in the future “20.04” will also have to be changed. In this way, if Ubuntu and its kernel do well for us at the moment they release a Long Term Support version, we will make sure that a kernel update does not spoil the system.

Add Comment