How to update and install Linux Kernel 5.4 on Ubuntu Linux Systems. Linux Kernel 5.4 is released with Kernel Lockdown, exFAT Support and file & networking improvements.
Announcing the release of Linux Kernel 5.4, Linus Torvalds writes:
“Not a lot happened this last week, which is just how I like it. And as expected, most of the pull requests I got were for the 5.5 merge window, which I’ll obviously start working through tomorrow. What little there is here is mostly some networking updates (mix of network drivers and core networking), and some minor GPU driver updates. Other than that it’s a small collection of random other things all over. The appended shortlog is small enough that you might as well just scroll through it.
Anyway, this obviously opens the merge window for 5.5. It’s not ideal timing with Thanksgiving week coming up, but it hopefully shouldn’t be too much of an issue. If I fall behind (not because I’m all that big of a fan of the indiscriminate and relentless turkey-killing holiday) it’s because we’ve got all three kids back for the holiday, and I might push some ot the merging to the second week as a result. We’ll see what happens.”
Upstream Kernel Files
By default, Ubuntu systems run with the Ubuntu kernels provided by the Ubuntu repositories. However it is handy to be able to test with unmodified upstream kernels to help locate problems in Ubuntu kernel patches, or to confirm that upstream has fixed a specific issue. To this end we now offer select upstream kernel builds. These kernels are made from unmodified kernel source but using the Ubuntu kernel configuration files. These are then packaged as Ubuntu .deb files for simple installation, saving you the time of compiling kernels, and debugging build issues.
Download Upstream Kernel Files From The Ubuntu Archive
The upstream kernels archive has a directory for each build. Note, if you are testing for a bug, please do not use the daily folder, but use the latest mainline kernel at the top from:
http://kernel.ubuntu.com/~kernel-ppa/mainline/?C=N;O=D
It is best to verify the integrity of downloaded packages as explained below under “Verifying the mainline build binaries”.
Install All Upstream Kernel Files
Next, one will execute the following command against each of the downloaded files via a terminal:
sudo dpkg -i FILENAME.deb
If no errors show up, reboot while holding Shift then select “Advanced options for Ubuntu”, then select and boot into the new entry that looks something like: Ubuntu with linux 4.19.0-041900-generic [the Kernel version will differ as per the release].
Install Kernel 5.4 on 64 Bit Systems
Before you install Kernel, choose the proper upstream Kernel files. The build directories are nicely organized into per architecture groups. For example, if one is using a 64-bit/amd64 architecture and wants the generic kernel version you would want those files marked A, from the appropriate group.
If you want the low latency version, B. Build for amd64 succeeded (see BUILD.LOG.amd64):
AB – linux-headers-4.19.0-041900_4.19.0-041900.201810221809_all.deb
A – linux-headers-4.19.0-041900-generic_4.19.0-041900.201810221809_amd64.deb
B – linux-headers-4.19.0-041900-lowlatency_4.19.0-041900.201810221809_amd64.deb
A – linux-image-unsigned-4.19.0-041900-generic_4.19.0-041900.201810221809_amd64.deb
B – linux-image-unsigned-4.19.0-041900-lowlatency_4.19.0-041900.201810221809_amd64.deb
A – linux-modules-4.19.0-041900-generic_4.19.0-041900.201810221809_amd64.deb
B – linux-modules-4.19.0-041900-lowlatency_4.19.0-041900.201810221809_amd64.deb
Installing Kernel via Commandline
Run the following commands in terminal to install Kernel 5.4 on 64 Bit Systems – Build for amd64 Systems:
sudo apt-get update
sudo apt-get upgrade
wget https://kernel.ubuntu.com/~kernel-ppa/mainline/v5.4/linux-headers-5.4.0-050400_5.4.0-050400.201911242031_all.deb
wget https://kernel.ubuntu.com/~kernel-ppa/mainline/v5.4/linux-headers-5.4.0-050400-generic_5.4.0-050400.201911242031_amd64.deb
wget https://kernel.ubuntu.com/~kernel-ppa/mainline/v5.4/linux-headers-5.4.0-050400-lowlatency_5.4.0-050400.201911242031_amd64.deb
wget https://kernel.ubuntu.com/~kernel-ppa/mainline/v5.4/linux-image-unsigned-5.4.0-050400-generic_5.4.0-050400.201911242031_amd64.deb
wget https://kernel.ubuntu.com/~kernel-ppa/mainline/v5.4/linux-image-unsigned-5.4.0-050400-lowlatency_5.4.0-050400.201911242031_amd64.deb
wget https://kernel.ubuntu.com/~kernel-ppa/mainline/v5.4/linux-modules-5.4.0-050400-generic_5.4.0-050400.201911242031_amd64.deb
wget https://kernel.ubuntu.com/~kernel-ppa/mainline/v5.4/linux-modules-5.4.0-050400-lowlatency_5.4.0-050400.201911242031_amd64.deb
sudo dpkg -i *.deb
Once installed, update the system:
sudo apt-get update
sudo apt-get upgrade
NOTE: Build for i386 failed (see BUILD.LOG.i386): linux-headers-5.4.0-050400_5.4.0-050400.201911242031_all.deb *_i386.deb
Uninstalling Upstream Kernels
Note that the upstream kernels have their own ABI namespace, so they install side by side with the stock Ubuntu kernels (each kernel has a separate directory under /lib/modules/VERSION for example). This means that you can keep several mainline and Ubuntu stock kernels installed at the same time and select the one you need from the GRUB boot menu.
If you would like to uninstall an upstream kernel anyway, execute the following to find the exact name of the kernel packages you want to uninstall:
dpkg -l | grep "linux\-[a-z]*\-"
and then execute the following to uninstall them:
sudo apt-get remove KERNEL_PACKAGES_TO_REMOVE
Remember that several packages can belong to one kernel version: common headers, architecture specific headers and the architecture specific image.
Also, once the mainline packages are removed, one may still see entries for these via the above dpkg command. To purge these entries execute at a terminal:
sudo dpkg --purge ENTRY