Home Linux DistributionsCentOSLinux Kernel 4.6 is released – Install it in CentOS 7 and Ubuntu 16.04

Linux Kernel 4.6 is released – Install it in CentOS 7 and Ubuntu 16.04

By sk
2 views

Yesterday, April 15, 2016, Linus Torvalds has proudly announced the final release of Linux Kernel 4.6. After two months of continues development, Kernel 4.6 final version is made available for download for all GNU/Linux operating systems.

Linux Torvalds wrote in the release notes,

It's just as well I didn't cut the rc cycle short, since the last week ended up getting a few more fixes than expected, but nothing in there feels all that odd or out of line. So 4.6 is out there at the normal schedule...

For more details, check the release notes.

In this brief tutorial, I will walk you through how to install Linux Kernel 4.6 version in CentOS 7 and Ubuntu 16.04 LTS.

Install Linux Kernel 4.6 in CentOS 7

I tested this guide on CentOS 7 64 bit edition. Although, this guide should work on RHEL 7, Scientific Linux 7 and Fedora etc.

To install the latest kernel, we need to add ELRepo repository.

First, add ELRepo GPG key:

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

Then, add ELRepo in CentOS 7 / RHEL 7 / Scientific Linux 7 using command:

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

To Install ELRepo for CentOS 6 / RHEL 6 / Scientific Linux 6:

rpm -Uvh http://www.elrepo.org/elrepo-release-6-6.el6.elrepo.noarch.rpm
To Install ELRepo for CentOS 5 / RHEL 5 / Scientific Linux 6:
rpm -Uvh http://www.elrepo.org/elrepo-release-5-5.el5.elrepo.noarch.rpm

Enable ELRepo fastest mirror using by installing the following package:

yum install yum-plugin-fastestmirror

Sample output:

================================================================================
 Package Arch Version Repository
 Size
================================================================================
Updating:
 yum-plugin-fastestmirror noarch 1.1.31-34.el7 base 30 k

Transaction Summary
================================================================================
Upgrade 1 Package

Total download size: 30 k
Is this ok [y/d/N]: y
Downloading packages:
Delta RPMs disabled because /usr/bin/applydeltarpm not installed.
yum-plugin-fastestmirror-1.1.31-34.el7.noarch.rpm | 30 kB 00:00 
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
Warning: RPMDB altered outside of yum.
 Updating : yum-plugin-fastestmirror-1.1.31-34.el7.noarch 1/2 
 Cleanup : yum-plugin-fastestmirror-1.1.31-25.el7_0.noarch 2/2 
 Verifying : yum-plugin-fastestmirror-1.1.31-34.el7.noarch 1/2 
 Verifying : yum-plugin-fastestmirror-1.1.31-25.el7_0.noarch 2/2

Updated:
 yum-plugin-fastestmirror.noarch 0:1.1.31-34.el7

Complete!

We have added the ELRepo. Now, it is time to install Linux kernel 4.6.

Let us find out the current version details with command:

uname -r

Sample output:

3.10.0-327.13.1.el7.x86_64

As you see, the installed version is 3.10.0-327.13.1.el7.x86_64.

Now, Install Linux Kernel 4.6 using command:

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

Note: Since this kernel is just released few hours ago, the latest kernel version is not pushed in the ELRepo yet. It stills shows the 4.5.x version. Hope the latest kernel will be pushed to the repository as soon as possible.

Sample output:

Dependencies Resolved

====================================================================
 Package Arch Version Repository Size
====================================================================
Installing:
 kernel-ml x86_64 4.5.4-1.el7.elrepo elrepo-kernel 38 M

Transaction Summary
====================================================================
Install 1 Package

Total download size: 38 M
Installed size: 172 M
Is this ok [y/d/N]: y
Downloading packages:
kernel-ml-4.5.4-1.el7.elrepo.x86_64.rpm | 38 MB 02:40 
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
Warning: RPMDB altered outside of yum.
 Installing : kernel-ml-4.5.4-1.el7.elrepo.x86_64 1/1 
 Verifying : kernel-ml-4.5.4-1.el7.elrepo.x86_64 1/1 

Installed:
 kernel-ml.x86_64 0:4.5.4-1.el7.elrepo 

Complete!

After installing the Kernel, Reboot your system and select the latest Kernel from the Grub boot menu.

