Ubuntu server 20.04 unattended-upgrades installing bionic kernel

Solution 1:

Based on user535733's comments, I found the following post (Ubuntu 20.04 - How can I enable HWE?) that explains how to enable HWE on 20.04 server. The command for Focal Fossa server is:

sudo apt install --install-recommends linux-generic-hwe-20.04

I did a little more searching and found additional information on Focal Fossa, the hardware enablement stack, and the difference between desktop and server installations of Focal Fossa. All of this is here: https://wiki.ubuntu.com/Kernel/LTSEnablementStack and at the forum link above.

My experience of 20.04 LTS server running a 18.04 LTS HWE kernel seems to be based on a difference in the way Focal Fossa (20.04 LTS) installation behaves in an upgrade from 18.04 LTS versus a fresh install. This is described very obtusely in the comments to this forum answer: https://askubuntu.com/a/1314330 where the following exchange occurred in the comments:

Thanks - all good now. Btw, why didn't it get automatically installed? My other pc, with a fresh 20.04.1 installation did upgrade to 5.8 automatically as part of dist-upgrade, whilst my main pc, an upgrade from 18.04.3, did not (had to run this command). – Emanuele Feb 8 at 8:23

It is by design. You installed from a 20.04 iso. – Pilot6 Feb 8 at 8:30

I am still not sure why the release upgrade from 18.04 LTS server to 20.04 LTS server did not "undue" the 18.04 HWE, but it did not. In fact, before I enabled HWE on my server install of 20.04.03, I had the following hwe status:

hwe-support-status --verbose
You are not running a system with a Hardware Enablement Stack. Your system is supported until April 2025.

Even though the upgrade had installed the 18.04 HWE kernel that instigated my initial question above. I hope this helps someone having the same issues/questions as me: Why is my 20.04 LTS server running a 18.04 LTS HWE kernel?