Install Linux Kernel 4.15 In RPM And DEB Based Systems

Install Linux Kernel 4.15

Linux Kernel 4.15 has been released on 28 Jan 2018. You might have heard a lot about Meltdown and Spectre vulnerabilities in the chips for the past few months. Thanks to the entire Linux Kernel development team, this release contains the latest code to deal with Meltdown/Spectre issues. Even though, the issues haven’t been completely fixed yet, at least we’ve got a temporary fix. “The Linux Kernel 4.15 version is quiet and small, and no last-minute panics, just small fixes for various issues” Says Linus Torvalds in the release notes.

Now, let us see how to install 4.15 in RPM-based systems (RHEL, CentOS) and DEB-based systems (Debian, Ubuntu).

Install Linux Kernel 4.15 On RPM based systems

First, we will see how to install Linux Kernel 4.15 in RPM based systems.

For the purpose of this guide, I use CentOS 7 64 bit server. However, it might also work on other RPM distros such as RHEL, Fedora and Scientific Linux.

Kernel 4.15 version is not yet available in the official repositories. So, let us add ELRepo repository and install the latest Kernel from there.

Log in as root user or any admin privilege user and import the ELRepo repository key.

# rpm --import https://www.elrepo.org/RPM-GPG-KEY-elrepo.org

Next, add ELRepo:

On CentOS 7 / RHEL 7 / Scientific Linux 7:

# rpm -Uvh http://www.elrepo.org/elrepo-release-7.0-3.el7.elrepo.noarch.rpm

On CentOS 6 / RHEL 6 / Scientific Linux 6:

# rpm -Uvh http://www.elrepo.org/elrepo-release-6-8.el6.elrepo.noarch.rpm

Enable ELRepo fastest mirror:

# yum install yum-plugin-fastestmirror

Finally, install the latest Linux kernel 4.15 version using command:

# yum --enablerepo=elrepo-kernel install kernel-ml

Once the installation is completed, reboot your system and choose the newly installed Kernel from the Grub boot menu.

You can verify if your system is using the latest Kernel using command:

# uname -r
4.15.0-1.el7.elrepo.x86_64

Congratulations! Your system is running with latest Kernel.

If there are any problems after updating the Kernel, you can simply roll back to your old Kernel as described below.

Reboot your system. Log in to your system by selecting the old Kernel from the Boot menu.

Finally, remove the newly installed Kernel:

# yum remove kernel-ml

Install Linux Kernel 4.15 LTS On DEB based systems

I tested this on Ubuntu 16.04 LTS server edition, but it should work on Debian, other Ubuntu versions and its variants.

Download the latest kernel from the following link.

For 64 bit Ubuntu systems:

$ wget http://kernel.ubuntu.com/~kernel-ppa/mainline/v4.15/linux-headers-4.15.0-041500_4.15.0-041500.201802011154_all.deb
$ wget http://kernel.ubuntu.com/~kernel-ppa/mainline/v4.15/linux-headers-4.15.0-041500-generic_4.15.0-041500.201802011154_amd64.deb
$ wget http://kernel.ubuntu.com/~kernel-ppa/mainline/v4.15/linux-image-4.15.0-041500-generic_4.15.0-041500.201802011154_amd64.deb

For 32 bit Ubuntu systems:

$ wget http://kernel.ubuntu.com/~kernel-ppa/mainline/v4.15/linux-headers-4.15.0-041500_4.15.0-041500.201802011154_all.deb
$ wget http://kernel.ubuntu.com/~kernel-ppa/mainline/v4.15/linux-headers-4.15.0-041500-generic_4.15.0-041500.201802011154_i386.deb
$ wget http://kernel.ubuntu.com/~kernel-ppa/mainline/v4.15/linux-image-4.15.0-041500-generic_4.15.0-041500.201802011154_i386.deb

Then, install Linux Kernel 4.15 LTS:

$ sudo dpkg -i *.deb

Update the Grub boot loader with command:

$ sudo update-grub
For BURG boot loader, use this one:
$ sudo update-burg

Reboot your system and log in to the newly installed Kernel.

Check if new Kernel has been installed with command:

$ uname -r
4.15.0-041500-generic

If there are any problems after updating the Kernel, you can roll back to the old Kernel and delete the new one.

To do so, reboot your system, and login to the old Kernel by selecting the ‘Advanced options for Ubuntu’ option from the Boot menu.

Choose the old Kernel:

Then uninstall the new Kernel with command:

$ sudo apt-get remove linux-headers-4.15* linux-image-4.15*

Finally, reboot your system.

Unofficial ways to upgrade Linux kernel

There are quite few ways to upgrade the Kernel. Here are two unofficial ways to update the Kernel on Ubuntu and its variants.

1. Using Ukku:

2. Using Linux kernel Utilities:

Additional Tip: Oracle VirtualBox may not work after updating the Kernel. If so, refer the following guide.


Also read:


Let us be clear that Linux Kernel 4.15 is a normal release. If you want constant security fixes and long term support, just stick with Linux Kernel 4.14 LTS version. The LTS versions have support for 6 years. Installing Kernel 4.14 LTS is same as I described here. I have documented the installation steps in the link given below.

And, that’s all for now. More good stuffs to come. Stay tuned!

Cheers!

Thanks for stopping by!

Help us to help you:

Have a Good day!!

You may also like...

2 Responses

  1. I have been wanting for a long time do kernel upgrade by taking these approaches. But my issue (or fear) as always been when it’s time to upgrade my server. Would I have any major issues?

    • SK says:

      If it is a production system, prefer Kernel updates from official repositories. The latest Kernel will be uploaded to the official repositories after one or two weeks. if it is your home system, go ahead and update the Kernel. Make sure you have backed up every thing.

Leave a Reply

Your email address will not be published. Required fields are marked *