About the Unbreakable Enterprise Kernel (UEK)
In September 2010, Oracle announced the new Unbreakable Enterprise Kernel (UEK) for Oracle Linux as a recommended kernel for deployment with Oracle Linux 5.
Starting with Oracle Linux 5.5, Oracle give you could choose to use either the Red Hat Compatible Kernel or the UEK.
In Oracle Linux 5.6 and above, the UEK became the default kernel for Oracle Linux.
Switching Default UEK kernel to Redhat Kernel on Oracle Linux 7
This article will describe how to Switching Default UEK kernel to Redhat Kernel on Oracle Linux 7 with the following steps :
1. Original Kernel for Oracle Linux 7 will likely as below :
# uname -a Linux localhost.localdomain 3.8.13-55.1.6.el7uek.x86_64 #2 SMP Wed Feb 11 14:18:22 PST 2015 x86_64 x86_64 x86_64 GNU/Linux
2. Grep the list of the available kernel in Oracle Linux 7. The sequence of entry will start with 0.
a) To display with command 1 :
# egrep ^menuentry /etc/grub2.cfg | cut -f 2 -d \' Oracle Linux Server 7.1, with Linux 3.10.0-229.el7.x86_64 Oracle Linux Server 7.1, with Unbreakable Enterprise Kernel 3.8.13-55.1.6.el7uek.x86_64 Oracle Linux Server 7.1, with Linux 0-rescue-26ad0b77c2de4840ba8402282bdd9d17
b) To display with command 2 :
# grep '^menuentry' /boot/grub2/grub.cfg | cut -f 2 -d \' Oracle Linux Server 7.1, with Linux 3.10.0-229.el7.x86_64 Oracle Linux Server 7.1, with Unbreakable Enterprise Kernel 3.8.13-55.1.6.el7uek.x86_64 Oracle Linux Server 7.1, with Linux 0-rescue-26ad0b77c2de4840ba8402282bdd9d17
3. Set entry 0 as the default kernel with this command :
# grub2-set-default 0 # grub2-mkconfig -o /etc/grub2.cfg Generating grub configuration file ... Found linux image: /boot/vmlinuz-3.10.0-229.el7.x86_64 Found initrd image: /boot/initramfs-3.10.0-229.el7.x86_64.img Found linux image: /boot/vmlinuz-3.8.13-55.1.6.el7uek.x86_64 Found initrd image: /boot/initramfs-3.8.13-55.1.6.el7uek.x86_64.img Found linux image: /boot/vmlinuz-0-rescue-26ad0b77c2de4840ba8402282bdd9d17 Found initrd image: /boot/initramfs-0-rescue-26ad0b77c2de4840ba8402282bdd9d17.img done
4. Reboot the server :
# init 6
5. After reboot, verify that Red Hat Compatible Kernel will become the default :
# uname -a Linux localhost.localdomain 3.10.0-229.el7.x86_64 #1 SMP Fri Mar 6 04:05:24 PST 2015 x86_64 x86_64 x86_64 GNU/Linux
I hope this article gives you some ideas and essential guidance on how to Switching Default UEK kernel to Redhat Kernel.
Note :
*Do not edit the GRUB 2 configuration file directly. On BIOS-based systems, the configuration file is /boot/grub2/grub.cfg. On UEFI-based systems, the configuration file is /boot/efi/EFI/redhat/grub.cfg.
*The grub2-mkconfig command generates the configuration file using the template scripts in /etc/grub.d and menu-configuration settings taken from the configuration file, /etc/default/grub.
2 Comments
Thanks a lot, this is very useful!
Hello Dimitri
Thank you, a lot, for these tips.
Have you noticed that after these changes, when a kernel upgrade occurs the system defaults to UEK again? how to solve?
regards