A
A
Alexey R2021-04-13 13:53:09
linux
Alexey R, 2021-04-13 13:53:09

How to block hwe update of linux kernel?

Good afternoon. Please tell me how to block kernel updates when updating the system. Looked on the Internet at various sources. It's usually recommended to use
sudo apt-mark hold linux-image-generic linux-headers-generic , but that doesn't help the kernel is still updated to the latest available version. Now it is 5.04-71. I also tried to edit the file /etc/apt/apt.conf.d/50unattended-upgrades in this way

// List of packages to not update (regexp are supported)
Unattended-Upgrade::Package-Blacklist {
        "linux-generic";
        "linux-image-generic";
        "linux-headers-generic";
//      "vim";
//      "libc6";
//      "libc6-dev";
//      "libc6-i686";
};

The same is still being updated! Please tell me how to disable the kernel update !?
Thank you very much!

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
Sergey Karbivnichy, 2021-04-13
@hottabxp

It bored me too. I confirm that none of the known ways to prevent Google from updating the kernel - does not work (at least in Ubuntu 20.04). Solved the problem quite easily. I found the kernel 4.19 through the browser in the Debian repository (it is supported until December 2025, but you can look for other versions) - downloaded 4 deb packages:

  1. linux-modules-4.19.0-041900-lowlatency_4.19.0-041900.201810221809_amd64.deb
  2. linux-headers-4.19.0-041900_4.19.0-041900.201810221809_all.deb
  3. linux-image-unsigned-4.19.0-041900-lowlatency_4.19.0-041900.201810221809_amd64.deb
  4. linux-headers-4.19.0-041900-lowlatency_4.19.0-041900.201810221809_amd64.deb

installed like this sudo dpkg -i *.deb
Next rebooted to the 4.19 kernel and removed the 5.xx kernel. All problem solved.
PS: If you look closely, you can see that there are 2 packages with headers, exactly 2 of them are needed. If one of them is missing, then the headers will not be installed (or they will be installed, but the packages will be broken - I don’t remember already). Headers do not affect the operation of the system, but their absence can cause problems when installing some software - for example, VirtualBox.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question