Main Menu

Search

ORACLE LINUX 8: How to Uninstall UEK Kernel and Make Redhat Compatible Kernel (RHCK) Default Boot Kernel?

Following are steps to Uninstall UEK Kernel and Make Redhat Compatible Kernel (RHCK) Default Boot Kernel in Oracle Linux 8 (OL8)

1) List the currently installed kernels using "rpm -qa" command as shown below.

As we can see we have both Oracle UEK7 kernel 5.15.x and RHCK kernel 4.18.x installed.

# rpm -qa | egrep -i kernel

kernel-tools-libs-4.18.0-553.34.1.el8_10.x86_64

kernel-core-4.18.0-553.34.1.el8_10.x86_64

kernel-uek-core-5.15.0-304.171.4.el8uek.x86_64

kernel-headers-4.18.0-553.34.1.el8_10.x86_64

kernel-tools-4.18.0-553.34.1.el8_10.x86_64

kernel-uek-5.15.0-304.171.4.el8uek.x86_64

kernel-uek-modules-5.15.0-304.171.4.el8uek.x86_64

kernel-modules-4.18.0-553.34.1.el8_10.x86_64

kernel-devel-4.18.0-553.34.1.el8_10.x86_64

kernel-uek-devel-5.15.0-304.171.4.el8uek.x86_64

kernel-4.18.0-553.34.1.el8_10.x86_64

2) List the grub order of the Kernels using grubby command as shown below. In below command it will show the ordering of the kernel, starting line with 0 and then increment. As you can see in below output boot order 0 is for UEK kernel 5.15.x and boot order 1 is for RHCK kernel 4.18.x

#sudo grubby --info=ALL | grep title | nl -v 0


0  title="Oracle Linux Server (5.15.0-304.171.4.el8uek.x86_64 with Unbreakable Enterprise Kernel) 8.10"

1  title="Oracle Linux Server (4.18.0-553.34.1.el8_10.x86_64) 8.10"

title="Oracle Linux Server 8 (0-rescue-b5bf925c42f4075a28da8441ac55fcdf) "

3) List default bootup kernel using grubby command as follows. As you can see default bootup kernel is UEK7 kernel 5.15.

#sudo grubby --default-kernel

/boot/vmlinuz-5.15.0-304.171.4.el8uek.x86_64

4) Change the default kernel to RHCK kernel using grubby command and order number corresponding to RHCK kernel from above step (2). In this case RHCK kernel boot order is 1.

# sudo grub2-set-default 1

5)  Verify that the default kernel changed to RHCK kernel.

sudo grubby --default-kernel

/boot/vmlinuz-4.18.0-553.34.1.el8_10.x86_64

6) Now reboot the Node using reboot command.

#sudo reboot -n


7) After the reboot log back into the node and check the default kernel as follows. You should see default kernel as RHCK kernel.

#sudo grubby --default-kernel

/boot/vmlinuz-4.18.0-553.34.1.el8_10.x86_64

8) Check whether the currently active kernel is RHCK kernel using uname command as follows:

#uname -r

4.18.0-553.34.1.el8_10.x86_64

9) Now remove kernel-uek* packages to uninstall UEK kernel as follows:

#sudo dnf -y remove kernel-uek*

10) Backup /etc/sysconfig/kernel file. And update the file to change below DEFAULTKERNEL line

From

DEFAULTKERNEL=kernel-core

To

DEFAULTKERNEL=kernel

11) Reboot the VM again and log back in.


- - - 

Keywords added for Search:

uninstallation

No comments:

Post a Comment