Just few hours ago, Linus Torvalds has proudly announced the release of Linux Kernel 4.5. After two months of continues development, Kernel 4.5 final production is finally made available for download.
Linux Torvalds wrote in the release notes,
So this is later on a Sunday than my usual schedule, because I just couldn't make up my mind whether I should do another rc8 or not, and kept just waffling about it. In the end, I obviously decided not to, but it could have gone either way.
For more details, check the release notes.
In this tutorial, let us see how to install Linux Kernel 4.5 version in CentOS 7 and Ubuntu 16.04 LTS.
Install Linux Kernel 4.5 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, add ELRepo repository.
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
# 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.5.
Let us find out the current version details with command:
# uname -r
Sample output:
3.10.0-123.9.3.el7.x86_64
As you see, the installed version is 3.10.0-123.9.3.el7.x86_64.
Install Linux Kernel 4.5 using command:
# yum --enablerepo=elrepo-kernel install kernel-ml
Note: Since this kernel is just released few hours ago, the latest kernel version hasn’t been pushed into the ELRepo yet. It stills shows the 4.4.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.4.5-1.el7.elrepo elrepo-kernel 38 M Transaction Summary ================================================================================ Install 1 Package Total download size: 38 M Installed size: 170 M Is this ok [y/d/N]: y Downloading packages: kernel-ml-4.4.5-1.el7.elrepo.x86_64.rpm | 38 MB 02:28 Running transaction check Running transaction test Transaction test succeeded Running transaction Installing : kernel-ml-4.4.5-1.el7.elrepo.x86_64 1/1 Verifying : kernel-ml-4.4.5-1.el7.elrepo.x86_64 1/1 Installed: kernel-ml.x86_64 0:4.4.5-1.el7.elrepo Complete!
After installing the Kernel, Reboot your system and select the latest Kernel from the Grub boot menu.
![CentOS 7 -1 [Running] - Oracle VM VirtualBox_001](https://ostechnix.com/wp-content/uploads/2016/03/CentOS-7-1-Running-Oracle-VM-VirtualBox_001-1.jpg)
Check the Kernel version using command:
# uname -r
Sample output:
4.4.5-1.el7.elrepo.x86_64
Congratulation! Your CentOS 7 system is currently running on Kernel 4.4.5.
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_002](https://ostechnix.com/wp-content/uploads/2016/03/CentOS-7-1-Running-Oracle-VM-VirtualBox_002-1.jpg)
Then, remove the newly installed Kernel using command:
# yum remove kernel-ml
That’s it.
Install Linux Kernel 4.5 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.4.0-7-generic
As you see, my Ubuntu 16.04 system has 4.4.0-7-generic kernel version.
Now, we will install Linux Kernel 4.5. You can download the latest kernel from the following link.
For 64 bit Ubuntu systems:
$ wget http://kernel.ubuntu.com/~kernel-ppa/mainline/v4.5-wily/linux-headers-4.5.0-040500_4.5.0-040500.201603140130_all.deb
$ wget http://kernel.ubuntu.com/~kernel-ppa/mainline/v4.5-wily/linux-headers-4.5.0-040500-generic_4.5.0-040500.201603140130_amd64.deb
$ wget http://kernel.ubuntu.com/~kernel-ppa/mainline/v4.5-wily/linux-image-4.5.0-040500-generic_4.5.0-040500.201603140130_amd64.deb
For 32 bit Ubuntu systems:
$ wget http://kernel.ubuntu.com/~kernel-ppa/mainline/v4.5-wily/linux-headers-4.5.0-040500_4.5.0-040500.201603140130_all.deb
$ wget http://kernel.ubuntu.com/~kernel-ppa/mainline/v4.5-wily/linux-headers-4.5.0-040500-generic_4.5.0-040500.201603140130_i386.deb
$ wget http://kernel.ubuntu.com/~kernel-ppa/mainline/v4.5-wily/linux-image-4.5.0-040500-generic_4.5.0-040500.201603140130_i386.deb
Then install Kernel 4.5 using command:
$ sudo dpkg -i *.deb
Then update the Grub boot loader with command:
$ sudo update-grub
Sample output:
Generating grub configuration file ... 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-7-generic Found initrd image: /boot/initrd.img-4.4.0-7-generic Found linux image: /boot/vmlinuz-4.2.0-30-generic Found initrd image: /boot/initrd.img-4.2.0-30-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
Then, 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.5.0-040500-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_004](https://ostechnix.com/wp-content/uploads/2016/03/Ubuntu-16.04-server-Running-Oracle-VM-VirtualBox_004.jpg)
![Ubuntu 16.04 server [Running] - Oracle VM VirtualBox_003](https://ostechnix.com/wp-content/uploads/2016/03/Ubuntu-16.04-server-Running-Oracle-VM-VirtualBox_003.jpg)
Then uninstall the new Kernel with command:
$ sudo apt-get remove linux-headers-4.5* linux-image-4.5*
Finally reboot your system.
I personally experienced that Oracle VirtualBox doesn't work properly after upgrading to the latest Kernel. When I start a guest, it showed the following error:
Kernel driver not installed (rc=-1908)
If you encountered with similar error, refer the following guide to fix the problem.
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!!
