By default, Oracle Enterprise Linux (OEL) will use the 'Unbreakable Enterprise Kernel (UEK)' instead of the usual kernel shipped with rhel. Some workloads however require running the rhel kernel due to compatibility.
Replacing the kernel is actually fairly simple but it requires a reboot, so downtime is expected. I'll be demonstrating this using oel8 but the steps should be similar for oel7 or oel9.
First, edit the default kernel sysconfig-file:
[root@oel8 ~]# sed -e 's/DEFAULTKERNEL=kernel-uek/DEFAULTKERNEL=kernel/g' -i /etc/sysconfig/kernel
Next, install the 'kernel-core' package:
[root@oel8 ~]# dnf -4y --refresh install kernel-core
List all available kernel images using grubby:
[root@oel8 ~]# grubby --info ALL | grep -iE '^kernel'
Now set the rhel kernel to boot on next reboot:
[root@oel8 ~]# grubby --set-default /boot/vmlinuz-4.18.0-513.18.1.el8_9.x86_64
A reboot is now required in order to remove the kernel-uek packages:
[root@oel8 ~]# systemctl reboot
Verify that the kernel version is correct and remove the'kernel-uek' packages:
[root@oel8 ~]# uname -r
[root@oel8 ~]# dnf -4y --refresh remove kernel-uek*
That concludes all steps required to switch to the rhel kernel on a oracle linux installation.
Feel free to comment and / or suggest a topic.
Comments
Post a Comment