Note:

Remove the Red Hat Compatible Kernel With the kernel-transition Package

Introduction

For compatibility reasons, RHCK is always installed by default on any Oracle Linux system. However, UEK releases are often configured as the default kernel on most Oracle Linux systems. Booting from UEK rather than RHCK is sufficient for a system to operate properly. In some cases, you may wish to entirely remove RHCK from an Oracle Linux system to prevent it from ever booting this kernel. Such a configuration would be good practice for uses cases such as the following:

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 itself does not contain any files, 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. 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 type:

sudo dnf remove kernel

Objectives

From this tutorial, you learn to:

Prerequisites

Removing RHCK from an existing Oracle Linux system

  1. Install the kernel-transition package.

    sudo yum install kernel-transition
    
  2. Remove RHCK.

    sudo yum remove kernel
    

    A confirmation prompt is always displayed before the command removes 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 preven the package from being removed. You should also retain any other dependent packages.

After RHCK is removed, running the yum update command subsequently updates only UEK.

Restoring RHCK in an Oracle Linux system

To reinstall RHCK, run the following command:

sudo yum install kernel

Installing a system without RHCK

By using kickstart, you can exclude RHCK when installing Oracle Linux to obtain the following configuration:

In the kickstart configuration file, include the following lines in the %packages section:

-kernel
kernel-transition

These configuration definitions cause kickstart to include the kernel-transition package in the installation together with the kernel-uek package, while disregarding the kernel package.

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. Note that even if kernel-transition is present on the installation media, the package itself is not automatically included in an Oracle Linux installation because it provides a kernel version that is lower than that of any RHCK. Thus, if you need the package, you must manually install it.

For More Information

More Learning Resources

Explore other labs on docs.oracle.com/learn or access more free learning content on the Oracle Learning YouTube channel. Additionally, visit education.oracle.com/learning-explorer to become an Oracle Learning Explorer.

For product documentation, visit Oracle Help Center.