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.
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.