After two months of continues development, Linux Kernel 4.7 final version is made available for download for all GNU/Linux operating systems. Yesterday, July 24, 2016, Linux Torvalds wrote in the release notes,
So, after a slight delay due to my travels, I'm back, and 4.7 is out.
Also, he mentioned in the release notes that the development for the next version 4.8 has already been opened.
For more details, check the release notes.
In this brief tutorial, We will see how to install Linux Kernel 4.7 version in CentOS 7 and Ubuntu 16.04 LTS.
Install Linux Kernel 4.7 in CentOS 7
I Have successfully installed and tested Kernel 4.7 on CentOS 7 64 bit edition. Although, It might work on other RPM versions such as 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
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.7.
Let us find out the current version details with command:
uname -r
Sample output:
3.10.0-327.22.2.el7.x86_64
As you see, the installed version is 3.10.0-327.22.2.el7.x86_64.
Now, Install Linux Kernel 4.7 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:
Loaded plugins: fastestmirror elrepo-kernel | 2.9 kB 00:00 elrepo-kernel/primary_db | 1.6 MB 00:09 Loading mirror speeds from cached hostfile * base: centos.excellmedia.net * elrepo: elrepo.org * elrepo-kernel: elrepo.org * epel: mirror.rise.ph * extras: centos.excellmedia.net * updates: centos.excellmedia.net Resolving Dependencies --> Running transaction check ---> Package kernel-ml.x86_64 0:4.7.0-1.el7.elrepo will be installed --> Finished Dependency Resolution Dependencies Resolved ======================================================================================================================================= Package Arch Version Repository Size ======================================================================================================================================= Installing: kernel-ml x86_64 4.7.0-1.el7.elrepo elrepo-kernel 39 M Transaction Summary ======================================================================================================================================= Install 1 Package Total download size: 39 M Installed size: 175 M Is this ok [y/d/N]: n Exiting on user command Your transaction was saved, rerun it with: yum load-transaction /tmp/yum_save_tx.2016-07-25.16-04.bhKKxr.yumtx [root@server1 ~]# clear [3;J [root@server1 ~]# yum --enablerepo=elrepo-kernel install kernel-ml Loaded plugins: fastestmirror Loading mirror speeds from cached hostfile * base: centos.excellmedia.net * elrepo: elrepo.org * elrepo-kernel: elrepo.org * epel: mirror.rise.ph * extras: centos.excellmedia.net * updates: centos.excellmedia.net Resolving Dependencies --> Running transaction check ---> Package kernel-ml.x86_64 0:4.7.0-1.el7.elrepo will be installed --> Finished Dependency Resolution Dependencies Resolved ======================================================================================================================================= Package Arch Version Repository Size ======================================================================================================================================= Installing: kernel-ml x86_64 4.7.0-1.el7.elrepo elrepo-kernel 39 M Transaction Summary ======================================================================================================================================= Install 1 Package Total download size: 39 M Installed size: 175 M Is this ok [y/d/N]: y Downloading packages: kernel-ml-4.7.0-1.el7.elrepo.x86_64.rpm | 39 MB 00:03:12 Running transaction check Running transaction test Transaction test succeeded Running transaction Warning: RPMDB altered outside of yum. Installing : kernel-ml-4.7.0-1.el7.elrepo.x86_64 1/1 Verifying : kernel-ml-4.7.0-1.el7.elrepo.x86_64 1/1 Installed: kernel-ml.x86_64 0:4.7.0-1.el7.elrepo Complete!

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

