Still on previous 4.15 kernel after apt upgrade to 18.04.2

TL;DR

I can't force my ubuntu server, after upgrading to 18.04.2 from 18.04.1, to upgrade the kernel to corresponding 4.18 version.

Historical background

Yesterday I run

sudo apt upgrade

and had a conflict on one of the minor files (I think it was /etc/issue.net). Unfortunately, during solving that conflict I accidentally turned off putty... When I logged back in I had a lock on the apt database. I restarted my server and executed

sudo dpkg --configure -a

Then sudo apt upgrade went fine. After I restarted my server I saw, in the welcome message, that my system got updated but the kernel is still in 4.15 version.

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

What I have tried so far

I tried all the solutions I could find on the Internet but none of them helped:

rychu@RychuSRV:~$ sudo apt update
Hit:1 http://ppa.launchpad.net/certbot/certbot/ubuntu bionic InRelease
Hit:2 http://archive.ubuntu.com/ubuntu bionic InRelease
Get:3 http://archive.ubuntu.com/ubuntu bionic-updates InRelease [88.7 kB]
Hit:4 https://download.docker.com/linux/ubuntu bionic InRelease
Get:5 http://security.ubuntu.com/ubuntu bionic-security InRelease [88.7 kB]
Fetched 177 kB in 1s (161 kB/s)
Reading package lists... Done
Building dependency tree
Reading state information... Done
All packages are up to date.

rychu@RychuSRV:~$ sudo apt-get install linux-image-generic
Reading package lists... Done
Building dependency tree
Reading state information... Done
linux-image-generic is already the newest version (4.15.0.45.47).
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.

rychu@RychuSRV:~$ sudo apt-get install linux-generic
Reading package lists... Done
Building dependency tree
Reading state information... Done
linux-generic is already the newest version (4.15.0.45.47).
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.

rychu@RychuSRV:~$ uname -r && dpkg --get-selections linux
4.15.0-45-generic
linux-base                                      install
linux-firmware                                  install
linux-generic                                   install
linux-headers-4.15.0-45                         install
linux-headers-4.15.0-45-generic                 install
linux-headers-generic                           install
linux-image-4.15.0-23-generic                   deinstall
linux-image-4.15.0-29-generic                   deinstall
linux-image-4.15.0-30-generic                   deinstall
linux-image-4.15.0-32-generic                   deinstall
linux-image-4.15.0-33-generic                   deinstall
linux-image-4.15.0-34-generic                   deinstall
linux-image-4.15.0-36-generic                   deinstall
linux-image-4.15.0-38-generic                   deinstall
linux-image-4.15.0-39-generic                   deinstall
linux-image-4.15.0-42-generic                   deinstall
linux-image-4.15.0-43-generic                   install
linux-image-4.15.0-44-generic                   install
linux-image-4.15.0-45-generic                   install
linux-image-generic                             install
linux-modules-4.15.0-23-generic                 deinstall
linux-modules-4.15.0-29-generic                 deinstall
linux-modules-4.15.0-30-generic                 deinstall
linux-modules-4.15.0-32-generic                 deinstall
linux-modules-4.15.0-33-generic                 deinstall
linux-modules-4.15.0-34-generic                 deinstall
linux-modules-4.15.0-36-generic                 deinstall
linux-modules-4.15.0-38-generic                 deinstall
linux-modules-4.15.0-39-generic                 deinstall
linux-modules-4.15.0-42-generic                 deinstall
linux-modules-4.15.0-43-generic                 install
linux-modules-4.15.0-44-generic                 install
linux-modules-4.15.0-45-generic                 install
linux-modules-extra-4.15.0-23-generic           deinstall
linux-modules-extra-4.15.0-29-generic           deinstall
linux-modules-extra-4.15.0-30-generic           deinstall
linux-modules-extra-4.15.0-32-generic           deinstall
linux-modules-extra-4.15.0-33-generic           deinstall
linux-modules-extra-4.15.0-34-generic           deinstall
linux-modules-extra-4.15.0-36-generic           deinstall
linux-modules-extra-4.15.0-38-generic           deinstall
linux-modules-extra-4.15.0-39-generic           deinstall
linux-modules-extra-4.15.0-42-generic           deinstall
linux-modules-extra-4.15.0-43-generic           install
linux-modules-extra-4.15.0-44-generic           install
linux-modules-extra-4.15.0-45-generic           install

rychu@RychuSRV:~$ sudo update-grub
Sourcing file `/etc/default/grub'
Generating grub configuration file ...
Found linux image: /boot/vmlinuz-4.15.0-45-generic
Found initrd image: /boot/initrd.img-4.15.0-45-generic
Found linux image: /boot/vmlinuz-4.15.0-44-generic
Found initrd image: /boot/initrd.img-4.15.0-44-generic
Found linux image: /boot/vmlinuz-4.15.0-43-generic
Found initrd image: /boot/initrd.img-4.15.0-43-generic
Adding boot menu entry for EFI firmware configuration
done

rychu@RychuSRV:~$ sudo reboot

And...

Welcome to Ubuntu 18.04.2 LTS (GNU/Linux 4.15.0-45-generic x86_64)
rychu@RychuSRV:~$ uname -r
4.15.0-45-generic

I also tried

rychu@RychuSRV:~$ sudo do-release-upgrade
Checking for a new Ubuntu release
There is no development version of an LTS available.
To upgrade to the latest non-LTS develoment release
set Prompt=normal in /etc/update-manager/release-upgrades.

Please help.


Solution 1:

You can upgrade kernel and keep it getting upgraded to future point Ubuntu releases by running

sudo apt install linux-generic-hwe-18.04

As for now it will install the 4.18 kernel.

Solution 2:

I think you should be happy to stay with the 4.15 kernel series

From a conversation in an Ubuntu mail forum, an answer by Adam Conrad,

On Tue, Feb 05, 2019 at 11:53:22AM +0100, Nio Wiklund wrote: >

Will installed systems stay with this kernel series (like with the previous LTS releases) or will there be an automatic upgrade to the Cosmic kernel series and further until the next LTS kernel series:

If you install with 18.04 or 18.04.1 media and then upgrade, you will stay on the GA kernel and Xorg series. If you install with 18.04.2 or later media, you'll be on the rolling HWE kernel and X series.

... Adam

If you really want to upgrade to the new kernel series, you have to upgrade the hardware enablement stack, and it is risky. You should definitely not do it without a complete backup, so that you can easily(?) restore the system if the upgrade went wrong.

See this link: wiki.ubuntu.com/Kernel/LTSEnablementStack