Home » Linux » How To » How to Install Kernel 4.12 in CentOS 7

How to Install Kernel 4.12 in CentOS 7

Back in May, Linus Torvalds released Linux kernel 4.11, which was codenamed Fearless Coyote. It came with scalable SSD swapping, AMDGPU power management improvement, new perf trace tool, SMC-R support, etc. Now, after releasing 7 release candidates, the final Linux kernel 4.12 has been shipped.

In his release announcement, Linux boss emphasized that kernel 4.12 is the second biggest release in terms of commits. Before this, Linux kernel 4.9 was a big release because it was an LTS release.

Linux kernel 4.12 has undergone a normal release cycle. “There’s also nothing particularly odd going on in the tree – it’s all just normal development, just more of it that usual,” Torvalds added.

For the new version, about fifteen thousand changes to the source code management system have been made. Also, the number of lines of code in Linux kernel is now 24.2 million, according to Heise.

Linux kernel 4.12 features

  • One of the biggest changes in Linux kernel 4.12 comes in the form of support for AMD’s Vega GPUs by the AMDGPU driver. It’s an initial support; more improvements would be made in the future.
  • Switching to the world of NVIDIA, Linux kernel 4.12 brings initial GTX 1000 Pascal accelerated support. However, currently, there isn’t any re-clocking support.
  • Two new I/O schedulers have also found a place in Linux kernel. These schedules are Facebook’s Kyber I/O scheduler and BFQ (Budget Fair Queueing). The other disk/file related features are XFS support for GETFSMAP and RAID 5/6 fixes.
  • In Linux kernel 4.12, the Intel atomic mode is turned on by default. This setting allows setting the output modes easily and avoiding any ugly situation.
  • The POWER 9 and POWER architectures now support up to 512TB of virtual address spaces. Improvements have also been made to power management in Gemini Lake chips.

Please note that it’s a very brief list of changes. You can read about them (and others) in detail at Phoronix and KernelNewbies.

Latest kernel can be download from kernel.org

To avoid complex compilation process, I used rpm pre-build packages from elrepo.org.

Check current kernel version

[root@localhost ~]# uname -sr
Linux 3.10.0-514.21.2.el7.x86_64

Let’s start, install kernel

Add the repository

[root@localhost ~]# rpm --import https://www.elrepo.org/RPM-GPG-KEY-elrepo.org
[root@localhost ~]# rpm -Uvh http://www.elrepo.org/elrepo-release-7.0-2.el7.elrepo.noarch.rpm
Retrieving http://www.elrepo.org/elrepo-release-7.0-2.el7.elrepo.noarch.rpm
Preparing... ################################# [100%]
Updating / installing...
1:elrepo-release-7.0-2.el7.elrepo ################################# [100%]

Install check the available kernel packages

[root@localhost ~]# yum --disablerepo="*" --enablerepo="elrepo-kernel" list available
Loaded plugins: fastestmirror
elrepo-kernel | 2.9 kB 00:00:00
elrepo-kernel/primary_db | 1.7 MB 00:00:00
Loading mirror speeds from cached hostfile
* elrepo-kernel: ca.mirror.babylon.network
Available Packages
kernel-lt.x86_64 4.4.76-1.el7.elrepo elrepo-kernel
kernel-lt-devel.x86_64 4.4.76-1.el7.elrepo elrepo-kernel
kernel-lt-doc.noarch 4.4.76-1.el7.elrepo elrepo-kernel
kernel-lt-headers.x86_64 4.4.76-1.el7.elrepo elrepo-kernel
kernel-lt-tools.x86_64 4.4.76-1.el7.elrepo elrepo-kernel
kernel-lt-tools-libs.x86_64 4.4.76-1.el7.elrepo elrepo-kernel
kernel-lt-tools-libs-devel.x86_64 4.4.76-1.el7.elrepo elrepo-kernel
kernel-ml.x86_64 4.12.0-1.el7.elrepo elrepo-kernel
kernel-ml-devel.x86_64 4.12.0-1.el7.elrepo elrepo-kernel
kernel-ml-doc.noarch 4.12.0-1.el7.elrepo elrepo-kernel
kernel-ml-headers.x86_64 4.12.0-1.el7.elrepo elrepo-kernel
kernel-ml-tools.x86_64 4.12.0-1.el7.elrepo elrepo-kernel
kernel-ml-tools-libs.x86_64 4.12.0-1.el7.elrepo elrepo-kernel
kernel-ml-tools-libs-devel.x86_64 4.12.0-1.el7.elrepo elrepo-kernel
perf.x86_64 4.12.0-1.el7.elrepo elrepo-kernel
python-perf.x86_64 4.12.0-1.el7.elrepo elrepo-kernel
[root@localhost ~]#

