Hi Guys! Let’s see How to Migrate, Upgrade, or Convert CentOS 8 to Rocky Linux 8. Now CentOS 8 support will be ending soon this year 2021.
Also, now the Rocky Linux 8.4 will be the binaries compatible for RHEL, So for the future use we have to use Rocky Linux.
So we can freshly Install Rocky Linux 8.4 and migrate or software, or else can Upgrade/Migrate/Convert CentOS 8 to Rocky Linux 8 via script.
If you want to install fresh Rocky Linux on system you can follow the link. Else we have an option to Migrate/Upgrade/Convert CentOS 8 to Rocky Linux 8.
Migrate, Upgrade, or Convert from CentOS to Rocky Linux 8 Step by Step guide
STEP 1: How to check the current Release on running system

So, we will use cat /etc/redhat-release to check the current CentOS version.
cat /etc/redhat-release
Output: CentOS Linux release 8.4.2105
So currently we are using CentOS 8.4, let’s move to next step will upgrade the existing CentOS 8.4 packages.
STEP 2: Upgrade the existing System CentOS 8.4
Let’s Upgrade the existing system to ensure that all the packages are upgrade and there is no broken packages.
sudo dnf update && sudo dnf upgrade
Once upgrade will be done, download the migration Script in the next step
STEP 3: Download the migrate2rocky.sh Script
So download the migration script via using the command wget

wget https://raw.githubusercontent.com/rocky-linux/rocky-tools/main/migrate2rocky/migrate2rocky.sh
It will get downloaded by the name “migrate2rocky.sh”, let’s give the executable permission to execute the migrate2rocky.sh script.

chmod +x migrate2rocky.sh
STEP 4: Run the migrate2rocky.sh Script.
So run the script migrate2rocky.sh with -h option for the help and found that -r is use to convert from CentOS to Rocky Linux

./migrate2rocky.sh -h
Dot(.) denotes the current directory in which are script get’s downloaded, let’s run the script to Upgrade the CentOS 8 to Rocky Linux 8.

./migrate2rocky.sh -r

So first we get the list of installed system packages, enabled modules for the system repositories on CentOS 8.

It added the repository for the Rocky Linux on the CentOS 8 system.

So, there are 1362 packages to be downloaded, some packages will install, re-install or will be upgraded.


After the complete migration, it will give the message like “Done, please reboot your system”, just reboot the system.

At the boot loader screen can see the Rocky Linux 8.4 (Green Obsidian), so we have successfully migrated, Converted or we can see Upgraded from CentOS 8 to Rocky Linux 8.4.

So here we are at the login screen for the Rocky Linux 8.4. Now login and check via command also “cat /etc/redhat-release”.

cat /etc/redhat-release
Output: Rocky Linux release 8.4 (Green Obsidian).

So now we have successfully Migrate, Upgrade or Convert from CentOS 8.4 to Rocky Linux 8.4, want to download the ISO follow the link.
One Reply to “Migrate, Upgrade, Convert CentOS 8 to Rocky Linux 8.”