keepcalculator

06 Numbers and Powers

Upgrade RHEL 8 to RHEL 9: Steps & Guide

Card No. 06·67356 · Updated · Standard formula, shown below

To upgrade from Red Hat Enterprise Linux (RHEL) 8 to RHEL 9, you use the Leapp utility with the RHEL 9 repositories enabled, then run a pre-upgrade check and perform the upgrade. This in-place upgrade preserves your installed packages, configuration files, and user data, and is the officially supported path for moving between major RHEL versions.

Why Upgrade from RHEL 8 to RHEL 9?

RHEL 8 entered its End of Maintenance Support phase on May 31, 2024, meaning it no longer receives new features or most bug fixes, though Extended Life Phase support is available for an additional fee. RHEL 9, first released in May 2022, offers a newer kernel (5.14), improved security features like the systemd sandboxing, and updated toolchains (GCC 11, Python 3.9, OpenJDK 17). Upgrading ensures you continue to receive security patches and can take advantage of new hardware and software compatibility.

What Is an In-Place Upgrade?

An in-place upgrade replaces the operating system packages on your existing disk without reinstalling from scratch. Red Hat provides the Leapp utility to automate this process. It analyzes your current system, applies necessary changes, and then swaps the RHEL 8 packages for RHEL 9 versions. The alternative is a fresh install, which requires backing up data and reconfiguring everything—a much more disruptive process.

Prerequisites Before You Start

  • Valid RHEL subscription that includes RHEL 9 entitlements.
  • System is fully patched with the latest RHEL 8 packages (yum update).
  • Enough disk space—at least 5 GB free for the upgrade process.
  • Backup of all critical data and configuration files, ideally a full system backup or snapshot.
  • No unsupported third-party kernel modules that may break during the upgrade.

Step-by-Step Upgrade Process

  1. Enable the RHEL 9 repositories: Use subscription-manager repos --enable rhel-9-for-x86_64-baseos-rpms (replace x86_64 with your architecture).
  2. Install Leapp: yum install leapp (if not already present).
  3. Run the pre-upgrade check: leapp preupgrade. This generates a report at /var/log/leapp/leapp-report.txt and a JSON file. Review the report for errors and inhibitors.
  4. Address inhibitors: The report lists issues that block the upgrade. Common ones include removed packages, configuration conflicts, or missing drivers. Follow the suggested fixes—often you need to remove or replace certain packages.
  5. Run the upgrade: leapp upgrade. This downloads packages, reboots into a special upgrade environment, and completes the migration. The system will reboot automatically.
  6. Verify the upgrade: After reboot, check cat /etc/redhat-release should show RHEL 9.x. Run yum update to apply any remaining updates.

Common Problems and How to Fix Them

Many users encounter inhibitors during leapp preupgrade. The most frequent are:

  • Removed packages: Some RHEL 8 packages are not available in RHEL 9. Leapp will list them; you can remove them with yum remove or replace them with alternatives.
  • Configuration files modified by you: If you edited files like /etc/ssh/sshd_config, Leapp may flag them. You can either revert to defaults or accept the changes (but beware of incompatibilities).
  • Third-party repositories: Disable any EPEL or custom repos before running the upgrade, as they can conflict with RHEL packages.
  • Kernel modules: If you have proprietary drivers (e.g., NVIDIA), they may not be compatible with the new kernel. Remove them before upgrading.

What Happens to My Data and Configurations?

The in-place upgrade preserves user accounts, home directories, installed applications (if they are in RHEL 9 repos), and system configuration files. However, some configuration formats change between major versions—for example, firewalld and systemd unit files may need adjustments. Leapp tries to migrate these automatically, but you should review the post-upgrade report at /var/log/leapp/leapp-report.txt for any manual steps.

Comparing In-Place vs. Fresh Install

An in-place upgrade is faster and preserves your setup, but it may carry over legacy quirks. A fresh install starts clean, which can improve performance and eliminate configuration cruft, but requires reinstalling all applications and restoring data from backup. For production systems, Red Hat recommends testing the in-place upgrade on a staging system first.

Frequently Asked Questions

Can I upgrade from RHEL 7 directly to RHEL 9?

No, Leapp only supports upgrading one major version at a time. You must first upgrade from RHEL 7 to RHEL 8, then from RHEL 8 to RHEL 9.

How long does the upgrade take?

The actual package download and installation can take 30 minutes to a few hours, depending on your network speed and the number of packages installed. The pre-upgrade check takes only a few minutes.

Will my custom kernel parameters survive?

Yes, Leapp preserves the existing kernel command line in /etc/default/grub and regenerates the GRUB configuration. However, you should verify after the upgrade.

What if I use a custom kernel or driver?

Leapp will likely flag it as an inhibitor. You need to remove or replace it with a RHEL 9 compatible version before proceeding.

Is there a way to roll back if something goes wrong?

Leapp creates a backup of the system state before applying changes. You can use leapp upgrade --reboot with the --resume option, but a full rollback is not guaranteed. Always have a separate backup or snapshot.

Do I need to update my subscription?

Your existing RHEL subscription should cover RHEL 9 if it is active. If not, you may need to attach a new subscription or contact Red Hat.

Related

Method: the standard formula for this calculation, rounded as each result states. See how the calculators work or report an error.

More cards in this drawer

The whole Numbers and Powers drawer →