You can see Kernel 4.12 already added to the repositry.
Let’s Install the packages

[root@localhost ~]# yum --enablerepo=elrepo-kernel install kernel-ml
Loaded plugins: fastestmirror
elrepo | 2.9 kB 00:00:00
elrepo/primary_db | 427 kB 00:00:00
Loading mirror speeds from cached hostfile
* base: mirror2.evolution-host.com
* elrepo: ca.mirror.babylon.network
* elrepo-kernel: ca.mirror.babylon.network
* extras: mirror2.evolution-host.com
* updates: mirror.gpmidi.net
Resolving Dependencies
--> Running transaction check
---> Package kernel-ml.x86_64 0:4.12.0-1.el7.elrepo will be installed
--> Finished Dependency Resolution

Dependencies Resolved

Package Arch Version Repository Size
kernel-ml x86_64 4.12.0-1.el7.elrepo elrepo-kernel 42 M

Transaction Summary
Install 1 Package

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

kernel-ml.x86_64 0:4.12.0-1.el7.elrepo

Set default boot order to 0 in file /etc/default/grub

GRUB_DISTRIBUTOR="$(sed 's, release .*$,,g' /etc/system-release)"
GRUB_CMDLINE_LINUX="crashkernel=auto rd.lvm.lv=cl/root rd.lvm.lv=cl/swap rhgb quiet"

Update grub configuration

[root@localhost ~]# grub2-mkconfig -o /boot/grub2/grub.cfg
Generating grub configuration file ...
Found linux image: /boot/vmlinuz-4.12.0-1.el7.elrepo.x86_64
Found initrd image: /boot/initramfs-4.12.0-1.el7.elrepo.x86_64.img
Found linux image: /boot/vmlinuz-3.10.0-514.26.2.el7.x86_64
Found initrd image: /boot/initramfs-3.10.0-514.26.2.el7.x86_64.img
Found linux image: /boot/vmlinuz-3.10.0-514.21.2.el7.x86_64
Found initrd image: /boot/initramfs-3.10.0-514.21.2.el7.x86_64.img
Found linux image: /boot/vmlinuz-3.10.0-514.el7.x86_64
Found initrd image: /boot/initramfs-3.10.0-514.el7.x86_64.img
Found linux image: /boot/vmlinuz-0-rescue-f2aceb5b6ceb47ca819620311867dca6
Found initrd image: /boot/initramfs-0-rescue-f2aceb5b6ceb47ca819620311867dca6.img
Found linux image: /boot/vmlinuz-0-rescue-c3963a51589b4ceabb9df1406a2409ec
Found initrd image: /boot/initramfs-0-rescue-c3963a51589b4ceabb9df1406a2409ec.img
[root@localhost ~]#

Reboot the system.

Now you should see system has been loaded with Kernel 4.12

[root@localhost ~]# uname -sr
Linux 4.12.0-1.el7.elrepo.x86_64

Now you learned how to install Kernel 4.12 in CentOS 7. If you like the article, share, comment, subscribe.

Check Also

Password less SSH authentication

Password less SSH authentication is one of the best security practices to avoid any password …

Leave a Reply

Your email address will not be published. Required fields are marked *