Technitium DNS server zone high-availability

Lubuntu 22.04 install HWE kernel stacks

Lubuntu 22.04 is a long term support (LTS) release that come with kernel 5.15. Some may consider the kernel may be too old if you are using newer hardware.

For those whose want newer kernel support while maintain using the LTS release for longer software support, Ubuntu/Canonical provide Hardware Enablement (HWE) stacks for newer kernel and hardware support.

Let install HWE kernel stacks on Lubuntu 22.04. The same step will work on all other *buntu 22.04 release too.

1. Double check your current kernel version.

lubuntu@lubuntu:~$ uname -rv
5.15.0-67-generic #74-Ubuntu SMP Wed Feb 22 14:14:39 UTC 2023

2. Check current available HWE kernel stacks in official repository. As of March 2023, HWE kernel stacks 5.19 is available.

lubuntu@lubuntu:~$ apt search linux-generic-hwe-22.04
Sorting... Done
Full Text Search... Done
linux-generic-hwe-22.04/jammy-updates,jammy-security 5.19.0.35.36~22.04.10 amd64
  Complete Generic Linux kernel and headers

linux-generic-hwe-22.04-edge/jammy-updates,jammy-security 5.19.0.35.36~22.04.10 amd64
  Complete Generic Linux kernel and headers

3. Double check system is fully updated before install the HWE kernel stacks.

sudo apt-get update && sudo apt-get upgrade
sudo apt-get install linux-generic-hwe-22.04

4. Reboot the system once the installation is completed. Double check in terminal it is using the latest HWE kernel.

lubuntu@lubuntu:~$ uname -rv
5.19.0-35-generic #36~22.04.1-Ubuntu SMP PREEMPT_DYNAMIC Fri Feb 17 15:17:25 UTC 2

5. To remove the HWE kernel stacks, first your need to boot your system using another version of kernel. You can access the GRUB menu by pressing SHIFT key at boot or edit /etc/default/grub to change the GRUB menu timeout to permanent.

sudo sed -i s/GRUB_TIMEOUT=0/GRUB_TIMEOUT=-1/g /etc/default/grub && sudo update-grub

6. While your system is boot with a different version of kernel, remove the installed HWE kernel image.

lubuntu@lubuntu:~$ apt search linux-image | grep installed

WARNING: apt does not have a stable CLI interface. Use with caution in scripts.

alsa-base/jammy,jammy,now 1.0.25+dfsg-0ubuntu7 all [installed,automatic]
linux-image-5.15.0-60-generic/jammy-updates,jammy-security,now 5.15.0-60.66 amd64 [installed,auto-removable]
linux-image-5.15.0-67-generic/jammy-updates,jammy-security,now 5.15.0-67.74 amd64 [installed,automatic]
linux-image-5.19.0-35-generic/jammy-updates,jammy-security,now 5.19.0-35.36~22.04.1 amd64 [installed,automatic]
linux-image-generic/jammy-updates,jammy-security,now 5.15.0.67.65 amd64 [installed,automatic]
linux-image-generic-hwe-22.04/jammy-updates,jammy-security,now 5.19.0.35.36~22.04.10 amd64 [installed,automatic]
lubuntu@lubuntu:~$ sudo apt-get remove linux-image-5.19.0-35-generic && sudo apt-get autoremove

7. Reboot again to make sure system can boot as normal. Remember to change back the default GRUB setting if you have change it previously.

sudo sed -i s/GRUB_TIMEOUT=-1/GRUB_TIMEOUT=0/g /etc/default/grub && sudo update-grub

 

Comments