How to Upgrade from RHEL 8 to RHEL 9 Release

Finally, the stable release of RHEL 9 has been released which has brought some of the major changes for better security, and usability, and with the same stability which you can expect from any release of RHEL.

This guide will show you how you can easily upgrade from RHEL 8 to RHEL 9 with minimum effort and complexity involved. So let’s start with what the new release has to offer in the first place.

What’s New in RHEL 9

The key goal of RHEL 9 is to bring efficiency to your team. The new release of RHEL 9 has brought easy automation and deployment to the table which will surely help newcomers.

There are numerous improvements from which we have listed some of the most important below:

Improved Performance Metrics:

RHEL 9 makes it easy for admins and DevOps to identify the issues related to performance as you can inside the Cockpit web-based GUI, you will get a separate section that will allow users to collect diagnostic information which will help to identify the root cause of any issues.

With a single click, the report will be generated and let you identify what was the real reason behind the performance issues.

Live Kernal Patching:

Now, you can apply kernel patches live using the Cockpit web console. From now, we are no longer required to use Terminal or ant third-party software to apply live kernel patches.

Enhanced Security:

  • Smart card authentication using the web console.
  • Integration of OpenSSL 3.
  • Additional security profiles for SELinux.
  • Allows users to verify the integrity of the Operating System.

There are some other improvements such as improved container development, updated packages, link-time optimization, and much more so if the given reasons are enough to convince you to upgrade from RHEL 8 to RHEL 9.

Upgrading from RHEL 8 to RHEL 9

The given process won’t take much time and has been kept simple so that each RHEL 8 user can benefit from it. But before going through the upgradation process, let’s have a look at the requirements for RHEL 9.

Requirements

  • A working RHEL 8.6 system.
  • A Working internet with sufficient bandwidth to perform a full upgrade.
  • Free space at boot partition (Minumun of 100Mb)

Let’s start the upgrade procedure.

Step 1: Remove “tmp_leapp_py3” Directory

If you previously performed an upgrade from RHEL 7 to RHEL 8, you are required to remove the tmp_leapp_py3 directory using the following command.

$ sudo rm -rf /root/tmp_leapp_py3

Step 2: Verify RHEL Subscription

This is a crucial step as we are required to have a working Red Hat Enterprise Linux Server subscription in order to perform the upgrade. To check whether we have an active subscription, use the following command:

$ sudo subscription-manager list --installed
Check RHEL Subscription
Check RHEL Subscription

Step 3: Verify RHEL Repositories

As we are going to upgrade from RHEL 8 to RHEL 9, having all the essential repositories enabled is crucial. You can easily cross-check them by the following command:

$ sudo subscription-manager repos --enable rhel-8-for-x86_64-baseos-rpms --enable rhel-8-for-x86_64-appstream-rpms
Check RHEL Repositories
Check RHEL Repositories

Step 4: Lock the System to RHEL 8.6

We must set 8.6 as the beginning point for upgradation. Use the following command to lock your system at 8.6 as we are going to initiate the process from 8.6.

$ sudo subscription-manager release --set 8.6
Lock System to RHEL 8.6
Lock System to RHEL 8.6

Step 5: Enable RHUI Repositories [for AWS Only]

If you are upgrading from RHEL 8 to RHEL 9 using Red Hat Update Infrastructure (RHUI) on AWS, enabling RHUI for seamless upgrade is essential.

$ sudo dnf config-manager –set-enabled rhui-client-config-server-8
$ sudo dnf -y install rh-amazon-rhui-client-ha leapp-rhui-aws

Step 6: Update RHEL Repositories

After going through the changes we made, let’s update the repositories by running the following command:

$ sudo dnf update
Update RHEL Repositories
Update RHEL Repositories

Step 7: Install the Leapp Utility

Leapp is the most interesting part of this process as it is going to automate the whole process of upgradation. To install the Leapp utility, use the given command:

$ sudo dnf install leapp-upgrade -y
Install Leapp Utility
Install Leapp Utility

Step 8: Remove Versionlock Plugin

If you have used the versionlock plugin which will lock the packages at a specified version, you have to remove it by using the following command:

$ sudo dnf versionlock clear

Step 9: Disable AllowZoneDrifting

