Install Linux Kernel 4.0 in CentOS and Ubuntu

2
15236

Install Linux Kernel 4.0 in RPM based systems

I am going to show you how to install Kernel 4.0 in RPM based systems, for example CentOS 7.

Here is my CentOS 7 system’s current kernel version:

uname -r

Output:

3.10.0-229.1.2.el7.x86_64

ELRepo Repository has the latest stable Kernel 4.0. So let us add this repository in our CentOS 7 system.

First, add ELRepo GPG key:

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

Add ELRepo now:

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

Finally, enable ELRepo and install Kernel 4.0 using command:

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

Enter ‘Y’ to continue.

Loaded plugins: fastestmirror
elrepo                                                   | 2.9 kB     00:00     
elrepo-kernel                                            | 2.9 kB     00:00     
(1/2): elrepo/primary_db                                   | 229 kB   00:03     
(2/2): elrepo-kernel/primary_db                            | 779 kB   00:07     
Loading mirror speeds from cached hostfile
 * base: mirrors.vonline.vn
 * elrepo: mirrors.thzhost.com
 * elrepo-kernel: mirrors.thzhost.com
 * epel: ftp.cuhk.edu.hk
 * extras: mirrors.vonline.vn
 * updates: centosmirror.go4hosting.in
Resolving Dependencies
--> Running transaction check
---> Package kernel-ml.x86_64 0:4.0.0-1.el7.elrepo will be installed
--> Finished Dependency Resolution

Dependencies Resolved

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

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

Total download size: 36 M
Installed size: 163 M
Is this ok [y/d/N]: y

That’s it. Reboot your system. Select kernel 4.0 and hit Enter key.

CentOS 7 -1 [Running] - Oracle VM VirtualBox_002Now, check if Kernel 4.0 is correctly installed:

uname -r

Output:

4.0.0-1.el7.elrepo.x86_64

If you want to install Kernel 4.0 on a system with Secure Boot enabled, refer this link.

If you had any problems after installing the new Kernel, reboot your system. Select previous Kernel from the boot menu.

Finally, remove the Kernel 4.0 using command:

yum remove kernel-ml

Reboot your system once again to use the previous kernel.