Check the Kernel version using command:
uname -r
Sample output:
4.7.0-1.el7.elrepo.x86_64
Congratulation! Your CentOS 7 system is currently running on Kernel 4.7.
Have any problems after installing the new Linux Kernel? No worries, reboot your system. Select your previously working Kernel from the Boot menu.
Then, remove the newly installed Kernel using command:
yum remove kernel-ml
That’s it.
Install Linux Kernel 4.7 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-22-generic
As you see, my Ubuntu 16.04 system has 4.4.0-22-generic kernel version.
Now, we will install Linux Kernel 4.7. You can download the latest kernel from the following link.
For 64 bit Ubuntu systems:
wget http://kernel.ubuntu.com/~kernel-ppa/mainline/v4.7/linux-headers-4.7.0-040700_4.7.0-040700.201608021801_all.deb
wget http://kernel.ubuntu.com/~kernel-ppa/mainline/v4.7/linux-headers-4.7.0-040700-generic_4.7.0-040700.201608021801_amd64.deb
wget http://kernel.ubuntu.com/~kernel-ppa/mainline/v4.7/linux-image-4.7.0-040700-generic_4.7.0-040700.201608021801_amd64.deb
For 32 bit Ubuntu systems:
wget http://kernel.ubuntu.com/~kernel-ppa/mainline/v4.7/linux-headers-4.7.0-040700_4.7.0-040700.201608021801_all.deb
wget http://kernel.ubuntu.com/~kernel-ppa/mainline/v4.7/linux-headers-4.7.0-040700-generic_4.7.0-040700.201608021801_i386.deb
wget http://kernel.ubuntu.com/~kernel-ppa/mainline/v4.7/linux-image-4.7.0-040700-generic_4.7.0-040700.201608021801_i386.deb
Then install Kernel 4.7 using command:
sudo dpkg -i *.deb
Finally, update the Grub boot loader with command:
sudo update-grub
Sample output:
Selecting previously unselected package linux-headers-4.7.0-040700. (Reading database ... 91554 files and directories currently installed.) Preparing to unpack linux-headers-4.7.0-040700_4.7.0-040700.201607241632_all.deb ... Unpacking linux-headers-4.7.0-040700 (4.7.0-040700.201607241632) ... Selecting previously unselected package linux-headers-4.7.0-040700-generic. Preparing to unpack linux-headers-4.7.0-040700-generic_4.7.0-040700.201607241632_amd64.deb ... Unpacking linux-headers-4.7.0-040700-generic (4.7.0-040700.201607241632) ... Selecting previously unselected package linux-image-4.7.0-040700-generic. Preparing to unpack linux-image-4.7.0-040700-generic_4.7.0-040700.201607241632_amd64.deb ... Done. Unpacking linux-image-4.7.0-040700-generic (4.7.0-040700.201607241632) ... Setting up linux-headers-4.7.0-040700 (4.7.0-040700.201607241632) ... Setting up linux-headers-4.7.0-040700-generic (4.7.0-040700.201607241632) ... Setting up linux-image-4.7.0-040700-generic (4.7.0-040700.201607241632) ... 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.7.0-040700-generic /boot/vmlinuz-4.7.0-040700-generic run-parts: executing /etc/kernel/postinst.d/initramfs-tools 4.7.0-040700-generic /boot/vmlinuz-4.7.0-040700-generic update-initramfs: Generating /boot/initrd.img-4.7.0-040700-generic W: mdadm: /etc/mdadm/mdadm.conf defines no arrays. run-parts: executing /etc/kernel/postinst.d/unattended-upgrades 4.7.0-040700-generic /boot/vmlinuz-4.7.0-040700-generic run-parts: executing /etc/kernel/postinst.d/update-notifier 4.7.0-040700-generic /boot/vmlinuz-4.7.0-040700-generic run-parts: executing /etc/kernel/postinst.d/zz-update-grub 4.7.0-040700-generic /boot/vmlinuz-4.7.0-040700-generic Generating grub configuration file ... Found linux image: /boot/vmlinuz-4.7.0-040700-generic Found initrd image: /boot/initrd.img-4.7.0-040700-generic Found linux image: /boot/vmlinuz-4.4.0-22-generic Found initrd image: /boot/initrd.img-4.4.0-22-generic Found linux image: /boot/vmlinuz-4.4.0-21-generic Found initrd image: /boot/initrd.img-4.4.0-21-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.7.0-040700-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.
Select the old Kernel which is working without any issues.
Then uninstall the new Kernel with command:
sudo apt-get remove linux-headers-4.7* linux-image-4.7*
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.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.7 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!!

![CentOS 7 -1 [Running] - Oracle VM VirtualBox_003](https://ostechnix.com/wp-content/uploads/2016/07/CentOS-7-1-Running-Oracle-VM-VirtualBox_003.png)
![Ubuntu 16.04 server [Running] - Oracle VM VirtualBox_002](https://ostechnix.com/wp-content/uploads/2016/05/Ubuntu-16.04-server-Running-Oracle-VM-VirtualBox_002-1.png)
![Ubuntu 16.04 Server [Running] - Oracle VM VirtualBox_005](https://ostechnix.com/wp-content/uploads/2016/07/Ubuntu-16.04-Server-Running-Oracle-VM-VirtualBox_005.png)
5 comments
For Ubuntu, 64 bit system: replace the link,
“linux-headers-4.7.0-040700_4.7.0-040700.201607241632_all.deb” by “linux-headers-4.7.0-040700_4.7.0-040700.201608021801_all.deb”
and
“linux-headers-4.7.0-040700-generic_4.7.0-040700.201607241632_amd64.deb” by “linux-headers-4.7.0-040700-generic_4.7.0-040700.201608021801_amd64.deb”
also
“linux-image-4.7.0-040700-generic_4.7.0-040700.201607241632_amd64.deb” by “linux-image-4.7.0-040700-generic_4.7.0-040700.201608021801_amd64.deb”
Other scripts will remain unchanged..
For Ubuntu, 32 bit system: replace the link,
“linux-headers-4.7.0-040700_4.7.0-040700.201607241632_all.deb” by “linux-headers-4.7.0-040700_4.7.0-040700.201608021801_all.deb”
and
“linux-headers-4.7.0-040700-generic_4.7.0-040700.201607241632_i386.deb” by “linux-headers-4.7.0-040700-generic_4.7.0-040700.201608021801_i386.deb”
also
“linux-image-4.7.0-040700-generic_4.7.0-040700.201607241632_i386.deb” by “linux-image-4.7.0-040700-generic_4.7.0-040700.201608021801_i386.deb”
Other scripts will remain unchanged..
If you don’t commit these changes then this error might show in your terminal: “HTTP request sent, awaiting response… 404 Not Found update ”
Thank you
Thank you Mate. I have updated the guide with new links. Much appreciated.
In my case in CentOS 7.
There is error when reboot after installation.
“error: /vmlinuz-4.7.2-1.el7.elrepo.X86_64 has inalid signature.”
“error: you need to load the kernel first.”
How can I solve the error?
Thank you.
I guess you need to turn off secure boot. Have a look at this thread. https://www.centos.org/forums/viewtopic.php?t=49995
Thank you for the reply.