How to switch back from Oracle Kernel to RedHat?

Hello friends,

We have RHEL 7.5 server with latest updates. We needed to install Oracle 12 DB on it so chose "easy method" of installing "oracle-database-server-12cR2-preinstall-1.0-3.el7.x86_64.rpm" and then installed oracle DB. Everything went smooth and all OK but later we noticed that it has Oracle Kernel ver 4.14 uek installed instead of using Redhat's 3.10 ver. and using updates from Oracle rep. I managed to configure it back to use updates from Redhat (as we have support from RH) but not sure how to switch the kernel back to Redhat's by keeping all the software (esp Oracle) intact. Redhat is NOT providing any support as this server running Oracle kernel.

We can see both Oracle kernel entries & Redhat entries in grub.conf but not sure If I can simply boot Redhat 3.x kernel with oracle too working fine.

Could anyone please advise how to switch back to RH kernel without breaking anything else? I know rebuilding the server from scratch and not choosing "preinstall rpm" method will fix that but that's a too long process.

Many Thanks!

In the future, I recommend you do these kind of serious database upgrades on a development server first:

installing "oracle-database-server-12cR2-preinstall-1.0-3.el7.x86_64.rpm" 

Now that you have done this without a backup, you have a problem.

Is that server now in production and giving errors?

Or it is not working at all, and your upgrade has killed it?

What is the core problem?

1 Like

Thanks Neo for your reply.

It's a production machine and what we did was a fresh install of Oracle 12 (not upgrade). I do have backup but restoring backup is going to need me to install/configure Oracle again.

There's no problem with server except for it is running Oracle Kernel instead of Redhat's which resulted the server to become UNsupported (by Redhat). As per our company policy, all machines must be supported by Redhat only.

There're lot of prerequisites to fulfill for Oracle installation on RHEL but Oracle offers an RPM (mentioned above) does it by itself everything but also it also does few extra things like changing RHEL kernel to Oracle, pointing server to Oracle Repositories for future updates etc. Now that its running oracle kernel it is NOT supported by Redhat and I would like to know how can I switch from Oracle kernel to RHEL kernel without breaking anything.

[root@lnxoraprod02 ~]#   cat /boot/grub/grub.conf
# grub.conf generated by anaconda
#
# Note that you do not have to rerun grub after making changes to this file
# NOTICE:  You have a /boot partition.  This means that
#          all kernel and initrd paths are relative to /boot/, eg.
#          root (hd0,0)
#          kernel /vmlinuz-version ro root=/dev/mapper/SystemVG-rootLV
#          initrd /initrd-[generic-]version.img
#boot=/dev/sda
default=1
timeout=5
splashimage=(hd0,0)/grub/splash.xpm.gz
hiddenmenu
password --encrypted $1$d.7ueHQC$Ws5Ng6pSgmuTpWpNMorHT0
title Oracle Linux Server 7.5, with Linux 3.10.0-862.11.6.el7.x86_64
        root (hd0,0)
        kernel /vmlinuz-3.10.0-862.11.6.el7.x86_64 root=/dev/mapper/SystemVG-rootLV ro rd.lvm.lv=SystemVG/swapLV rd.luks=0 KEYBOARDTYPE=pc vconsole.keymap=uk rd.locale.LANG=en_GB.UTF-8 rd.md=0 rd.lvm.lv=SystemVG/rootLV vconsole.font=latarcyrheb-sun16 crashkernel=auto rd.dm=0 rhgb quiet rhgb quiet LANG=en_GB.UTF-8
        initrd /initramfs-3.10.0-862.11.6.el7.x86_64.img
title Oracle Linux Server 7.5, with Unbreakable Enterprise Kernel 4.14.35-1818.0.9.el7uek.x86_64
        root (hd0,0)
        kernel /vmlinuz-4.14.35-1818.0.9.el7uek.x86_64 root=/dev/mapper/SystemVG-rootLV ro rd.lvm.lv=SystemVG/swapLV rd.luks=0 KEYBOARDTYPE=pc vconsole.keymap=uk rd.locale.LANG=en_GB.UTF-8 rd.md=0 rd.lvm.lv=SystemVG/rootLV vconsole.font=latarcyrheb-sun16 crashkernel=auto rd.dm=0 rhgb quiet rhgb quiet LANG=en_GB.UTF-8
        initrd /initramfs-4.14.35-1818.0.9.el7uek.x86_64.img
