Tutorial: Updating the Linux kernel used by Bodhi
Nov 21, 2021 18:19:57 GMT
Hippytaff, ylee, and 4 more like this
Post by enigma9o7 on Nov 21, 2021 18:19:57 GMT

Background
Bodhi Linux (standard/apppack/legacy) does not automatically check for kernel updates during apt update. If you want a different kernel, perhaps for security, or perhaps to support some new device or feature that has been added since the kernel was originally installed with Bodhi, or so others don't hassle you when they see a screenshot with a kernel that isnt the very latest, there are several options.

Are you less secure if you do not update your kernel? In some cases clearly yes. The security of your system is your responsibility. I pay close attention to kernel updates myself. Even read the changelogs. I stick with Ubuntu kernels usually but I do update the kernel.
Option 1: Upgrade to the latest point release of the version Bodhi shipped with.

Aug 17, 2021 8:39:39 GMT ylee said:
The decision to not forcing kernel updates on users was Jeff Hoogland's decision made a long time at the beginning of this distro. Traditionally we have left this decision to the end User. Jeff's reasoning was that kernel updates can sometimes break things, usually as in lose hardware support. I have merely continued this tradition with the two releases I have made.Are you less secure if you do not update your kernel? In some cases clearly yes. The security of your system is your responsibility. I pay close attention to kernel updates myself. Even read the changelogs. I stick with Ubuntu kernels usually but I do update the kernel.
Option 1: Upgrade to the latest point release of the version Bodhi shipped with.
Point releases fix bugs and address security issues, but rarely add any features or break working hardware. For example Bodhi Standard 6.0 comes with 5.4.0-72, while this option provides 5.4.0-90 today, and newer in the future. Keeping this up to date is mainly for security; the only real disadvantage is it takes bandwidth and time, and requires a reboot to take affect.
Option 2: Upgrade to the HWE Rolling Update Kernel
Option 2: Upgrade to the HWE Rolling Update Kernel
Note: This does not apply to Bodhi 6 legacy; I'll try to remember to update this once it comes out of beta, which is using debian kernel 5.10.
The "hardware enablement" kernel is mainly available to support brand new hardware that wasn't supported when Bodhi's original kernel was released, or if a new feature was introduced in a later kernel you want to take advantage of, or you like bigger numbers when you look at your system info. The only real disadvantage is it takes data, time, and a reboot to update, although it is possible that a newer kernel version could drop support for hardware that was previously supported, or that an older driver doesn't work with newer kernel version.
Bodhi 4: 4.15
Bodhi 5: 5.4
Bodhi 6: 5.13 (could possibly increase; previously 5.8 and 5.11)
Option 3: Upgrade to an OEM Kernel
Note: this only applies to 64-bit Bodhi 6.
Ubuntu appears to make these kernels available for equipment manufacturers who need even newer kernel than hwe, updating them every 3 weeks. As of now there are meta-packages for kernel versions 5.10, 5.13, and 5.14 in focal repositories.
Option 4: Install any version of mainline kernel compiled by Ubuntu
These are pure upstream kernels (built using Ubuntu kernel configuration files), with very new and very old available. They do not include any Ubuntu-specific drivers or patches, nor any proprietary modules or restricted binary drivers.
How to: GUI Method - Update Manager
Note: I dunno how to install oem kernels with mintupdate so method not described here. It could be done with Synaptic tho.
If you don't have it installed it already, install Update Manager:
sudo apt install mintupdate
Note: If you want mintupdate to check and notify you of regular updates (to all software, not just kernels), you can add it to startup programs, but that is not necessary if you just want to use it when manually launched.
For mainline kernels only (option 4), Edit-->Preferences-->Expert and check the box to enable them.
For mainline kernels only (option 4), Edit-->Preferences-->Expert and check the box to enable them.
For the older 4.x kernels, also check long term support.
Tools-->Kernel Manager
Select the kernel you want and click install. The specific version you select will be installed by the update manager which will not affect future apt updates.
First, make sure package database is up to date:
sudo apt update
If you follow the instructions in options 1-3 below, future apt updates will periodically include updated kernel. Unlike using mintupdate as described above to install a specific version, or specifying a specific version with apt install, the following method will affect future APT updates.
Option 1: Enable & Install Updates
Note2: This will update Bodhi 5 legacy from Debian kernel 4.9 to Ubuntu kernel 4.15
sudo apt install linux-image-generic linux-headers-generic
Note: This does not apply to Bodhi 6 legacy; I'll try to remember to update this once it comes out of beta, which is using debian kernel 5.10.
Bodhi 4: sudo apt install linux-generic-hwe-16.04 xserver-xorg-hwe-16.04
Bodhi 5: sudo apt install linux-generic-hwe-18.04 xserver-xorg-hwe-18.04
Bodhi 5: sudo apt install linux-generic-hwe-18.04 xserver-xorg-hwe-18.04
Bodhi 6: sudo apt install linux-generic-hwe-20.04
Option 3: Enable & Install OEM Updates
Note: This only applies to 64-bit Bodhi 6.
First check what's available:
apt search linux-oem* "kernel and headers"
Then install the meta package with the kernel you want, for example for kernel version 5.14 on Bodhi 6:
sudo apt install linux-oem-20.04d
Download mainline kernel packages from Ubuntu Mainline Kernel Archive then install manually.
Example installation of 4.19.217 for i386 with PAE (Bodhi Legacy)
mkdir /tmp/whatever;cd /tmp/whatever
wget https://kernel.ubuntu.com/~kernel-ppa/mainline/v4.19.217/amd64/linux-headers-4.19.217-0419217_4.19.217-0419217.202111121443_all.deb
wget https://kernel.ubuntu.com/~kernel-ppa/mainline/v4.19.217/i386/linux-headers-4.19.217-0419217-generic_4.19.217-0419217.202111121443_i386.deb
wget https://kernel.ubuntu.com/~kernel-ppa/mainline/v4.19.217/i386/linux-image-4.19.217-0419217-generic_4.19.217-0419217.202111121443_i386.deb
wget https://kernel.ubuntu.com/~kernel-ppa/mainline/v4.19.217/i386/linux-modules-4.19.217-0419217-generic_4.19.217-0419217.202111121443_i386.deb
sudo apt install ./*
Reboot to use replacement kernel
Regardless how you installed, grub will automatically boot the highest kernel version you have installed. If you want to boot an earlier kernel series, grub will not boot it automatically unless you configure it that way, so select it directly from advanced options.
If for some reason your system fails to boot with the alternate kernel, force a reboot and select advanced options from grub, find your previous known-working kernel which you can boot and use to remove the useless one that doesn't work.


