{"id":69257,"date":"2022-09-30T11:00:00","date_gmt":"2022-09-30T15:00:00","guid":{"rendered":"https:\/\/jumpcloud.com\/?p=69257"},"modified":"2023-10-11T15:29:21","modified_gmt":"2023-10-11T19:29:21","slug":"how-to-upgrade-rhel-8-to-rhel-9","status":"publish","type":"post","link":"https:\/\/jumpcloud.com\/blog\/how-to-upgrade-rhel-8-to-rhel-9","title":{"rendered":"How to Upgrade From RHEL 8 to RHEL 9"},"content":{"rendered":"\n
Jump to Tutorial<\/a><\/p>\n\n\n\n The latest release of Red Hat Enterprise Linux 9 (RHEL 9) was officially made generally available (GA) by Red Hat on May 17, 2022, taking over from the beta version released on November 2, 2021.<\/p>\n\n\n\n RHEL 9 brings major changes that seek to enhance performance, improve stability, and boost security<\/a>. Some of the notable improvements and enhancements in the latest release include:<\/p>\n\n\n\n Check out the release notes<\/a> for the most detailed and comprehensive list of all the new features and improvements in RHEL 9.<\/p>\n\n\n\n In this tutorial, we\u2019ll demonstrate how to perform an in-place upgrade from RHEL 8 to RHEL 9.<\/p>\n\n\n\n Before you begin, please ensure you have the following set of requirements:<\/p>\n\n\n\n To perform the in-place upgrade from RHEL 8 to RHEL 9, you need to be running RHEL 8.6, which is the required source OS version. If you have an older release, then upgrade it to RHEL 8.6 as follows.<\/p>\n\n\n\n Once the upgrade is complete, verify that you are running RHEL 8.6 as follows.<\/p>\n\n\n\n Next, you need to confirm your system has an active Red Hat subscription. To do so, open your terminal and execute the following command:<\/p>\n\n\n\n If your RHEL 8 system has a subscription, the following output will be displayed:<\/p>\n\n\n\n If this is not the case, you will need to register and subscribe your RHEL system to the Red Hat Customer Portal<\/a> before continuing to Step 3.<\/p>\n\n\n\n If you had previously performed an in-place upgrade from RHEL 7 to RHEL 8, you need to purge the If you are starting from RHEL 8, skip this step.<\/p>\n\n\n\n Next, ensure the BaseOS and AppStream repositories are enabled as follows.<\/p>\n\n\n\n If you are upgrading using Red Hat Update Infrastructure (RHUI) on AWS, then enable the required RHUI repositories.<\/p>\n\n\n\n Next, install the required RHUI packages to ensure your system is ready for the upgrade.<\/p>\n\n\n\n Next, lock your RHEL system to RHEL 8.6. This marks the version of RHEL from which the upgrade will start.<\/p>\n\n\n\n In the next step, update all packages to the latest versions.<\/p>\n\n\n\n Then reboot your system.<\/p>\n\n\n\n The Leapp utility is a command-line tool that allows users to make an in-place upgrade. Under the hood, the Leapp utility does the following:<\/p>\n\n\n\n To install the Leapp utility, run the command:<\/p>\n\n\n\n The Versionlock plugin is a plugin that holds back packages from being upgraded to newer versions. If you are using the plugin to lock packages to a specific version, clear the lock as shown.<\/p>\n\n\n\n For a seamless upgrade to RHEL 9, you need to disable the To edit the Firewalld configuration, first switch to the root user.<\/p>\n\n\n\n Then access the configuration file.<\/p>\n\n\n\n Locate and \u201cinsert a comment\u201d at the Save and restart Firewalld for the changes to apply.<\/p>\n\n\n\n Before upgrading to RHEL 9, it\u2019s a good idea to evaluate the upgradability of your system by executing a pre-upgrade process using the During the pre-upgrade process, the Leapp utility collects data about your system, verifies the upgradability, and generates a pre-upgrade report that\u2019s saved in the The report contains a summary of all the potential issues that might hinder the upgrade and proposes recommended workarounds. It also determines whether or not you can continue with the upgrade, and will not allow the upgrade to run until those issues are fixed.<\/p>\n\n\n\n To begin the pre-upgrade process, run the command:<\/p>\n\n\n\n It is totally normal to run into some errors when performing the pre-upgrade process. In our case, we ran into two errors indicating the presence of invalid files. To resolve an error, click on the link provided as a hint.<\/p>\n\n\n\n Once you have successfully addressed the specific errors identified for your system, re-run the pre-upgrade operation. This time around, you should receive an error-free report that will allow you to proceed with the in-place upgrade to RHEL 9.<\/p>\n\n\n\n Finally, perform the upgrade to RHEL 9 by running the in-place upgrade command.<\/p>\n\n\n\n The upgrade takes quite a while, so this is a good time to take a break from your desk. When the upgrade completes, you will be prompted to restart your system. Go ahead and reboot.<\/p>\n\n\n\n On the GRUB menu select the RHEL-Upgrade-Initramfs option.<\/p>\n\n\n\n Once selected, the upgrade to RHEL 9 will continue and some packages will be upgraded while others will be obsoleted.<\/p>\n\n\n\n The system will then restart, and this time around, select the first GRUB entry as shown.<\/p>\n\n\n\n On the login screen, provide your user\u2019s password and select ENTER to log in.<\/p>\n\n\n\n Since the system is still locked to RHEL 8.6, you need to set it again to version 9.0. To do so, run the command:<\/p>\n\n\n\n To confirm the system has been set to 9.0 release, run the command:<\/p>\n\n\n\n In addition, you can confirm the version of RHEL you are running as follows.<\/p>\n\n\n\n And there you have it. We have demonstrated step-by-step how to perform an in-place upgrade of RHEL 8 to RHEL 9.<\/p>\n\n\n\n Although keeping your system up to date is the first step in mitigating potential security risks, it should not be the last. This holds especially true if you\u2019re an IT admin managing multiple Linux systems. Linux malware is increasing in volume and complexity<\/a> and most small to medium-size enterprises (SMEs) aren\u2019t ready for it. <\/p>\n\n\n\n Read more about the importance of standardizing security configurations across your fleet and how to simplify Linux device hardening<\/a>.\u00a0<\/p>\n","protected":false},"excerpt":{"rendered":" Learn how to perform an in-place upgrade from RHEL 8 to RHEL 9 to take advantage of improvements in performance, availability, and security.<\/p>\n","protected":false},"author":150,"featured_media":69273,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"_oasis_is_in_workflow":0,"_oasis_original":0,"_oasis_task_priority":"","inline_featured_image":false,"footnotes":""},"categories":[2781],"tags":[],"collection":[2778],"platform":[],"funnel_stage":[3017],"coauthors":[2535],"acf":[],"yoast_head":"\n\n
Prerequisites<\/h2>\n\n\n\n
\n
Step 1: Upgrade Your System to RHEL 8.6<\/h2>\n\n\n\n
$ sudo dnf update<\/code><\/p>\n\n\n\n
$ cat \/etc\/redhat-release<\/code><\/p>\n\n\n\n
<\/figure>\n\n\n\n
Step 2: Verify You Have a Red Hat Enterprise Linux Server Subscription<\/h2>\n\n\n\n
$ sudo subscription-manager list –installed<\/code><\/p>\n\n\n\n
<\/figure>\n\n\n\n
Step 3: Delete the \u201ctmp_leapp_py3\u201d Directory<\/h2>\n\n\n\n
\/root\/tmp_leapp_py3<\/code> directory with the following command:<\/p>\n\n\n\n
$ sudo rm -Rf \/root\/tmp_leapp_py3<\/code><\/p>\n\n\n\n
Step 4: Confirm BaseOS and AppStream Repositories Are Enabled<\/h2>\n\n\n\n
$ sudo subscription-manager repos –enable rhel-8-for-x86_64-baseos-rpms –enable rhel-8-forx86_64-appstream-rpms<\/code><\/p>\n\n\n\n
<\/figure>\n\n\n\n
$ sudo dnf config-manager \u2013set-enabled rhui-client-config-server-8<\/code><\/p>\n\n\n\n
$ sudo dnf -y install rh-amazon-rhui-client-ha leapp-rhui-aws<\/code><\/p>\n\n\n\n
Step 5: Lock the System to RHEL 8.6<\/h2>\n\n\n\n
$ sudo subscription-manager release –set 8.6<\/code><\/p>\n\n\n\n
<\/figure>\n\n\n\n
Step 6: Update Packages to the Latest Versions<\/h2>\n\n\n\n
$ sudo dnf update<\/code><\/p>\n\n\n\n
<\/figure>\n\n\n\n
$ sudo reboot<\/code><\/p>\n\n\n\n
Step 7: Install the Leapp Utility Tool<\/h2>\n\n\n\n
\n
$ sudo dnf install leapp-upgrade -y<\/code><\/p>\n\n\n\n
<\/figure>\n\n\n\n
Step 8: Remove the Versionlock Plugin<\/h2>\n\n\n\n
$ sudo dnf versionlock clear<\/code><\/p>\n\n\n\n
Step 9: Edit the Firewalld Configuration<\/h2>\n\n\n\n
AllowZoneDrifting<\/code> value in the Firewalld configuration. If your firewall configuration needs it, be sure to edit the value back to the default after you complete your system upgrade. <\/p>\n\n\n\n
$ sudo su<\/code><\/p>\n\n\n\n
# vim \/etc\/firewalld\/firewalld.conf<\/code><\/p>\n\n\n\n
AllowZoneDrifting <\/code>attribute; save and quit vim.<\/p>\n\n\n\n
<\/figure>\n\n\n\n
# systemctl restart firewalld<\/code><\/p>\n\n\n\n
Step 10: Perform a Pre-Upgrade and Resolve Any Issues<\/h2>\n\n\n\n
leapp preupgrade<\/code> command.<\/p>\n\n\n\n
\/var\/log\/leapp\/leapp-report.txt<\/code> text file. <\/p>\n\n\n\n
$ sudo leapp preupgrade –target 9.0<\/code><\/p>\n\n\n\n
<\/figure>\n\n\n\n
<\/figure>\n\n\n\n
<\/figure>\n\n\n\n
Step 11: Upgrade RHEL 8 to RHEL 9<\/h2>\n\n\n\n
$ sudo leapp upgrade –target 9.0<\/code><\/p>\n\n\n\n
<\/figure>\n\n\n\n
$ sudo reboot<\/code><\/p>\n\n\n\n
<\/figure>\n\n\n\n
<\/figure>\n\n\n\n
<\/figure>\n\n\n\n
<\/figure>\n\n\n\n
<\/figure>\n\n\n\n
$ sudo subscription-manager release –set=9.0<\/code><\/p>\n\n\n\n
$ sudo subscription-manager release –show<\/code><\/p>\n\n\n\n
<\/figure>\n\n\n\n
$ cat \/etc\/redhat-release<\/code><\/p>\n\n\n\n
<\/figure>\n\n\n\n
Conclusion<\/h2>\n\n\n\n