Install Linux Kernel 4.10 In CentOS and Ubuntu

install Linux Kernel 4.10

Linus Torvalds has announced the final release of Linux Kernel 4.10 yesterday. It comes with greater number of security features, improvements, bug fixes and new hardware support. After seven weeks of continuous development and a total of eight RC, the final stable version has been released and is available for download now. For more details, refer the release notes in the following link.

In this tutorial, we will be installing Linux Kernel 4.10 in CentOS and Ubuntu operating systems.

Install Linux Kernel 4.10 in CentOS

The following steps are tested in CentOS 7 64-bit minimal edition. However, it might work on other RPM distros like RHEL, Fedora and Scientific Linux.

The latest Kernel will not be available on the default repositories. So, we need to add ELRepo repository to install this latest Kernel.

The following steps should be run as root user.

First,  add ELRepo GPG key as shown below:

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 5:
rpm -Uvh http://www.elrepo.org/elrepo-release-5-5.el5.elrepo.noarch.rpm

Enable ELRepo fastest mirror by installing the following package:

yum install yum-plugin-fastestmirror

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

Just in case, you wanted to view the current Linux Kernel version, run the following command:

uname -r

Sample output:

3.10.0-327.22.2.el7.x86_64

As you in the above output, my CentOS 7 test box is running with Linux Kernel version 3.10.0-327.22.2.el7.x86_64.

Next, enable ELRepo and install Linux Kernel 4.10 version using command:

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

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

Linux Kernel 4.10

Note: Linux Kernel 4.10 has just arrived. It is not uploaded in the ELRepo yet. The currently available Linux Kernel in ELRepo is 4.9.11. You need to wait one or two days to get Linux Kernel 4.10 version.

After logging-in to the system, you can verify the newly installed Kernel version as shown below.

uname -r

Congratulations! You have successfully updated the Linux Kernel. Now, your system is powered by most recent stable Linux Kernel 4.10 version.

If have encountered with any problems after installing the new Linux Kernel? No problem, reboot your system. Select the previously installed Kernel from the Boot menu.

Then, remove the newly installed Kernel using command:

yum remove kernel-ml

That’s it.

Install Linux Kernel 4.10 LTS in Ubuntu 16.04 LTS

The following steps are tested in Ubuntu 16.04 LTS server. However, this guide should work other Ubuntu versions, and Debian, Linux Mint as well.

To view the currently installed Kernel, run:

uname -r

Sample output:

4.4.0-34-generic

As you see, my Ubuntu 16.04 system is running with 4.4.0-34-generic kernel version.

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

For 64 bit Ubuntu systems:

wget http://kernel.ubuntu.com/~kernel-ppa/mainline/v4.10/linux-headers-4.10.0-041000_4.10.0-041000.201702191831_all.deb
wget http://kernel.ubuntu.com/~kernel-ppa/mainline/v4.10/linux-headers-4.10.0-041000-generic_4.10.0-041000.201702191831_amd64.deb
wget http://kernel.ubuntu.com/~kernel-ppa/mainline/v4.10/linux-image-4.10.0-041000-generic_4.10.0-041000.201702191831_amd64.deb

For 32 bit Ubuntu systems:

wget http://kernel.ubuntu.com/~kernel-ppa/mainline/v4.10/linux-headers-4.10.0-041000_4.10.0-041000.201702191831_all.deb
wget http://kernel.ubuntu.com/~kernel-ppa/mainline/v4.10/linux-headers-4.10.0-041000-generic_4.10.0-041000.201702191831_i386.deb
wget http://kernel.ubuntu.com/~kernel-ppa/mainline/v4.10/linux-image-4.10.0-041000-generic_4.10.0-041000.201702191831_i386.deb

Next, install Linux Kernel 4.10 using command:

sudo dpkg -i *.deb

Sample output:

