How to Upgrade from RHEL 9 to RHEL 10 Safely
Perform a safe and reliable in-place upgrade from Red Hat Enterprise Linux 9 to RHEL 10 with this comprehensive, step-by-step tutorial. This guide is designed for developers, students, and system administrators who want to move to the latest version of the world's leading enterprise Linux distribution without the need for a full reinstallation. We walk you through the entire process using Red Hat's official leapp utility, with a heavy emphasis on the critical pre-upgrade checks and backup procedures that are essential for a risk-free transition. Learn how to prepare your existing system, how to run the leapp pre-upgrade analysis to identify and resolve potential conflicts, and how to execute the final upgrade itself. The piece features a comparative analysis of the key phases of the leapp upgrade process, helping you understand what is happening at each stage. It also includes a detailed walkthrough of the RHEL Anaconda installer's most important screens, such as software selection and custom partitioning. By following this preparation-focused guide, you can confidently and efficiently upgrade your system, preserving your data and settings while gaining access to all the new features and security enhancements of RHEL 10.
Introduction: A Smooth Path to the Next Generation
You're running a stable, powerful Red Hat Enterprise Linux 9 system, but the new features, enhanced security, and improved performance of RHEL 10 are calling. Performing a major operating system upgrade can feel like a daunting and risky task, but it doesn't have to be. Thanks to the official Red Hat upgrade tool, `leapp`, the process of an "in-place" upgrade—where you upgrade your existing system without needing to reinstall everything from scratch—has become a well-defined and surprisingly safe procedure. The key to a successful upgrade is not just running the final command, but in the careful preparation and pre-flight checks you perform beforehand. This guide provides a detailed, step-by-step tutorial on how to safely perform an in-place upgrade from RHEL 9 to RHEL 10 using the `leapp` framework, with a heavy focus on the critical pre-upgrade analysis that ensures a smooth and risk-free transition.
The Golden Rule: Backup, Backup, and Backup Again!
Before you type a single command, we must start with the single most important rule of any major system change: have a complete, tested, and reliable backup. An in-place upgrade is a major surgical procedure on the heart of your operating system. While the `leapp` tool is very reliable, things can still go wrong. A full backup is your only safety net.
- For Virtual Machines: If your RHEL 9 system is a virtual machine (VM), this process is incredibly easy. Simply take a "snapshot" of the VM before you begin. A snapshot is an instantaneous picture of your entire system that you can revert back to in seconds if anything goes wrong.
- For Physical Laptops or Servers: For a bare-metal installation, you need to create a full system image or backup to an external hard drive. You can use your organization's enterprise backup software or a simple, powerful tool like `dd`.
Do not proceed with any of the following steps until you have a full, reliable backup of your entire system. This step is not optional.
Pre-Upgrade Health Check: Preparing Your RHEL 9 System
To ensure the upgrade process is as smooth as possible, your starting RHEL 9 system needs to be in a clean, stable, and fully updated state. Perform these health checks before you even install the upgrade tool.
- Fully Update Your System: You must be running the latest available minor release of RHEL 9. Run the following command to download and install all available updates:
sudo dnf update -y
After the update is complete, reboot your system to ensure you are running the latest kernel:sudo reboot - Verify Your Subscription: The upgrade process requires a valid Red Hat subscription to access the necessary software repositories. Verify that your system is properly subscribed with this command:
sudo subscription-manager list --installed - Set the Correct Release Version: You need to "lock" your system to the latest supported minor version of RHEL 9 to ensure the upgrade path is correct. You can do this with the command:
sudo subscription-manager release --set 9.x
(Note: Replace '9.x' with the latest minor version number, which you can find in the official Red Hat documentation.)
Step 1: Installing and Running the `leapp` Pre-Upgrade Check
With your system backed up and fully updated, it's time to use the `leapp` tool itself. The most important part of the entire process is the "pre-upgrade check," which is a dry run that simulates the upgrade without making any actual changes to your system.
- Install the `leapp` Utility: First, install the `leapp` tool and its required dependencies using this command:
sudo dnf install leapp-upgrade -y - Run the Pre-Upgrade Check: This is the most critical command in the entire tutorial. Execute the following to start the analysis:
sudo leapp preupgrade
(Note: In some cases, you may need to specify the target version, e.g.,--target 10.0). - Analyze the Report: The `leapp` tool will now perform a deep analysis of your system. It checks for potential problems like obsolete packages, incompatible drivers, or risky configurations that could cause the upgrade to fail. When it's done, it will generate a report located at
/var/log/leapp/leapp-report.txt.
This report is your guide. It will list any issues it found and, crucially, it will provide you with the exact remediation steps to fix them. If `leapp` finds a serious, blocking issue, it will "inhibit" the upgrade. The final upgrade command will refuse to run until you have resolved all of the inhibitors listed in this report. .
Step 2: The Point of No Return - Performing the Upgrade
Once you have carefully reviewed the pre-upgrade report and have manually resolved any and all inhibitors that it found, you are ready to perform the actual upgrade. This is the point of no return.
- Run the Upgrade Command: Execute the following command from your terminal:
sudo leapp upgrade - The Download Phase: The `leapp` utility will now download all the new RHEL 10 packages that are needed for the upgrade and will create a special, temporary environment to perform the installation. This process can take a significant amount of time depending on your internet connection and the number of packages on your system.
- The Final Reboot: Once the command has finished, it will end with a final instruction. You must now manually reboot the system to begin the installation phase:
sudo reboot
When you reboot, your system will not boot back into your RHEL 9 desktop. It will automatically boot into a special, temporary RHEL 10-based environment. In this environment, it will perform the actual upgrade, replacing all of your old RHEL 9 packages with the new RHEL 10 packages. You will see a command-line interface tracking the progress. This is the longest part of the process and can take an hour or more. Do not interrupt it. The system will automatically reboot itself when it is finished.
Comparative Analysis: Key Phases of the `leapp` Upgrade
The `leapp` process is a carefully designed, multi-phase procedure that prioritizes safety and pre-flight checks above all else.
| Phase | Key Command(s) | Purpose | What to Look For |
|---|---|---|---|
| Preparation | sudo dnf updatesudo reboot |
To ensure the starting system is stable, fully patched, and in a known-good state before the upgrade process begins. | A clean reboot after the update and a confirmation that your Red Hat subscription is active and set to the correct version. |
| Pre-Upgrade Analysis | sudo leapp preupgrade |
To safely simulate the entire upgrade process and find any potential problems before any actual changes are made to the system. | The leapp-report.txt file. You must read this carefully and look for any "inhibitors" that will block the upgrade until you fix them. |
| Upgrade Execution | sudo leapp upgrade |
To download all the new RHEL 10 packages and prepare the system for the special upgrade reboot. | A successful download of all packages and a final, clear instruction in the terminal telling you to manually reboot the system. |
| System Reboot & Update | sudo reboot |
This is the actual, offline upgrade. The system reboots into a special environment to replace all the old packages with the new ones. | The system will automatically reboot at least once and will eventually boot into the new RHEL 10 login screen or desktop. |
Step 3: Post-Upgrade Verification and Cleanup
After the final reboot, your system will boot into a fresh RHEL 10 environment. Your home directory and personal files should all be intact, but it's crucial to perform a few final checks to ensure everything is working correctly.
- Verify the OS Version: Open a terminal and run the command `cat /etc/redhat-release`. It should now report that you are running Red Hat Enterprise Linux 10.
- Check System Health: Launch your most critical applications to ensure they are still functioning correctly. Check that all your main services are running.
- Verify Your Subscription: Use the `subscription-manager` tool again to confirm that your system has been automatically moved to the RHEL 10 repositories and that you can successfully pull updates.
- Review the `leapp` Logs: Go back and review the final logs in `/var/log/leapp/` to check for any non-critical warnings or issues that you might need to address.
Conclusion: Welcome to Your Upgraded System
Congratulations! By carefully following this preparation-focused process, you have successfully and, most importantly, safely performed an in-place upgrade of your system to Red Hat Enterprise Linux 10. The `leapp` utility, and especially its mandatory pre-upgrade check, is an incredibly powerful tool that is designed to take most of the fear and risk out of what used to be a very dangerous procedure. You now have a powerful, stable, and secure platform with all the latest features, enhancements, and long-term support of the newest RHEL release, all without having to reinstall your applications or reconfigure your system from scratch. By taking the time to prepare, you have ensured a smooth and efficient transition to the next generation of enterprise Linux.
Frequently Asked Questions
What is `leapp`?
`leapp` is the official, command-line utility and framework provided by Red Hat for performing a supported, in-place upgrade from one major version of RHEL to the next (e.g., from 9 to 10).
What is an in-place upgrade?
An in-place upgrade is the process of upgrading your operating system to a new major version on the same hardware, without first wiping the system and reinstalling from scratch. It is designed to preserve your existing applications, data, and settings.
What is a "pre-upgrade check"?
This is the most important feature of `leapp`. It is a "dry run" that simulates the entire upgrade process and checks your system for any potential problems that could cause the real upgrade to fail, all without making any actual changes to your system.
What is an "inhibitor" in the `leapp` report?
An inhibitor is a serious problem, found during the pre-upgrade check, that will prevent the upgrade from proceeding. The `leapp upgrade` command will be blocked until the administrator manually resolves all inhibitors.
Do I need a Red Hat subscription to upgrade?
Yes. A valid subscription is required so that the `leapp` tool can access the official RHEL 10 software repositories to download all the new packages needed for the upgrade.
What if the upgrade fails halfway through the reboot?
This is exactly why a full system backup or snapshot is the most critical step. In the rare case of a catastrophic failure during the upgrade, the only supported recovery method is to restore from the backup you made before you started.
Can I upgrade from RHEL 8 directly to RHEL 10?
No. The supported upgrade path is always from one major version to the next. To get from RHEL 8 to RHEL 10, you would first need to perform an in-place upgrade from RHEL 8 to RHEL 9, and then perform a second in-place upgrade from RHEL 9 to RHEL 10.
How long does the entire upgrade process take?
This depends heavily on your hardware and internet speed, but you should plan for it to be a multi-hour process. The pre-upgrade check and the download can take an hour, and the final upgrade during the reboot can easily take another hour or more.
Will an in-place upgrade delete my personal files?
No, it is designed to preserve your `/home` directory, where your personal files and user settings are stored. However, because it is a major system change, a full backup is still a mandatory precaution.
What is a "repository" in Linux?
A repository is a central server that stores software packages. Your system's package manager (like `dnf`) connects to these repositories to download and install new software and updates.
What is a "kernel"?
The kernel is the core, central part of the operating system. A major RHEL release always includes a new, updated version of the Linux kernel.
Can I use this guide to upgrade a server?
Yes, the `leapp` process is the same for both RHEL Workstation and RHEL Server. However, for a critical production server, the pre-upgrade checks and the backup and recovery plan are even more important.
What is a "bare-metal" server?
A bare-metal server is a physical computer server, as opposed to a virtual machine. The upgrade process is the same, but the backup and recovery methods are different (disk image vs. snapshot).
What is a partition?
A partition is a logical section of a physical hard drive. A standard RHEL installation creates several partitions for different parts of the operating system.
Do I need to be a Linux expert to do this?
You need to be comfortable working on the command line. The `leapp` tool itself is very well-documented, and the pre-upgrade report provides clear, step-by-step instructions for fixing any problems it finds.
What if I am using third-party (non-Red Hat) software?
This is one of the most common causes of an "inhibitor." The `leapp` tool will check if your third-party software is compatible with the new version of RHEL. You may need to update or remove some third-party applications before you can proceed.
What does the `-y` flag do in the `dnf` command?
The `-y` flag automatically answers "yes" to any confirmation prompts that the command might ask. It is a way to run a command non-interactively.
What is a "snapshot" in a VM?
A snapshot is a saved state of a virtual machine at a specific moment in time. It saves the entire state of the VM's disk, memory, and devices, and you can instantly revert back to it if something goes wrong.
What is a "dry run"?
A dry run is a test process where you run a command to see what it *would* do, without it actually making any changes. The `leapp preupgrade` command is a classic example of a dry run.
Where can I find the official documentation for this?
Red Hat provides extensive, detailed, and official documentation for the in-place upgrade process for every major version of RHEL on their customer portal and developer website.
What's Your Reaction?
Like
0
Dislike
0
Love
0
Funny
0
Angry
0
Sad
0
Wow
0