×


Migrate from CentOS 8 To Rocky Linux 8 - Step by Step Process ?

At the end of last year, On December 2020, Red Hat made a grim announcement about shifting the focus from CentOS Linux to CentOS Stream which will henceforth be the upstream release of RHEL. What this means is that support for CentOS 8, which was to run right up until 2029, now comes to a premature end on December 31, 2021. The news was received with a lot of apprehension and disappointment from the opensource community, especially CentOS users. Large corporations such as Rackspace, Verizon and GoDaddy, also expressed their dissatisfaction with the sudden termination of CentOS Linux. There has been a general feeling that CentOS Stream will not deliver the stability & reliability that was the hallmark of CentOS Linux which saw it handle production workloads.

In response to the announcement, Gregory Kurtzer, one of the co-founders of CentOS Linux, announced the intention of unveiling an alternative distribution which will support users and enterprises running CentOS 8. He came up with the idea of Rocky Linux, which is a fork of CentOS Linux. Rocky Linux , code named Green Obsidian, is an enterprise-grade and production-ready free and opensource distribution that was released with the intention of filling the gap that will be left after the demise of CentOS 8. The current release is Rocky Linux 8.4 which was released on June 21 2021, a few months after the Beta version Rocky Linux 8.3 RC 1.

Rocky Linux 8.4 is available for both x86_64 and ARM64 systems in various ISO images including DVD, Minimal and boot ISO images. To get Rocky Linux, download it from the Official download page. Alternatively, a migration script by Rocky Linux Software Foundation is available to help you migrate from CentOS 8 to Rocky Linux. So, instead of performing a fresh installation, you can upgrade from your current CentOS 8 OS to Rocky Linux 8.4.

Here at Ibmi Media, as part of our Server Management Services, we regularly help our Customers to perform Server Migration from one Linux Distribution to another of your choice.

In this context, we shall look into the migration step from CentOS 8 Linux to the latest stable version of Rocky Linux – Rocky Linux 8.4.


The process of Migrating to Rocky Linux from CentOS 8 

Before you begin the upgrade, we highly advise you to back up all your files so that should your system break, your data will be safe. With your data backup up at a safe location, you can safely proceed and commence the upgrade.

i. Now, start by verifying the current CentOS release with the below command:

$ cat /etc/redhat-release

ii. To begin the upgrade process, first, download the Rocky Linux 8.4 migration script from Github using the command below:

$ wget https://raw.githubusercontent.com/rocky-linux/rocky-tools/main/migrate2rocky/migrate2rocky.sh

iii. The download should take just a few seconds, and once complete, assign execute permissions with the below command:

$ chmod +x migrate2rocky.sh

iv. With the script now executable, commence the upgrade by running the below command:

$ sudo bash migrate2rocky.sh -r

The above script performs multiple operations. It start with identification of all repositories mapping from CentOS 8 to Rocky Linux. It then proceeds to purge the old CentOS 8 repositories and in their place, replaces them with Rocky Linux 8.4 equivalents.

Thereafter, it downloads the latest packages from Rocky Linux repositories, reinstalls and finally upgrades some of the packages. This is quite an intensive process and in our case, it took roughly 4 hours. Once the migration or switch to Rocky Linux 8.4 is complete, you will be notified on the terminal. This confirms that the switch to Rocky Linux 8.4 was a success.

A summary of the migration is stored in the /var/log/migrate2rocky.log log file.

v. Finally, reboot your system:

$ sudo reboot

The first entry on the GRUB menu will the Rocky Linux boot option. This is the first sign that the migration was fruitful. Simply press ENTER to continue booting to Rocky Linux.

vi. Next, graphical login screen will be displayed. Simply type in your password and hit ENTER to login to our freshly upgraded Rocky Linux system.

The Rocky Linux desktop background will come into view. This is iron-clad proof that the switch to Rocky Linux was a success.

You can verify on the terminal, and this time around, you will get different results.


[Need help in Migrating to Rocky Linux 8? We can help you. ]


Conclusion

This article covers how to easily migrate to Rocky Linux 8.4 from CentOS 8. Rocky Linux is a community enterprise operating system designed to be 100% compatible with RedHat Enterprise Linux. Rocky Linux dev team has created a migration script called migrate2rocky to easily convert an existing CentOS 8 system to Rocky Linux 8.


To Upgrade the current CentOS 8 Linux system to latest available version, run the command:

$ sudo dnf --refresh upgrade

After update is completed, Reboot your system:

$ sudo reboot