Linux kernel
Each of the operating systems use their own kernels. For example, Windows uses its proprietary kernel whereas most other operating systems, especially the open-source ones use the well-known, tested and proven Linux kernel.
The Linux kernel is a living marvel of the software world. It’s one of the FINEST pieces of software that’s both INCREDIBLY complex and so, INCREDIBLY powerful with an INCREDIBLE community backing it up. It’s the core of all the Linux distros. Started by Linus Torvalds, Linux kernel v1.0.0 came out back in 1994. Now, it’s 2019 and the latest version is 4.20.5 (stable).
Throughout its course, the Linux kernel is getting advanced day by day. The kernel update is released every couple months with improved performance, stability, bug fixes, patches and additional features.
However, not all the Linux distros instantly incorporate the latest update right away. After the release, it usually takes time for getting it into your system officially.
That’s why I love to manage the kernel by myself.
Before we proceed any further, it’s worth to mention that unless you’re sure that you need that next-gen kernel, it’s not really worth making the leap. The kernel that comes with the distro is well-maintained by the developers as well.
Manage kernel on Linux Mint
If you’re a user of Linux Mint, then it’s way easier to perform “proven” actions on the kernel without worrying about something going wrong. Of course, things can go completely out of whack if you become too much adventurous. There are 2 available ways for managing a newer kernel version – using a GUI tool named “Ukuu” and installing the kernel manually.
Changing kernel using Ukuu
Ukuu is available directly for all the Debian/Ubuntu-based distros via the PPA.
Fire up a terminal –
Add the Ukuu repository –
Now, update the APT repository cache –
Finally, install Ukuu –
Launch Ukuu –
As you can see, the ones with the Ubuntu mark are the installed ones. The others are stable kernel releases throughout the journey.
It’s clear that my Linux Mint system is using Linux Kernel 4.15. It’s a quite old model.
Let’s install Kernel v4.18.20. Select the kernel and hit “Install”.
The installation process will start immediately.
Now, reboot your system for completing the installation.
Voila! The new kernel is all set!
Changing kernel manually
Note that this is a more risky process and might end up with some unwanted issues with your system.
-
Downloading the kernel
At first, download the latest Linux kernel package.
-
Verify the package
The process of downloading isn’t complete YET, unless you’ve ensured that the file is the verified package. Don’t you DARE skipping this step! Because it’s the kernel, even the slightest bit change can cause serious trouble!
Verify the downloaded package –
wget https://cdn.kernel.org/pub/linux/kernel/v4.x/linux-4.20.5.tar.sign
Upon trying to verify the package,
See? It’s not possible. Grab the public key from the PGP keyserver –
Here, the key string is going to be the key that the previous command showed.
Once the download is complete,
You can successfully verify the signature of the downloaded file.
The warning should be fine as long as you don’t get “BAD signature”. Now, it’s safe to proceed with the rest of the installation process.
-
Configuring kernel features and modules
Now, before you install the new kernel, you must configure its features. You also must specify all the necessary kernel modules that your system needs.
This can be overwhelming, so we’ll be using the existing config file. Run the following command –
cp -v /boot/config-$(uname -r) .config
-
Install the necessary compiler tools
For building the kernel package, you need the necessary dependencies available. Otherwise, the building step is going to be a mess.
-
Configuring the kernel for build
There are 3 available options –
- make menuconfig
Text-based radio lists, color menus and dialogs. Useful for remote servers. - make xconfig
X Windows (Qt) based config tool. It works the best under KDE desktop. - make gconfig
X Windows (GTK) based config tool. It works the best under GNOME destkops. - make oldconfig
A series of y/N questions that you’re free to skip by pressing Enter.
For my case, I’ll be going with “make oldconfig”.
Just hold Enter until the nightmare ends!
-
Building the kernel
This is going to take a while, folks. Let’s concentrate on something else! It’s also going to take a lot of disk space and by that, I mean A LOT!
-
Installing the kernel
Start installing the kernel with the modules.
Then, it’s time to install the kernel itself.
-
Update GRUB config
Run the following commands –
sudo update-grub
For taking the result into effect, reboot your system.