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?
- The Oracle Linux 6 or Oracle Linux 7 system must be subscribed to the
ol<n>_latest
repository on the Oracle Linux yum server or the equivalent channel on ULN - At least one UEK release package (
kernel-uek
) should be installed
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.
-
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.
-
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?
Oracle Linux: How to Remove the Red Hat Compatible Kernel
F18536_06
December 2020
Copyright © 2020, Oracle and/or its affiliates.
This tutorial provides information about transitioning an Oracle Linux 6 or Oracle Linux 7 system from running the Red Hat Compatible Kernel (RHCK) to the Unbreakable Enterprise Kernel (UEK). The tutorial includes instructions on using the kernel-transition package to ensure that RPM dependencies are remapped to UEK correctly after the transition.
This software and related documentation are provided under a license agreement containing restrictions on use and disclosure and are protected by intellectual property laws. Except as expressly permitted in your license agreement or allowed by law, you may not use, copy, reproduce, translate, broadcast, modify, license, transmit, distribute, exhibit, perform, publish, or display any part, in any form, or by any means. Reverse engineering, disassembly, or decompilation of this software, unless required by law for interoperability, is prohibited.
The information contained herein is subject to change without notice and is not warranted to be error-free. If you find any errors, please report them to us in writing.
If this is software or related documentation that is delivered to the U.S. Government or anyone licensing it on behalf of the U.S. Government, then the following notice is applicable:
U.S. GOVERNMENT END USERS: Oracle programs (including any operating system, integrated software, any programs embedded, installed or activated on delivered hardware, and modifications of such programs) and Oracle computer documentation or other Oracle data delivered to or accessed by U.S. Government end users are "commercial computer software" or "commercial computer software documentation" pursuant to the applicable Federal Acquisition Regulation and agency-specific supplemental regulations. As such, the use, reproduction, duplication, release, display, disclosure, modification, preparation of derivative works, and/or adaptation of i) Oracle programs (including any operating system, integrated software, any programs embedded, installed or activated on delivered hardware, and modifications of such programs), ii) Oracle computer documentation and/or iii) other Oracle data, is subject to the rights and limitations specified in the license contained in the applicable contract. The terms governing the U.S. Government's use of Oracle cloud services are defined by the applicable contract for such services. No other rights are granted to the U.S. Government.
This software or hardware is developed for general use in a variety of information management applications. It is not developed or intended for use in any inherently dangerous applications, including applications that may create a risk of personal injury. If you use this software or hardware in dangerous applications, then you shall be responsible to take all appropriate fail-safe, backup, redundancy, and other measures to ensure its safe use. Oracle Corporation and its affiliates disclaim any liability for any damages caused by use of this software or hardware in dangerous applications.
Oracle and Java are registered trademarks of Oracle and/or its affiliates. Other names may be trademarks of their respective owners.
Intel and Intel Inside are trademarks or registered trademarks of Intel Corporation. All SPARC trademarks are used under license and are trademarks or registered trademarks of SPARC International, Inc. AMD, Epyc, and the AMD logo are trademarks or registered trademarks of Advanced Micro Devices. UNIX is a registered trademark of The Open Group.
This software or hardware and documentation may provide access to or information about content, products, and services from third parties. Oracle Corporation and its affiliates are not responsible for and expressly disclaim all warranties of any kind with respect to third-party content, products, and services unless otherwise set forth in an applicable agreement between you and Oracle. Oracle Corporation and its affiliates will not be responsible for any loss, costs, or damages incurred due to your access to or use of third-party content, products, or services, except as set forth in an applicable agreement between you and Oracle.