Note:
- This tutorial requires access to Oracle Cloud. To sign up for a free account, see Get started with Oracle Cloud Infrastructure Free Tier.
- It uses example values for Oracle Cloud Infrastructure credentials, tenancy, and compartments. When completing your lab, substitute these values with ones specific to your cloud environment.
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:
- Your hardware is specifically not supported on RHCK but supported on a UEK release.
- Your system is using software that is dependent on a UEK release but 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 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:
- Remove the Red Hat Compatible Kernel from a system.
- Restore RHCK.
- Install an Oracle Linux system without RHCK.
Prerequisites
- A system with the following configuration:
- Runs either Oracle Linux 6 or Oracle Linux 7.
- Subscribed to the
ol<n>_latest
repository on the Oracle Linux yum server or the equivalent channel on ULN. - Installed with at least one UEK release package (
kernel-uek
).
Removing RHCK from an existing Oracle Linux system
-
Install the
kernel-transition
package.sudo yum install kernel-transition
-
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 thekernel
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:
- The system uses UEK by default.
- All package dependencies are automatically remapped to UEK.
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
- Oracle Linux Documentation
- Unbreakable Enterprise Kernel
- Oracle Linux and Unbreakable Enterprise Kernel (UEK) Releases
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.
Remove the Red Hat Compatible Kernel With the kernel-transition Package
F56622-01
April 2022
Copyright © 2022, Oracle and/or its affiliates.