Converting from an RPM-based Linux distribution to RHEL
Instructions for a conversion from CentOS Linux or Oracle Linux to Red Hat Enterprise Linux 7 and Red Hat Enterprise Linux 8
Abstract
Preface
This document provides instructions on how to convert your operating system from a different Linux distribution, namely CentOS Linux or Oracle Linux, to Red Hat Enterprise Linux (RHEL) 7 or RHEL 8. The conversion is performed by the Convert2RHEL
utility.
The conversion from Scientific Linux, Alma Linux, and Rocky Linux to RHEL is not currently supported by Red Hat. For information on an unsupported conversion, see How to perform an unsupported conversion from a RHEL-derived Linux distribution to RHEL.
Making open source more inclusive
Red Hat is committed to replacing problematic language in our code, documentation, and web properties. We are beginning with these four terms: master, slave, blacklist, and whitelist. Because of the enormity of this endeavor, these changes will be implemented gradually over several upcoming releases. For more details, see our CTO Chris Wright’s message.
Providing feedback on Red Hat documentation
We appreciate your feedback on our documentation. Let us know how we can improve it.
Submitting comments on specific passages
- View the documentation in the Multi-page HTML format and ensure that you see the Feedback button in the upper right corner after the page fully loads.
- Use your cursor to highlight the part of the text that you want to comment on.
- Click the Add Feedback button that appears near the highlighted text.
- Add your feedback and click Submit.
Submitting feedback through Bugzilla (account required)
- Log in to the Bugzilla website.
- Select the correct version from the Version menu.
- Enter a descriptive title in the Summary field.
- Enter your suggestion for improvement in the Description field. Include links to the relevant parts of the documentation.
- Click Submit Bug.
Key migration terminology
While the following migration terms are commonly used in the software industry, these definitions are specific to Red Hat Enterprise Linux (RHEL).
Update
Sometimes called a software patch, an update is an addition to the current version of the application, operating system, or software that you are running. A software update addresses any issues or bugs to provide a better experience of working with the technology. In RHEL, an update relates to a minor release, for example, updating from RHEL 8.1 to 8.2.
Upgrade
An upgrade is when you replace the application, operating system, or software that you are currently running with a newer version. Typically, you first back up your data according to instructions from Red Hat. When you upgrade RHEL, you have two options:
- In-place upgrade: During an in-place upgrade, you replace the earlier version with the new version without removing the earlier version first. The installed applications and utilities, along with the configurations and preferences, are incorporated into the new version.
- Clean install: A clean install removes all traces of the previously installed operating system, system data, configurations, and applications and installs the latest version of the operating system. A clean install is ideal if you do not need any of the previous data or applications on your systems or if you are developing a new project that does not rely on prior builds.
Operating system conversion
A conversion is when you convert your operating system from a different Linux distribution to Red Hat Enterprise Linux. Typically, you first back up your data according to instructions from Red Hat.
Migration
Typically, a migration indicates a change of platform: software or hardware. Moving from Windows to Linux is a migration. Moving a user from one laptop to another or a company from one server to another is a migration. However, most migrations also involve upgrades, and sometimes the terms are used interchangeably.
- Migration to RHEL: Conversion of an existing operating system to RHEL
- Migration across RHEL: Upgrade from one version of RHEL to another
Chapter 1. Supported conversion paths
Red Hat recommends that you seek the support of Red Hat Consulting services to ensure that the conversion process is smooth.
Currently, it is possible to convert your systems from the following Linux distributions, architectures, and versions to the corresponding minor version of RHEL listed in Table 1.1.
Table 1.1. Supported conversion paths
Source OS | Target OS | Architecture | Product Variant |
---|---|---|---|
CentOS Linux 8.5 | RHEL 8.5 | 64-bit Intel | N/A |
CentOS Linux 8.4 | RHEL 8.4 | 64-bit Intel | N/A |
CentOS Linux 7.9 | RHEL 7.9 | 64-bit Intel | Server |
Oracle Linux 8.7 | RHEL 8.7 | 64-bit Intel | N/A |
Oracle Linux 7.9 | RHEL 7.9 | 64-bit Intel | Server |
Because the last available minor version of CentOS Linux is CentOS Linux 8.5, it is not possible to convert from CentOS Linux 8 directly to the latest available minor version of RHEL 8, which is currently RHEL 8.7.
It is no longer possible to perform a conversion, supported or unsupported, to RHEL 6. To convert a CentOS Linux 6 or Oracle Linux 6 system to RHEL, upgrade your system to CentOS Linux 7 or Oracle Linux 7 and then perform a supported conversion to RHEL 7.
In addition to the above supported conversion paths, it is also possible to perform an unsupported conversion from Rocky Linux, Alma Linux, and Scientific Linux to RHEL. For information on unsupported conversions, see How to perform an unsupported conversion from a RHEL-derived Linux distribution to RHEL.
Conversions from CentOS Stream to RHEL are not currently possible.
For information on Red Hat’s support policy for Linux distribution conversions, see Convert2RHEL Support Policy.
If you are converting to RHEL 8.4 or RHEL 8.5, it is recommended to update your system to RHEL 8.7 after the conversion.
Chapter 2. Planning a RHEL conversion
The automated conversion process is performed on a running system. The Convert2RHEL
utility replaces all RPM packages from the original Linux distribution by their RHEL version. At the end of the process, it is necessary to restart the system to boot the RHEL kernel.
Packages that are available only in the original distribution and do not have corresponding counterparts in RHEL repositories, and third-party packages, which originate neither from the original Linux distribution nor from RHEL, are not affected by the conversion. Red Hat does not provide support for third-party packages that are left unchanged during the conversion process. See the Red Hat policy on supporting third-party software.
The Convert2RHEL
utility does not directly affect local users and their data in the /home
and /srv
directories. However, Convert2RHEL cannot control actions that RPM package scriptlets perform during the conversion process.
You should consider the following before converting your system to RHEL:
- Architecture - The source OS must be installed on a system with 64-bit Intel architecture. It is not possible to convert with other system architectures.
- Security - Systems in FIPS mode are not supported for conversion.
Kernel - Systems using kernel modules that do not exist in RHEL kernel modules are not currently supported for conversion. Red Hat recommends disabling or uninstalling foreign kernel modules before the conversion and then enabling or reinstalling those kernel modules afterwards. Unsupported kernel modules include:
- Kernel modules for specialized applications, GPUs, network drivers, or storage drivers
- Custom compiled kernel modules built by DKMS
Public clouds - Conversions on public clouds are supported in the following situations:
CentOS Linux - Using RHSM for the following:
- Bring Your Own Subscription instances on Amazon Web Services (AWS), Microsoft Azure, and Google Cloud
- User-provided custom images on all public clouds
Oracle Linux - Using RHSM for user-provided custom images on all public clouds.
Convert2RHEL is unable to access RHEL packages through Red Hat Update Infrastructure (RHUI) during the conversion of both CentOS Linux and Oracle Linux.
- High Availability - Systems using high availability cluster software by Red Hat or third parties are not currently tested or supported for conversion to RHEL. Red Hat recommends migrating to newly installed RHEL systems to ensure the integrity of these environments.
- Identity Management - Performing an in-place conversion of a non-RHEL FreeIPA server to a RHEL 8 IdM server is not supported. For more information on how to migrate to IdM with a FreeIPA deployment, see Migrating to IdM on RHEL 8 from FreeIPA on non-RHEL Linux distributions.
Chapter 3. Preparing for a RHEL conversion
This procedure describes the steps that are necessary before performing the conversion from CentOS Linux or Oracle Linux to Red Hat Enterprise Linux (RHEL).
Prerequisites
- You have verified that your system is supported for conversion to RHEL. See Supported conversion paths for more information.
- You have stopped important applications, database services, and any other services that store data to reduce the risk of data integrity issues.
- You have temporarily disabled antivirus software to prevent the conversion from failing.
- You have disabled or adequately reconfigured any configuration management system (such as Salt, Chef, Puppet, Ansible) to not attempt to restore the original system.
-
The
sos
package is installed. You must use this package to generate ansosreport
that is required when opening a support case for the Red Hat Support team.
Procedure
- Back up your system and verify that you can restore your system.
- Check Known issues and limitations and verify that your system is supported for conversion. Apply workarounds where applicable.
Ensure that the standard kernel is the booted kernel:
- CentOS Linux: the standard CentOS Linux kernel
Oracle Linux: the Red Hat Compatible Kernel (RHCK)
If the kernel your system is booted into is not the standard kernel, for example CentOS realtime kernel or Oracle Linux Unbreakable Enterprise Kernel (UEK), change the default kernel to the standard kernel and reboot your system.
- If converting from CentOS Linux 8, remove any CentOS Stream packages from your system. CentOS Stream is not currently supported for conversion, and the conversion might fail if any packages are present on the system.
If you are converting with a firewall, using Red Hat Satellite, or through a proxy server, ensure that you have access to the following connections:
- https://ftp.redhat.com
- https://cdn-ubi.redhat.com
- https://cdn.redhat.com
- https://subscription.rhsm.redhat.com - required only for systems with firewalls
- https://*.akamaiedge.net - required only for systems with firewalls
- https://static.redhat.com
If converting from CentOS Linux 8, update the CentOS repository URLs:
# sed -i 's/^mirrorlist/#mirrorlist/g' /etc/yum.repos.d/CentOS-* # sed -i 's|#baseurl=http://mirror.centos.org|baseurl=https://vault.centos.org|g' /etc/yum.repos.d/CentOS-*
ImportantCentOS Linux 8 has reached end of life. For more information, see CentOS Linux EOL.
Install
Convert2RHEL
:Download the Red Hat GPG key:
# curl -o /etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release https://www.redhat.com/security/data/fd431d51.txt
Download the SSL certificate of the https://cdn.redhat.com server, which contains the
Convert2RHEL
repositories:# curl --create-dirs -o /etc/rhsm/ca/redhat-uep.pem https://ftp.redhat.com/redhat/convert2rhel/redhat-uep.pem
Install the
Convert2RHEL
repository file:# curl -o /etc/yum.repos.d/convert2rhel.repo https://ftp.redhat.com/redhat/convert2rhel/<version_number>/convert2rhel.repo
Replace version_number with the appropriate major version of the OS, for example
7
or8
.NoteYou must perform the conversion with the latest version of the
Convert2RHEL
repository file. If you had previously installed an earlier version of the repository file, remove the earlier version and install the current version.Install the
Convert2RHEL
utility:# yum -y install convert2rhel
Ensure you have access to RHEL packages through one of the following methods:
- Red Hat Content Delivery Network (CDN) through Red Hat Subscription Manager (RHSM). You must have a Red Hat account and an appropriate RHEL subscription to access RHSM. Note that the OS will be converted to the corresponding minor version of RHEL per Table 1.1.
Red Hat Satellite in a version that has Full or Maintenance support. For more information, see Red Hat Satellite Product Life Cycle.
NoteEnsure that the Satellite server meets the following conditions:
- Satellite has a subscription manifest with RHEL repositories imported. For more information, see the Managing Subscriptions chapter in the Content Management Guide for the particular version of Red Hat Satellite, for example, for version 6.10.
All required repositories are enabled and synchronized with the latest target OS updates and published on Satellite. Enable at minimum the following repositories for the appropriate major version of the OS:
- Red Hat Enterprise Linux 7 Server RPMs x86_64 7Server
- Red Hat Enterprise Linux 8 for x86_64 - AppStream RPMs <target_os>
- Red Hat Enterprise Linux 8 for x86_64 - BaseOS RPMs <target_os>
Replace target_os with
8.4
or8.5
for CentOS Linux conversions and8.7
for Oracle Linux conversions.Custom repositories configured in the
/etc/yum.repos.d/
directory and pointing to a mirror of the target OS repositories. Use custom repositories for systems that have access to only local networks or portable media and therefore cannot access Red Hat CDN through RHSM. Make sure that the repositories contain the latest content available for that RHEL minor version to prevent downgrading and potential conversion failures. For more information, see Creating a Local Repository and Sharing With Disconnected/Offline/Air-gapped Systems.NoteRHEL 8 content is distributed through two default repositories, BaseOS and AppStream. If you are accessing RHEL packages through custom repositories, you must configure both default repositories for a successful conversion. When running the
Convert2RHEL
utility, make sure to enable both repositories using the--enablerepo
option. For more information about RHEL 8 repositories, see Considerations in adopting RHEL 8.
If you are accessing RHEL packages through a Red Hat Satellite server, download the consumer RPM to the
/usr/share/convert2rhel/subscription-manager/
directory:# curl --insecure --output /usr/share/convert2rhel/subscription-manager/katello-ca-consumer-latest.noarch.rpm https://<satellite.example.com>/pub/katello-ca-consumer-latest.noarch.rpm
Replace satellite.example.com with the hostname of your Satellite server.
- Temporarily disable antivirus software to prevent the conversion from failing.
Update the original OS to the minor version supported for conversion as specified in Table 1.1 and then reboot the system.
You must perform the conversion with the latest packages from the minor version of the OS that is supported for conversion to use the rollback feature in case the conversion fails. For more information, see Conversion rollback.
Chapter 4. Converting to a RHEL system
This procedure describes the steps necessary to convert your system from CentOS Linux or Oracle Linux to Red Hat Enterprise Linux (RHEL).
By default, Red Hat collects conversion-related data, such as the conversion start and end times and whether the conversion was successful, for utility usage analysis. To disable data collection, set the CONVERT2RHEL_DISABLE_TELEMETRY
environment variable to 1
.
If you are accessing RHEL packages using Red Hat CDN or Satellite through RHSM, there are two methods of registering and subscribing your system during the conversion:
- Provide the organization ID and activation key. This method is preferred when converting many systems or when automating the conversion process using scripts. You must be the organization administrator to create an activation key. You must use this method if you are accessing RHEL packages using Satellite through RHSM.
- Provide the username, password, and pool ID. Any user who is accessing RHEL packages using Red Hat CDN through RHSM can use this method.
Prerequisites
- You have completed the steps listed in Preparing for a RHEL conversion.
- If you are providing the organization ID and activation key to register and subscribe your system, you have created an activation key in Satellite or RHSM. For more information, see Managing activation keys in Satellite documentation and Understanding activation keys in RHSM documentation.
Procedure
Start the
Convert2RHEL
utility.You can use
Convert2RHEL
with either RHSM or custom repositories. To display all available options, use the-h
,--help
option:# convert2rhel -h
To convert using RHSM with the organization ID and activation key, complete the following steps. You must use this method if you are accessing RHEL packages using Satellite:
Add your activation key to the
/etc/convert2rhel.ini
file:[subscription_manager] activation_key = <activation_key>
Replace activation_key with the activation key from the Red Hat Customer Portal if you are using Red Hat CDN or the Satellite web UI if you are using Red Hat Satellite.
Start the
Convert2RHEL
utility:# convert2rhel --org <organization_ID>
Replace organization_ID with the organization ID from the Red Hat Customer Portal if you are using Red Hat CDN or the Satellite web UI if you are using Red Hat Satellite.
NoteIf you are accessing RHEL packages using Satellite and your system does not have internet access, add the
--keep-rhsm
option. Note that you must have thesubscription-manager
andkatello-ca-consumer
packages already installed and must provide both your organization ID and the configuration file containing the activation key when running theconvert2rhel
command.
To convert using RHSM with the username, password, and pool ID, complete the following steps:
Add your Red Hat Account password to the
/etc/convert2rhel.ini
file:[subscription_manager] password = <password>
Replace password with your Red Hat Account password credentials.
Start the
Convert2RHEL
utility:# convert2rhel --username <username> --pool <pool_ID>
Replace username with your Red Hat Account username credentials. Replace pool_ID with the pool ID of the subscription that you want to attach to the system. If you do not know the pool ID, omit the
--pool
option to generate a list of all subscriptions available for the account.
To convert using custom repositories, start the
Convert2RHEL
utility:# convert2rhel --no-rhsm --enablerepo <RHEL_RepoID1> --enablerepo <RHEL_RepoID2>
Replace RHEL_RepoID with your custom repository configured in the
/etc/yum.repos.d/
directory, for example,rhel-7-server-rpms
orrhel-8-baseos
andrhel-8-appstream
.NoteWhen converting using RHSM or custom repositories, you can enable the RHEL 7 Extras or Optional repositories manually by using the
--enablerepo
option to replace additional packages with their RHEL counterparts. Note that packages in the Optional repository are unsupported. For more information, see Support policy of the optional and supplementary channels in Red Hat Enterprise Linux.
Before
Convert2RHEL
starts replacing packages from the original distribution with RHEL packages, the following warning message is displayed:The tool allows rollback of any action until this point. By continuing, all further changes on the system will need to be reverted manually by the user, if necessary.
Changes made by
Convert2RHEL
up to this point can be automatically reverted. Confirm that you wish to proceed with the conversion process.-
Wait until
Convert2RHEL
installs the RHEL packages and finishes successfully. - Recommended: If you used custom repositories for the conversion, register and subscribe your RHEL system. For more information, see How to register and subscribe a system offline to the Red Hat Customer Portal?.
At this point, the system still runs with the original distribution kernel loaded in RAM. Reboot the system to boot the newly installed RHEL kernel.
# reboot
Remove third-party packages from the original OS that remained unchanged (typically packages that do not have a RHEL counterpart). To get a list of these packages, use:
# yum list extras --disablerepo="*" --enablerepo=<RHEL_RepoID>
Replace RHEL_RepoID with your repository.
Optional: If you converted to RHEL 8.4 or RHEL 8.5, update your system to the latest minor version:
# yum update -y
- Optional: Perform an in-place upgrade to RHEL 9 to ensure your system is updated with the latest enhancements, security features, and bug fixes. For more information, see the Upgrading from RHEL 7 to RHEL 8 and Upgrading from RHEL 8 to RHEL 9 guides. Note that if you have converted to RHEL 7, you must first perform the in-place upgrade from RHEL 7 to RHEL 8, and then from RHEL 8 to RHEL 9.
Verification
- Verify that your system operates as expected. If necessary, reconfigure system services after the conversion and fix dependency errors. For more information, see Fixing dependency errors.
Chapter 5. Conversion rollback
The Convert2RHEL
utility provides a limited rollback functionality. If the conversion is canceled by the user or if it fails, the utility performs a rollback of changes made during the conversion process under the following conditions:
Only changes performed until
Convert2RHEL
starts replacing packages from the original distribution with RHEL packages can be reverted. This moment is indicated by the warning message:The tool allows rollback of any action until this point. By continuing all further changes on the system will need to be reverted manually by the user, if necessary.
followed by a question whether you wish to continue with the process.
NoteIf the
-y
option is used with theconvert2rhel
command, the question indicating the moment after which the automated rollback is no longer possible is skipped.-
Access to repositories providing packages from the original distribution is required, especially to the base repository, to perform a rollback. Without access to these repositories,
Convert2RHEL
is unable to restore the system to the original state even if the tool execution is stopped in the early stages of the conversion becauseConvert2RHEL
removes certain packages during the conversion process and needs to preemptively download them from the original repository for rollback. -
A rollback is feasible only on a system where all packages from the original OS are updated to the latest version that is available in the repositories accessible from the system. Therefore use the
yum
update command before starting the conversion process.
If the conversion process is canceled or fails after Convert2RHEL
has started the package replacement phase, the system can become dysfunctional. In such a case, manual fixes will be needed. Please contact Red Hat Consulting services for assistance.
Chapter 6. Troubleshooting conversions
This chapter lists troubleshooting resources and tips.
6.1. Troubleshooting resources
To help you troubleshoot issues that can occur during the conversion process, review the log messages that are printed to the console and log files.
Console Output
By default, only info, warning, error, and critical log level messages are printed to the console output by the Convert2RHEL
utility. To also print debug messages, use the --debug
option with the convert2rhel
command.
Logs
-
The
/var/log/convert2rhel/convert2rhel.log
file lists debug, info, warning, error, and critical messages. -
The
/var/log/convert2rhel/rpm_va.log
file lists all package files on the unconverted system that a user has modified. This output is generated by therpm -Va
command, which is run automatically unless the--no-rpm-va
option is used with theconvert2rhel
command.
6.2. Fixing dependency errors
During a conversion from a different Linux distribution to RHEL, certain packages might be installed without some of their dependencies.
Prerequisites
- You have successfully completed the conversion to RHEL. See Converting to a RHEL system for more information.
Procedure
Identify dependencies errors:
# yum check dependencies
If the command displays no output, no further actions are required.
-
To fix dependency errors, reinstall the affected packages. During this operation, the
yum
utility automatically installs missing dependencies. If the required dependencies are not provided by repositories available on the system, install those packages manually.
6.3. Known issues and limitations
The following issues and limitations are known to occur during the conversion:
-
The conversion stops if any files are mounted directly to the
/mnt/
directory or if the/sys/
directory is mounted as read-only. Systems that connect to the Internet using an HTTP proxy server cannot convert using Red Hat CDN or Satellite through RHSM. To work around this problem, enable HTTP proxy for yum and then configure the HTTP proxy for RHSM:
- Configure yum to use an HTTP proxy as described in How to enable proxy settings for yum command on RHEL?
Configure a repository as described in Configuring Yum and Yum Repositories pointing to one of the following URLs:
- For CentOS Linux and Oracle Linux 7: https://cdn-ubi.redhat.com/content/public/ubi/dist/ubi/server/7/7Server/x86_64/os/
- For CentOS Linux and Oracle Linux 8: https://cdn-ubi.redhat.com/content/public/ubi/dist/ubi8/8/x86_64/baseos/os/
-
Install the
subscription-manager
package from the repository you configured.. - Configure HTTP proxy for RHSM as described in How to configure HTTP Proxy for Red Hat Subscription Management.
Perform the conversion to RHEL with the
--keep-rhsm
option.
- UEFI systems with Secure Boot enabled are not supported for conversion. To work around this issue, disable Secure Boot before the conversion and then re-enable after the conversion is complete. (BZ#2057229)
- The Convert2RHEL utility installs a RHEL kernel on your system as part of the conversion. If you have already reached your kernel limit, the conversion fails. To prevent this issue, remove an existing kernel to provide space for the new RHEL kernel. For more information, see convert2rhel fails with "Problem 2: package kernel requires kernel-core-uname-r but none of the providers can be installed".
- If you are subscribed to RHSM and perform the conversion with the --keep-rhsm option, the RHSM subscription is not restored if you perform a rollback during the conversion. To work around this issue, register your system again with RHSM after the rollback. (RHELC-898)
6.4. Obtaining support
If you experience problems during the conversion, notify Red Hat so that these problems can be addressed.
If you are experiencing problems during the conversion, raise a Support case of Severity 3 or Severity 4 level only. For more details, see Production Support Terms of Service.
Prerequisites
-
The
sos
package is installed. You must use this package to generate ansosreport
that is required when opening a support case for the Red Hat Support team.
Procedure
To obtain support, perform either of the following steps:
Open a support case:
-
Select RHEL 7 or RHEL 8 as the product, and provide an
sosreport
from your system. Generate an
sosreport
on your system:# sosreport
Note that you can leave the case ID empty.
-
Select RHEL 7 or RHEL 8 as the product, and provide an
Submit a bug report:
-
Open a bug, select RHEL 7 or RHEL 8 as the product, and select
convert2rhel
as the component.
-
Open a bug, select RHEL 7 or RHEL 8 as the product, and select
For details on generating an sosreport
, see the solution What is an sosreport and how to create one in Red Hat Enterprise Linux?.
For more information on opening and managing a support case on the Customer Portal, see the article How do I open and manage a support case on the Customer Portal?.
For information on Red Hat’s support policy for Linux distribution conversions, see Convert2RHEL Support Policy.
Chapter 7. Additional resources
- How to perform an unsupported conversion from a RHEL-derived Linux distribution to RHEL
- Red Hat Enterprise Linux technology capabilities and limits
- Red Hat Enterprise Linux documentation
- Migration planning guide - migration to RHEL 7
- Considerations in adopting RHEL 8
- Upgrading from RHEL 7 to RHEL 8
- Convert2RHEL FAQ (Frequently Asked Questions)