Selecting previously unselected package linux-headers-4.10.0-041000.
(Reading database ... 124061 files and directories currently installed.)
Preparing to unpack linux-headers-4.10.0-041000_4.10.0-041000.201702191831_all.deb ...
Unpacking linux-headers-4.10.0-041000 (4.10.0-041000.201702191831) ...
Selecting previously unselected package linux-headers-4.10.0-041000-generic.
Preparing to unpack linux-headers-4.10.0-041000-generic_4.10.0-041000.201702191831_amd64.deb ...
Unpacking linux-headers-4.10.0-041000-generic (4.10.0-041000.201702191831) ...
Selecting previously unselected package linux-image-4.10.0-041000-generic.
Preparing to unpack linux-image-4.10.0-041000-generic_4.10.0-041000.201702191831_amd64.deb ...
Done.
Unpacking linux-image-4.10.0-041000-generic (4.10.0-041000.201702191831) ...
Setting up linux-headers-4.10.0-041000 (4.10.0-041000.201702191831) ...
Setting up linux-headers-4.10.0-041000-generic (4.10.0-041000.201702191831) ...
Setting up linux-image-4.10.0-041000-generic (4.10.0-041000.201702191831) ...
Running depmod.
update-initramfs: deferring update (hook will be called later)
Examining /etc/kernel/postinst.d.
run-parts: executing /etc/kernel/postinst.d/apt-auto-removal 4.10.0-041000-generic /boot/vmlinuz-4.10.0-041000-generic
run-parts: executing /etc/kernel/postinst.d/initramfs-tools 4.10.0-041000-generic /boot/vmlinuz-4.10.0-041000-generic
update-initramfs: Generating /boot/initrd.img-4.10.0-041000-generic
W: mdadm: /etc/mdadm/mdadm.conf defines no arrays.
run-parts: executing /etc/kernel/postinst.d/unattended-upgrades 4.10.0-041000-generic /boot/vmlinuz-4.10.0-041000-generic
run-parts: executing /etc/kernel/postinst.d/update-notifier 4.10.0-041000-generic /boot/vmlinuz-4.10.0-041000-generic
run-parts: executing /etc/kernel/postinst.d/zz-update-grub 4.10.0-041000-generic /boot/vmlinuz-4.10.0-041000-generic
Generating grub configuration file ...
Found linux image: /boot/vmlinuz-4.10.0-041000-generic
Found initrd image: /boot/initrd.img-4.10.0-041000-generic
Found linux image: /boot/vmlinuz-4.4.0-62-generic
Found initrd image: /boot/initrd.img-4.4.0-62-generic
Found linux image: /boot/vmlinuz-4.4.0-34-generic
Found initrd image: /boot/initrd.img-4.4.0-34-generic
Found linux image: /boot/vmlinuz-4.4.0-22-generic
Found initrd image: /boot/initrd.img-4.4.0-22-generic
done

Finally, update the Grub boot loader with command:

sudo update-grub

Sample output:

Generating grub configuration file ...
Found linux image: /boot/vmlinuz-4.10.0-041000-generic
Found initrd image: /boot/initrd.img-4.10.0-041000-generic
Found linux image: /boot/vmlinuz-4.4.0-62-generic
Found initrd image: /boot/initrd.img-4.4.0-62-generic
Found linux image: /boot/vmlinuz-4.4.0-34-generic
Found initrd image: /boot/initrd.img-4.4.0-34-generic
Found linux image: /boot/vmlinuz-4.4.0-22-generic
Found initrd image: /boot/initrd.img-4.4.0-22-generic
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.10.0-041000-generic

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

Select the old Kernel that is working without any issues.

Then uninstall the new Kernel with command:

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

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

Also, there is an easiest way to upgrade to the latest Kernel in Ubuntu-like systems. If you don’t like the command–line way, you could easily upgrade your Linux Kernel in Ubuntu, Linux Mint using Ubuntu Kernel Upgrade Utility. For more details, refer the following guide.

Additional Tip: If you encountered with an Error in Oracle VirtualBox like below after upgrading to Kernel 4.x 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.10 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.

Cheers!

Thanks for stopping by!

How can I benefit from this blog:

Have a Good day!!

You may also like...

  • Bassem Bisso

    Thank you, that worked good for me , using Ubuntu 14.04

  • Excellent! Executed on CentOS7. Just a quick note, for some odd reason, I couldn’t use rpm –import. It simply didn’t worked. I downloaded the key with wget and then executed the rpm –import from the local file.