In this article, we will guide you through the process of downgrading a kernel in RHEL8.
This is useful when you have recently updated your kernel and noticed some issues after the maintenance. However, instead of downgrade, it is recommended to restore the root device from the backup that was taken right before the update to avoid any complications.
To downgrade the kernel in RHEL8, you need to follow specific steps.
- Get info on all kernels installed
grubby --info=ALL | grep -B1 '^kernel='
(example output):
[root@rac1 ~]# grubby --info=ALL|grep -B1 '^kernel='
index=0
kernel="/boot/vmlinuz-5.4.17-2136.327.2.el8uek.x86_64"
--
index=1
kernel="/boot/vmlinuz-5.4.17-2136.325.5.1.el8uek.x86_64"
--
index=2
kernel="/boot/vmlinuz-4.18.0-513.11.0.1.el8_9.x86_64"
--
index=3
kernel="/boot/vmlinuz-4.18.0-513.9.1.el8_9.x86_64"
--
index=4
kernel="/boot/vmlinuz-0-rescue-f455dad33cb943b59d7415472ee872c7"
- Update the default kernel in the grub2 config
grubby --set-default <boot entry for your old kernel>
(example output):
grubby --set-default /boot/vmlinuz-4.18.0-513.9.1.el8_9.x86_64
- Confirm the default kernel to make sure that it has been changed properly
grubby --default-kernel
- Make sure that the additional kernel packages are installed
During the update process, some packages for the old kernel might have been removed. Confirm that the following necessary packages with the same version as the old kernel are installed on the system using rpm -q <package_name>.
kernel-devel
kernel-core
kernel-modules
kernel-headers
kernel-tools
kernel-tools-libs
kernel-modules-extra
For example, if you are downgrading to kernel-4.18.0-513.9.1.el8_9.x86_64, you need to have:
kernel-devel-4.18.0-513.9.1.el8_9.x86_64
kernel-core-4.18.0-513.9.1.el8_9.x86_64
kernel-modules-4.18.0-513.9.1.el8_9.x86_64
kernel-headers-4.18.0-513.9.1.el8_9.x86_64
kernel-tools-4.18.0-513.9.1.el8_9.x86_64
kernel-tools-libs-4.18.0-513.9.1.el8_9.x86_64
kernel-modules-extra-4.18.0-513.9.1.el8_9.x86_64
Note: If any packages are missing and are not of the same version as the current kernel, the FlashGrid service may fail to start.
- Reboot the node
- In the case of FlashGrid Cluster, follow Reboot the node procedure
- If using FlashGrid Server, follow Rebooting a system procedure
- Check the status using the following command
flashgrid-cluster
- In the case of using FlashGrid Cluster, before repeating the steps on the next node, wait until the node boots up, all disks are back online, and resyncing operations are complete on all disk groups. All disk groups must have zero offline disks, and Resync = No before it is safe to update the next node.
Note: If you are using ACFS, you should reinstall the module by following the steps specified in How To Install/Reinstall Or Deinstall ACFS Modules/Installation Manually? (Doc ID 1371067.1)