How to properly update kernel in RHEL/CentOS 7/8 Linux
September 20, 2020 at 2:25 pm Leave a comment
When you perform a yum update in CentOS 7 or higher , you will notice the newer kernel version is not reflected. You can use the below commands to verify the current version.
#uname -r
#hostnamectl
You can confirm whether the new kernel is installed successfully or not by using the command below;
#yum list kernel
#grep saved /boot/grub2/grubenv
In order to apply the kernel you need to restart the server.
In some instances you need to manually set the correct kernel version to boot by using the below commands;
#awk -F\’ ‘$1==”menuentry ” {print i++ ” : ” $2}’ /etc/grub2.cfg
(If you have multiple versions installed all of them will be listed with 0 , 1 & etc. In the example the newer version is 0,)
#sudo grub2-set-default 0
Source1: https://www.howtoforge.com/
Source2: https://www.golinuxcloud.com/
Trackback this post | Subscribe to the comments via RSS Feed