How to upgrade from Rocky Linux 8 to Rocky Linux 9

Rocky Linux is a community enterprise operating system designed to be 100% bug-for-bug compatible with America's top enterprise Linux distribution now that its downstream partner has shifted direction. It is under intensive development by the community. Rocky Linux is led by Gregory Kurtzer, founder of the CentOS project.

Pre-requisites :

  • A Server / VPS running Rocky Linux 8

  • root access to the system.

Don't forget to take a backup of your important files and data before proceeding with the upgrade process.

First, Check that your system is up to date by running the following commands, After the update is completed, reboot the server,

dnf update -y

After Rebooting, Verify that it is running the latest Rocky Linux release,

cat /etc/os-release


[[root@vps ~]# cat /etc/os-release
NAME="Rocky Linux"
VERSION="8.8 (Green Obsidian)"
ID_LIKE="rhel centos fedora"
PRETTY_NAME="Rocky Linux 8.8 (Green Obsidian)"

Install elevate-release package with the project repo and GPG key.

yum install -y$(rpm --eval %rhel).noarch.rpm


[root@vps ~]# yum install -y$(rpm --eval %rhel).noarch.rpm

Last metadata expiration check: 0:11:03 ago on Thu 22 Jun 2023 02:17:45 PM UTC.
elevate-release-latest-el8.noarch.rpm            85 kB/s | 9.8 kB     00:00
Dependencies resolved.
 Package               Architecture Version            Repository          Size
 elevate-release       noarch       1.0-2.el8          @commandline       9.8 k

Transaction Summary
Install  1 Package

Total size: 9.8 k
Installed size: 3.4 k
Downloading Packages:
Running transaction check
Transaction check succeeded.
Running transaction test
Transaction test succeeded.
Running transaction
  Preparing        :                                                        1/1
  Installing       : elevate-release-1.0-2.el8.noarch                       1/1
  Verifying        : elevate-release-1.0-2.el8.noarch                       1/1



Install leapp packages and migration data for the OS you want to upgrade,

yum install -y leapp-upgrade leapp-data-rockylinux


[root@vps ~]# yum install -y leapp-upgrade leapp-data-rockylinux
Last metadata expiration check: 0:03:04 ago on Thu 22 Jun 2023 02:29:16 PM UTC.
Dependencies resolved.
 Package                     Arch   Version                     Repo       Size
 leapp-data-rocky            noarch 0.2-2.el8                   elevate    57 k
 leapp-upgrade-el8toel9      noarch 1:0.16.0-6.el8_6.elevate.13 elevate   640 k
Installing dependencies:
 checkpolicy                 x86_64 2.9-1.el8                   baseos    345 k
 leapp                       noarch 0.14.0-1.el8_6              elevate    31 k
 leapp-deps                  noarch 0.14.0-1.el8_6              elevate    14 k
 leapp-upgrade-el8toel9-deps noarch 1:0.16.0-6.el8_6.elevate.13 elevate    28 k
 pciutils                    x86_64 3.7.0-3.el8                 baseos    104 k
                             noarch 2.9-24.el8                  baseos    253 k
 python3-audit               x86_64 3.0.7-4.el8                 baseos     86 k
 python3-chardet             noarch 3.0.4-7.el8                 baseos    194 k
 python3-idna                noarch 2.5-5.el8                   baseos     96 k
 python3-leapp               noarch 0.14.0-1.el8_6              elevate   174 k
 python3-libsemanage         x86_64 2.9-9.el8_6                 baseos    127 k
 python3-pip                 noarch 9.0.3-22.el8.rocky.0        appstream  19 k
 python3-policycoreutils     noarch 2.9-24.el8                  baseos    2.2 M
 python3-pysocks             noarch 1.6.8-3.el8                 baseos     33 k
 python3-requests            noarch 2.20.0-2.1.el8_1            baseos    122 k
 python3-setools             x86_64 4.3.0-3.el8                 baseos    623 k
 python3-setuptools          noarch 39.2.0-7.el8                baseos    162 k
 python3-urllib3             noarch 1.24.2-5.el8                baseos    176 k
 python36                    x86_64 3.6.8-38.module+el8.5.0+671+195e4563
                                                                appstream  18 k
 systemd-container           x86_64 239-74.el8_8                baseos    771 k
Enabling module streams:
 python36                           3.6

Disable Zonedrifting by changing yes to no.

vim /etc/firewalld/firewalld.conf

change the following line


Now, Upgrade Rocky Linux 8 to Rocky Linux 9 now and reboot it,

leapp upgrade


[root@vps ~]# leapp upgrade
==> Processing phase `configuration_phase`
====> * ipu_workflow_config
        IPU workflow config actor
==> Processing phase `FactsCollection`
====> * system_facts
        Provides data about many facts from system.
====> * vendor_repositories_mapping
        Scan the vendor repository mapping files and provide the data to other actors.
====> * check_enabled_vendor_repos
        Create a list of vendors whose repositories are present on the system and enabled.
====> * vendor_repo_signature_scanner
        Produce VendorSignatures messages for the vendor signature files inside the
====> * sssd_facts_8to9
        Check SSSD configuration for changes in RHEL9 and report them in model.
====> * load_device_driver_deprecation_data
        Loads deprecation data for drivers and devices (PCI & CPU)
====> * scandasd
        In case of s390x architecture, check whether DASD is used.
====> * udevadm_info
        Produces data exported by the "udevadm info" command.
====> * firewalld_collect_used_object_names
        This actor reads firewalld's configuration and produces Model
====> * check_custom_network_scripts
        Check the existence of custom network-scripts and warn user about possible
====> * transaction_workarounds
        Provides additional RPM transaction tasks based on bundled RPM packages.
====> * scan_sap_hana
        Gathers information related to SAP HANA instances on the system.
====> * pci_devices_scanner
        Provides data about existing PCI Devices.
====> * detect_kernel_drivers
        Matches all currently loaded kernel drivers against known deprecated and removed drivers.
====> * scanclienablerepo
   architecture. If no, inhibit the upgrade process.
====> * check_se_linux
        Check SELinux status and produce decision messages for further action.
====> * checkcpu
        Check whether the CPU is supported by the target system. Inhibit upgrade if not.
====> * check_etc_releasever
        Check releasever info and provide a guidance based on the facts
====> * check_root_symlinks
        Check if the symlinks /bin and /lib are relative, not absolute.
====> * check_yum_plugins_enabled
        Checks that the required yum plugins are enabled.
====> * check_rpm_transaction_events
        Filter RPM transaction events based on installed RPM packages
====> * check_installed_kernels
        Inhibit IPU (in-place upgrade) when installed kernels conflict with a safe upgrade.
====> * check_os_release
        Check if the current RHEL minor version is supported. If not, inhibit the upgrade process.
====> * check_non_mount_boot_s390
        Inhibits on s390 when /boot is NOT on a separate partition.
====> * efi_check_boot
        Adjust EFI boot entry for first reboot
====> * detect_web_servers
        Check for a presence of a web server, and produce a warning if one is installed.
====> * check_skip_phase
        Skip all the subsequent phases until the report phase.
==> Processing phase `TargetTransactionFactsCollection`
====> * target_userspace_creator
        Initializes a directory to be populated as a minimal environment to run binaries from the target system.
Rocky Linux 9 - BaseOS                          1.0 MB/s | 1.9 MB     00:01
Rocky Linux 9 - AppStream                       6.2 MB/s | 7.1 MB     00:01
Rocky Linux 9 - CRB                             4.5 MB/s | 2.2 MB     00:00
Rocky Linux 9 - HighAvailability                485 kB/s | 245 kB     00:00
Rocky Linux 9 - ResilientStorage                130 kB/s | 251 kB     00:01
Rocky Linux 9 - Extras                           20 kB/s |  10 kB     00:00
Dependencies resolved.
 Package                       Arch    Version                   Repository         Size
 dnf                           noarch  4.14.0-5.el9_2            rocky9-baseos     468 k
 dnf-plugins-core              noarch  4.3.0-5.el9_2             rocky9-baseos      36 k
Installing dependencies:
 acl                           x86_64  2.3.1-3.el9               rocky9-baseos      71 k
 alternatives                  x86_64  1.20-2.el9                rocky9-baseos      37 k
 audit-libs                    x86_64  3.0.7-103.el9             rocky9-baseos     116 k
 basesystem                    noarch  11-13.el9                 rocky9-baseos     6.9 k
 bash                          x86_64  5.1.8-6.el9_1             rocky9-baseos     1.7 M
 bzip2-libs                    x86_64  1.0.8-8.el9               rocky9-baseos      40 k
 ca-certificates               noarch  2022.2.54-90.2.el9        rocky9-baseos     823 k
 coreutils                     x86_64  8.32-34.el9               rocky9-baseos     1.1 M

After reboot, You can monitor the upgrade process under your VNC/Console,




We can verify that Rocky Linux 8 has been successfully upgraded to Rocky Linux 9, with the following command,

cat /etc/os-release


[root@vps ~]# cat /etc/os-release
NAME="Rocky Linux"
VERSION="9.2 (Blue Onyx)"
ID_LIKE="rhel centos fedora"
PRETTY_NAME="Rocky Linux 9.2 (Blue Onyx)"

Done! Your server is now running Rocky Linux 9!