1

I have two laptops showing

DISTRIB_DESCRIPTION="Ubuntu 22.04.3 LTS"

but one of them has

Linux ... 6.2.0-39-generic #40~22.04.1-Ubuntu SMP PREEMPT_DYNAMIC Thu Nov 16 10:53:04 UTC 2 x86_64 x86_64 x86_64 GNU/Linux

and the other one shows an old kernel version:

Linux ... 5.15.0-91-generic #101-Ubuntu SMP Tue Nov 14 13:30:08 UTC 2023 x86_64 x86_64 x86_64 GNU/Linux

Both are apt-get update; apt-get upgrade clean. I could maybe force an

apt-get install linux-image-6.2.0-39-generic

but this would probably aggravate the problem of not having automatic updates. Using update-manager is out, since I only have ssh access to the machine.

How can I tell apt-??? to switch to the newer kernel line?

Harald
  • 1,170
  • 1
    Do you have the HWE (Hardware Enablement Stack) activated on the system currently using the 5.15. kernel? This is achieved by installing the package linux-generic-hwe-22.04. – noisefloor Dec 30 '23 at 13:08
  • 3
    Depending on your installation media; you will install Ubuntu 22.04 LTS with the GA kernel stack (ie. 5.15 kernel which is supported for the life of 22.04) or HWE kernel stack (which upgrades during the first two years of life; using kernels from later releases; currently 6.2 from 23.04, but 6.5 from 23.10 is in -proposed currently soon to become the HWE kernel). Both GA & HWE are options for 22.04 (install media sets default), as being a LTS release you have kernel stack choice (inc. some OEM options if your hardware will benefit from them). https://wiki.ubuntu.com/Kernel/LTSEnablementStack – guiverc Dec 30 '23 at 13:38

1 Answers1

8

"How can I tell apt-??? to switch to the newer kernel line?"

No need to "force" anything.

  1. Simply install the HWE metapackage for your LTS release of Ubuntu: sudo apt install linux-generic-hwe-22.04 (thanks to @noisefloor)

  2. Let it pull in dependencies, then reboot.

  3. Optional: Remove the original GA metapackage: sudo apt remove linux-image-generic

To reverse the process and return to the GA kernel, simply re-install the GA metapackage and uninstall the HWE.

The difference occurred because you used two different 22.04 Server install media at different times. Oversimplified: Newer install media get respun with newer kernels. HWE keeps your kernel version updated for new hardware. (thanks to @guiverc)

  • Some server owners don't want newer kernels, so the original GA (5.15) kernel in the original 22.04 Server install media is supported for the life of the release. Those folks must use the original 22.04 or 22.04.0 Server installer...or tell apt to switch from HWE to GA as outlined above.
user535733
  • 62,253