This will cause major issues during the upgrade process and gives you an error such as given below:

AllowZoneDrifting Error
AllowZoneDrifting Error

To disable AllowZoneDrifting, open the firewalld config file by the given command:

$ sudo nano /etc/firewalld/firewalld.conf

Go to the end of the file and you will find the option of AllowZoneDrifting, just disable it by adding the # at the beginning of the line to overcome the error.

Disable AllowZoneDrifting
Disable AllowZoneDrifting

Step 10: Perform the Pre-upgrade Phase

Upgrading the system is big deal and this is the best way to check whether there are any issues related to packages for the upcoming upgrade session. The below command will check for package availability and check for system issues (if any).

$ sudo leapp preupgrade --target 9.0
Perform RHEL Pre-upgrade
Perform RHEL Pre-upgrade

If things go smooth, it will bring summery with the size of the packages and will also generate a report at /var/log/leapp/leapp-report.json.

RHEL Pre-upgrade Summary
RHEL Pre-upgrade Summary

Step 11: Upgrading from RHEL 8 to RHEL 9

Now, we are ready to download and install new packages using the Leapp utility which we have installed previously. To start the upgradation process, use the following command:

$ sudo leapp upgrade --target 9.0
Upgrade RHEL 8 to RHEL 9
Upgrade RHEL 8 to RHEL 9

Once the process of downloading and installing new packages is done, reboot your system.

$ reboot

Step 12: Choose RHEL-Upgrade-initramfs

Once you reboot, choose the third option labeled “RHEL-Upgrade-initramfs”.

RHEL-Upgrade-initramfs
RHEL-Upgrade-initramfs

Press CTRl+D to start the upgrading process.

RHEL Upgrading Process
RHEL Upgrading Process

Step 13: Verify RHEL 9 Upgrade

Once we are done with the installation process, let’s cross-check the installed version. To check the current version by the following command:

$ sudo cat /etc/redhat-release
Check RHEL 9 System
Check RHEL 9 System

To verify whether the newly installed RHEL 9 is subscribed to our plan, use the following command:

$ sudo subscription-manager list --installed
Check RHEL 9 Subscription
Check RHEL 9 Subscription

As you can see, we have successfully upgraded from RHEL 8 to RHEL 9.

The given article explains the easiest way to upgrade from RHEL 8 to RHEL 9 so that you can easily benefit from what it has to offer.

Two small things before you go

If something didn’t work on your setup, leave a comment and tell me which distro and version you’re on. I read every one, and most of these articles got better because a reader pointed out what was missing.

And if it did work, share it. TecMint has stayed free for 14 years because people pass these articles around, and that traffic is what pays for writing the next one.

Leave a comment
Get two free Linux courses

Learn the Linux basics with two free courses and join 34,000+ readers getting practical TecMint tutorials and selected Pro TecMint articles every week.

Pro TecMint
Get lifetime access for $99

If you want to go beyond the free tutorials, Pro gives you 18 courses, 5 ebooks, and every future course I add. One payment, lifetime access, no renewals.

Sagar Sharma
Sagar Sharma
Contributor
About the author

I'm a software engineer trying my best to bring open-source software to a general audience. Being a Linux author solves my purpose.

1 Comment

Leave a Reply
  1. error: rpmdbNextIterator: skipping h# 1582
    Header V3 RSA/SHA1 Signature, key ID bdda8475: BAD
    Header SHA256 digest: OK
    Header SHA1 digest: OK
    error: rpmdbNextIterator: skipping h# 1582
    Header V3 RSA/SHA1 Signature, key ID bdda8475: BAD
    Header SHA256 digest: OK
    Header SHA1 digest: OK
    Error: An rpm exception occurred: package not installed

    ============================================================
    END OF ERRORS
    ============================================================

    Debug output is written to /var/log/leapp/leapp-upgrade.log

    Reply

Got Something to Say? Join the Discussion...

Thank you for taking the time to share your thoughts with us. We appreciate your decision to leave a comment and value your contribution to the discussion. It's important to note that we moderate all comments in accordance with our comment policy to ensure a respectful and constructive conversation.

Rest assured that your email address will remain private and will not be published or shared with anyone. We prioritize the privacy and security of our users.