Log in to CentOS 7

Check the Kernel version using command:

uname -r

Sample output:

4.5.4-1.el7.elrepo.x86_64

Congratulation! Your CentOS 7 system is currently running on Kernel 4.5.4.

Have any problems after installing the new Linux Kernel? No worries, reboot your system. Select your previously working Kernel from the Boot menu.

CentOS 7 -1 [Running] - Oracle VM VirtualBox_001

Then, remove the newly installed Kernel using command:

yum remove kernel-ml

That’s it.

Install Linux Kernel 4.6 LTS in Ubuntu 16.04 LTS

I tested this guide in Ubuntu 16.04 LTS server. However, this guide should work on older Ubuntu versions, Debian, and Linux Mint etc.

Check the current Linux kernel version with command:

uname -r

Sample output:

4.5.0-040500-generic

As you see, my Ubuntu 16.04 system has 4.5.0-040500-generic kernel version.

Now, we will install Linux Kernel 4.6. You can download the latest kernel from the following link.

For 64 bit Ubuntu systems:

wget http://kernel.ubuntu.com/~kernel-ppa/mainline/v4.6-yakkety/linux-headers-4.6.0-040600_4.6.0-040600.201605151930_all.deb
wget http://kernel.ubuntu.com/~kernel-ppa/mainline/v4.6-yakkety/linux-headers-4.6.0-040600-generic_4.6.0-040600.201605151930_amd64.deb
wget http://kernel.ubuntu.com/~kernel-ppa/mainline/v4.6-yakkety/linux-image-4.6.0-040600-generic_4.6.0-040600.201605151930_amd64.deb

For 32 bit Ubuntu systems:

wget http://kernel.ubuntu.com/~kernel-ppa/mainline/v4.6-yakkety/linux-headers-4.6.0-040600_4.6.0-040600.201605151930_all.deb
wget http://kernel.ubuntu.com/~kernel-ppa/mainline/v4.6-yakkety/linux-headers-4.6.0-040600-generic_4.6.0-040600.201605151930_i386.deb
wget http://kernel.ubuntu.com/~kernel-ppa/mainline/v4.6-yakkety/linux-image-4.6.0-040600-generic_4.6.0-040600.201605151930_i386.deb

Then install Kernel 4.6 using command:

sudo dpkg -i *.deb

Finally, update the Grub boot loader with command:

sudo update-grub

Sample output:

Generating grub configuration file ...
Found linux image: /boot/vmlinuz-4.6.0-040600-generic
Found initrd image: /boot/initrd.img-4.6.0-040600-generic
Found linux image: /boot/vmlinuz-4.5.0-040500-generic
Found initrd image: /boot/initrd.img-4.5.0-040500-generic
Found linux image: /boot/vmlinuz-4.4.0-21-generic
Found initrd image: /boot/initrd.img-4.4.0-21-generic
Found memtest86+ image: /boot/memtest86+.elf
Found memtest86+ image: /boot/memtest86+.bin
done

If you’re using BURG boot loader, then run:

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

Sample output:

4.6.0-040600-generic

If you have any problems after upgrading the Kernel, force reboot your system, and login to the old Kernel by selecting the ‘Advanced options for Ubuntu’ from the Boot menu.

Ubuntu 16.04 server [Running] - Oracle VM VirtualBox_002

Ubuntu 16.04 server [Running] - Oracle VM VirtualBox_003

Then uninstall the new Kernel with command:

sudo apt-get remove linux-headers-4.6* linux-image-4.6*

Finally, reboot your system once again to log in to the old Kernel.

Additional Tip: If you encountered with an Error in Oracle VirtualBox like below after upgrading to Kernel 4.6 version, refer the following link.

I got this error after upgrading the Kernel version.

Kernel driver not installed (rc=-1908)

If you encountered with similar error, refer the following guide to fix the problem.

Want to install Linux Kernel 4.6 in openSUSE? Refer the following link.

That’s all for now.

If you find this tutorial useful, please share it on your social networks and support OSTechNix.

Thanks for reading! Cheers!!

You May Also Like

Leave a Comment

* By using this form you agree with the storage and handling of your data by this website.

This site uses Akismet to reduce spam. Learn how your comment data is processed.

This website uses cookies to improve your experience. By using this site, we will assume that you're OK with it. Accept Read More