2

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,310

1 Answers1

12

"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
  • 68,493