Before You Begin

This tutorial describes how to remove the Red Hat Compatible Kernel (RHCK) from an Oracle Linux 6 or Oracle Linux 7 system where the Unbreakable Enterprise Kernel (UEK) is already installed, so that package dependencies are all met appropriately during future system updates.

Background

For compatibility reasons, RHCK is always installed by default on any Oracle Linux system. Since UEK releases are often configured as the default kernel on most Oracle Linux systems, this is usually sufficient to ensure that a system always boots using UEK rather than RHCK. In some cases, you may wish to entirely remove RHCK from an Oracle Linux system to prevent it from ever booting this kernel. Typical use cases for this requirement include use of hardware that is specifically not supported on RHCK but which is supported on a UEK release; or use of software that is dependent on a UEK release and which is not supported on RHCK.

The kernel-transition package enables you to prepare an Oracle Linux 6 or Oracle Linux 7 system for removing RHCK without removing dependent packages, such as bluez, fuse, and irqbalance, which might be needed for system operations. Note that the kernel-transition package does not contain any files itself, but instead transfers the package dependencies from the kernel package to the kernel-uek package.

Note

On Oracle Linux 8 systems, packages are purposely built to avoid dependencies on a particular kernel type. There is no kernel-transition package for Oracle Linux 8 and any kernel that is not currently in use can be removed from the system without impact. For example, to remove RHCK from an Oracle Linux 8 system that is running UEK, you can simply run:

$ sudo dnf remove kernel

What Do You Need?


Removing RHCK from an existing Oracle Linux 6 or Oracle Linux 7 system

On a system where Oracle Linux is already installed and RHCK is available, you can remove RHCK and fix dependencies using the following procedure.

  1. Install the kernel-transition package on the system by running:

    $ sudo yum install kernel-transition

    This command changes the dependencies for important packages from the RHCK to UEK.

  2. Remove RHCK from the system by running:

    $ sudo yum remove kernel

    This command prompts you before removing remaining packages that depend on RHCK.

    Caution!

    When yum prompts you to remove a package, only remove packages that relate to the kernel package. If you are prompted to remove a package that your system requires, enter n to prevent the package being removed. You should also retain any other dependent packages.

Running the yum update command subsequently updates only UEK.

To restore RHCK

To reinstall RHCK run the following command:

$ sudo yum install kernel

Installing a system without RHCK

If you wish to install a system without RHCK installed at all, so that the system uses UEK by default and all package dependencies are automatically remapped to UEK, you can use Kickstart to install the kernel-transition and to prevent the installation of the kernel package.

Include the following lines in the %packages section to install the kernel-uek and kernel-transition packages, but not the kernel package:

-kernel
kernel-transition

If you create a customized installation ISO, you can replace the kernel package with the kernel-transition package so that dependency resolution pulls in kernel-transition instead of kernel. If kernel-transition is present on the installation media, it cannot be installed accidentally because it provides a kernel version that is lower than that of any RHCK.


Want to Learn More?