3

My current system version is 18.04 LTS, ​​kernel 4.15.0-45-generic. Due to CVE-2019-11477, I want to update the kernel to the fixed version linux-image-4.15.0-52-generic.
I tried sudo apt dist-upgrade and nothing happened. But when I use apt search linux-image-4.15.0-52, this kernel exists in the official repo. Then I installed it manually.

According to Karel's answer, I tested it on the new VPS, and both of them can update the kernel.So I think it is a file in the system is corrupted. How to check it?

root@ubuntu:/home/username# uname -a
Linux ubuntu 4.15.0-45-generic #48-Ubuntu SMP Tue Jan 29 16:28:13 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux
root@ubuntu:/home/username# apt update
Hit:1 http://archive.ubuntu.com/ubuntu bionic InRelease                                                               
Get:2 http://security.ubuntu.com/ubuntu bionic-security InRelease [88.7 kB]                                           
Hit:3 http://ppa.launchpad.net/ondrej/nginx-mainline/ubuntu bionic InRelease                                                   
Hit:4 https://deb.nodesource.com/node_10.x bionic InRelease                                                                    
Get:5 http://archive.ubuntu.com/ubuntu bionic-updates InRelease [88.7 kB]                                  
Get:6 http://archive.ubuntu.com/ubuntu bionic-backports InRelease [74.6 kB]
Fetched 252 kB in 2s (110 kB/s)    
Reading package lists... Done
Building dependency tree       
Reading state information... Done
All packages are up to date.
root@ubuntu:/home/username# apt search linux-image-4.15.0-52
Sorting... Done
Full Text Search... Done
linux-image-4.15.0-52-generic/bionic-updates 4.15.0-52.56 amd64
  Signed kernel image generic

linux-image-4.15.0-52-lowlatency/bionic-updates 4.15.0-52.56 amd64
  Signed kernel image lowlatency
root@ubuntu:/home/username# apt upgrade
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Calculating upgrade... Done
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
root@ubuntu:/home/username# apt dist-upgrade
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Calculating upgrade... Done
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.

new vps with 18.04 LTS

Welcome to Ubuntu 18.04.2 LTS (GNU/Linux 4.15.0-50-generic x86_64)

root@vultr:~# apt upgrade
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Calculating upgrade... Done
The following NEW packages will be installed:
  linux-headers-4.15.0-52 linux-headers-4.15.0-52-generic linux-image-4.15.0-52-generic
  linux-modules-4.15.0-52-generic linux-modules-extra-4.15.0-52-generic
The following packages will be upgraded:


root@vultr:~# apt dist-upgrade 
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Calculating upgrade... Done
The following NEW packages will be installed:
  linux-headers-4.15.0-52 linux-headers-4.15.0-52-generic linux-image-4.15.0-52-generic
  linux-modules-4.15.0-52-generic linux-modules-extra-4.15.0-52-generic
The following packages will be upgraded:

apt-cache policy linux-image-generic

root@ubuntu:/home/username# apt-cache policy linux-image-generic
linux-image-generic:
  Installed: (none)
  Candidate: 4.15.0.52.54
  Version table:
     4.15.0.52.54 500
        500 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 Packages
     4.15.0.51.53 500
        500 http://security.ubuntu.com/ubuntu bionic-security/main amd64 Packages
     4.15.0.20.23 500
        500 http://archive.ubuntu.com/ubuntu bionic/main amd64 Packages
  • You're missing the required metapackages. See my answer. – Thomas Ward Jun 18 at 13:55
5

Something you did on your system removed the metapackage that makes those upgrades "just work".

The linux-image-generic and linux-headers-generic packages track the latest released kernel version for your system - 4.15.0 - and you need to have them installed to get prompted for upgrades.

sudo apt install linux-image-generic linux-headers-generic should be sufficient to do this. This should also pull in the version of the kernel package you are after, though it seems whatever mirror you're on doesn't have -52.56 but -52.54.

3

Linux kernel 4.15.0-52 is in the default Ubuntu 18.04 repositories. Update the software in Ubuntu 18.04 and it will update the kernel to 4.15.0-52. This is how I did it (I didn't use sudo apt-get dist-upgrade).

sudo apt update  
sudo apt upgrade   

Results of apt policy linux-image-4.15.0-52-generic after updating the software in Ubuntu 18.04:

$ apt policy linux-image-4.15.0-52-generic
linux-image-4.15.0-52-generic:
  Installed: 4.15.0-52.56
  Candidate: 4.15.0-52.56
  Version table:
 *** 4.15.0-52.56 500

Reboot Ubuntu to boot with the newly installed kernel. Then the results of uname -a will show that Ubuntu 18.04 is using the latest installed kernel version.

  • I tested it on a new vps, as you said. but the first thing I tried was apt update &apt upgrade. – maP1E bluE Jun 18 at 12:51
  • Just a typo, I reverted to 4.15.0-45, then re-attempt and added the output to the question. Maybe something is broken on my system? – maP1E bluE Jun 18 at 13:21
  • @maP1EbluE show the output of apt-cache policy linux-image-generic please. As an edit to your question. – Thomas Ward Jun 18 at 13:48
  • @maP1EbluE the issue is those generic metapackages aren't installed. You need thsoe to get "continued" updates to the kernel version. See my answer. – Thomas Ward Jun 18 at 13:55

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.