title Red Hat Enterprise Linux Server (3.10.0-862.9.1.el7.x86_64) 7.5 (Maipo)
        root (hd0,0)
        kernel /vmlinuz-3.10.0-862.9.1.el7.x86_64 root=/dev/mapper/SystemVG-rootLV ro rd.lvm.lv=SystemVG/swapLV rd.luks=0 KEYBOARDTYPE=pc vconsole.keymap=uk rd.locale.LANG=en_GB.UTF-8 rd.md=0 rd.lvm.lv=SystemVG/rootLV vconsole.font=latarcyrheb-sun16 crashkernel=auto rd.dm=0 rhgb quiet rhgb quiet LANG=en_GB.UTF-8
        initrd /initramfs-3.10.0-862.9.1.el7.x86_64.img
title Red Hat Enterprise Linux Server 7.5 Rescue d2d830879078ddddf4d061d50000001f (3.10.0-862.el7.x86_64)
        root (hd0,0)
        kernel /vmlinuz-0-rescue-d2d830879078ddddf4d061d50000001f root=/dev/mapper/SystemVG-rootLV ro rd.lvm.lv=SystemVG/swapLV rd.luks=0 KEYBOARDTYPE=pc vconsole.keymap=uk rd.locale.LANG=en_GB.UTF-8 rd.md=0 rd.lvm.lv=SystemVG/rootLV vconsole.font=latarcyrheb-sun16 crashkernel=auto rd.dm=0 rhgb quiet rhgb quiet LANG=en_GB.UTF-8
        initrd /initramfs-0-rescue-d2d830879078ddddf4d061d50000001f.img
title Red Hat Enterprise Linux Server (3.10.0-862.el7.x86_64) 7.5 (Maipo)
        root (hd0,0)
        kernel /vmlinuz-3.10.0-862.el7.x86_64 root=/dev/mapper/SystemVG-rootLV ro rd.lvm.lv=SystemVG/swapLV rd.luks=0 KEYBOARDTYPE=pc vconsole.keymap=uk rd.locale.LANG=en_GB.UTF-8 rd.md=0 rd.lvm.lv=SystemVG/rootLV vconsole.font=latarcyrheb-sun16 crashkernel=auto rd.dm=0 rhgb quiet rhgb quiet LANG=en_GB.UTF-8
        initrd /initramfs-3.10.0-862.el7.x86_64.img
[root@lnxoraprod02 ~]#  uname -a
Linux lnxoraprod02 4.14.35-1818.0.9.el7uek.x86_64 #2 SMP Mon Jun 18 20:32:24 PDT 2018 x86_64 x86_64 x86_64 GNU/Linux
[root@lnxoraprod02 ~]#  rpm -qa |grep -i ora
python-decorator-3.4.0-3.el7.noarch
oracle-database-server-12cR2-preinstall-1.0-3.el7.x86_64
TDP-Oracle.Utility-7.1.0-0.x86_64
oraclelinux-release-7.5-1.0.5.el7.x86_64
TDP-Oracle-7.1.0-0.x86_64
perl-Storable-2.45-3.el7.x86_64
oracle-logos-70.0.3-4.0.7.el7.noarch
[root@lnxoraprod02 ~]#   rpm -qa |grep -i uek
kernel-uek-4.14.35-1818.0.9.el7uek.x86_64
[root@lnxoraprod02 ~]#

Since there was no testing previously in an identical testing machine, this box has become the testing one now. No testing, no confidence in anything.
You can test if it doesn't break anything by rebooting and at the grub menu select the red Red Hat Enterprise Linux Server (3.10.0-862.9.1.el7.x86_64) 7.5 (Maipo). If it boots properly, check that if everything is what's expected. If everything is proper then change the entry in the grub.conf that says default=1 to default=2 which is the third kernel menu corresponding to that version of redhat supported kernel.
Perhaps it is easier to issue the command:

# grub2-set-default 2

That only makes the selection of which kernel to boot from, persistent on reboots and shutdowns.
Depending of the yum configuration there might be issues updating kernels, you might have to set it up to exclude kernels updates in from the oracle repo.
You might want to remove with yum or rpm the title Oracle Linux Server 7.5, with Unbreakable Enterprise Kernel 4.14.35-1818.0.9.el7uek.x86_64 and Oracle Linux Server 7.5, with Linux 3.10.0-862.11.6.el7.x86_64
A lot of testing.

1 Like

Build from scratch.
OUI installer has a nice feature, called response file.

If your environments are the same or similar, it will magically install everything without hours of clicking in those screens.

What i would do is :

  1. Pop a virtualization solution and install RHEL on it.
    Make the network and disk layout as you want it.
  2. Take a snapshot of that box.
  3. Install the 12c database using clicking via GUI.
  4. Save a response file
  5. Check if everything is done exactly as you want it.
  6. Rollback a snapshot, and reinstall from response file.
  7. Examine if desired result is achieved and document it.

ORACLE-BASE - Oracle Universal Installer (OUI) Silent Installations

This will help you in a long run if you initially invest some time in it.

Hacking around with different repositories and rolling back stuff, will only cost you more time in the end.

Regards
Peasant.

2 Likes