How To Upgrade Kernel Version on RHEL 7/Centos 7

In this article we are going to learn How to Upgrade Kernel Version on RHEL 7/Centos 7 Operating system. The Stable Version and Latest Version of Kernel is 4.12.10 in Centos 7. Before Upgrading Kernel version to latest stable version you need to check compatibility issues with applications running in server (which are kernel dependent).  Most of the situations in productions systems upgrading kernel version is not an good practice.

Features of  Kernel 4.12 version:

  1. In linux kernel 4.12 , support for AMD’s  vega GPUs by the AMDGPU cards.
  2. It brings initial GTX 1000 pascal accelerated support.
  3. Support for Intel Real-sense SR300 camera, Razer sabertooth & Mad Catz Brawlstick.
  4. USB Type-C port manager
  5. I/O schedulers have also found a place in Linux kenrel. These schedulers are Facebook’s kyber I/O scheduler and BFQ(Budget Fair Queueing).
  6. The other disk/file related features are XFS support for GETFSMAP and RAID 5/6 fixes.
  7. In this kernel , the intel atomic mode is turned on by default. This settings allows setting the output modes easily and avoiding  any ugly situation.
  8. The power architectures and power 9 now supprt up to 512TB of virtual address spaces. Improvements have also been made to power anager

To check kernel version on your machine.

[root@lab ~]# uname -r

How to Upgrade Kernel Version on RHEL 7

Add ELEREPO  GPG key and install the repository for the  RHEL 7/ Centos 7

[root@lab ~]# rpm --import https://www.elrepo.org/RPM-GPG-KEY-elrepo.org
[root@lab ~]# rpm -Uvh http://www.elrepo.org/elrepo-release-7.0-2.el7.elrepo.noarch.rpm
Updating / installing...
1:elrepo-release-7.0-3.el7.elrepo ################################# [100%]
To check the available kernel packages
[root@lab ~]# yum --disablerepo="*" --enablerepo="elrepo-kernel" list available
Loaded plugins: amazon-id, rhui-lb, search-disabled-repos
elrepo-kernel                      | 2.9 kB 00:00:00
elrepo-kernel/primary_db           | 1.7 MB 00:00:00
Available Packages
kernel-ml.x86_64                   4.12.10-1.el7.elrep            elrepo-kernel

Install the kernel packages using yum command

[root@lab ~]# yum --enablerepo=elrepo-kernel install kernel-ml
Installed:
kernel-ml.x86_64 0:4.12.10-1.el7.elrepo
Dependency Installed:
linux-firmware.noarch 0:20170606-56.gitc990aae.el7
Complete!

Edit the “/etc/default/grub” file and set default boot order to “0”

[root@lab ~]# vi /etc/default/grub
GRUB_TIMEOUT=1
GRUB_DISTRIBUTOR="$(sed 's, release .*$,,g' /etc/system-release)"
GRUB_DEFAULT=0                    
GRUB_DISABLE_SUBMENU=true
GRUB_TERMINAL_OUTPUT="console"
GRUB_CMDLINE_LINUX="console=ttyS0,115200n8 console=tty0 net.ifnames=0 crashkernel=auto"
GRUB_DISABLE_RECOVERY="true"

Upgrade the grub configuration for latest kernel. RE-compile your grub configuration to boot with latest Kernel version

[root@lab ~]# grub2-mkconfig -o /boot/grub2/grub.cfg
Generating grub configuration file ...
Found linux image: /boot/vmlinuz-4.12.10-1.el7.elrepo.x86_64
Found initrd image: /boot/initramfs-4.12.10-1.el7.elrepo.x86_64.img
Found linux image: /boot/vmlinuz-3.10.0-693.el7.x86_64
Found initrd image: /boot/initramfs-3.10.0-693.el7.x86_64.img
Found linux image: /boot/vmlinuz-0-rescue-164021837e1e44d996ee35429af77920
Found initrd image: /boot/initramfs-0-rescue-164021837e1e44d996ee35429af77920.img
Found linux image: /boot/vmlinuz-0-rescue-303438b592944839a1185ff3029c6086
Found initrd image: /boot/initramfs-0-rescue-303438b592944839a1185ff3029c6086.img
done

Now Reboot the machine

To check the kernel latest version

[root@lab ~]# uname -r
4.12.10-1.el7.elrepo.x86_64

Conclusion

Upgrading Kernel Version on RHEL 7/Centos 7 by seeing steps looks simple but there are lot of other dependencies you have to verify before upgrading kernel version.

Related Articles

HowTo Disable IPv6 Version Centos7

HowTo Install KVM Centos7

Check Latest Version of Kernel

Thanks for your wonderful Support and Encouragement

ARK

My Name is ARK. Expert in grasping any new technology, Interested in Sharing the knowledge. Learn more & Earn More

You may also like...

Leave a Reply