Switching Default UEK kernel to Redhat Kernel on Oracle Linux 7

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

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.

READ  How to Upload and Install a Blogger Template

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.

READ  How to Configure Static IP Address on RHEL 7.0/CentOS 7.0/Oracle Linux 7

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.

Source

1 comment
  1. Nikolay
    Nikolay
    January 4, 2016 at 5:15 am

    Thanks a lot, this is very useful!

    Reply
Leave a Reply

Your email address will not be published. Required fields are marked *

SiteGround.com

A world leading hosting company that provides fully-managed innovative and secure solutions, suitable for hosting small to medium-sized websites

Built on the best available technologies combined with Google Cloud for strong redundancy and application availability. Backed by skilled experts to address web security threats, a devops team to create advanced custom security solutions, and 24/7 sysadmins to watch over the platform. This powerful, hands-on approach makes your sites faster, safer, and easier to manage. Starting from only $3.95/mo.

TRY FREE

* up to 30 days money back guarantee