Migrate, Upgrade, Convert CentOS 8 to Rocky Linux 8.

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

Migrate, Upgrade, Convert CentOS 8 to Rocky Linux 8
Check the current release of the 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

Migrate, Upgrade, Convert CentOS 8 to Rocky Linux 8
Download the migration script to migrate CentOS 8 to Rocky Linux.
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.

Migrate, Upgrade, Convert CentOS 8 to Rocky Linux 8
Give the permission, so that we can run the 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

Migrate, Upgrade, Convert CentOS 8 to Rocky Linux 8
Use -h option with the script for help
./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.

Migrate, Upgrade, Convert CentOS 8 to Rocky Linux 8
Use -r option to Convert CentOS 8 to Rocky Linux 8.
./migrate2rocky.sh -r
Migrate, Upgrade, Convert CentOS 8 to Rocky Linux 8
List of installedinstalled system packages, enabled modules for the system repositories in CentOS 8.

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

Migrate, Upgrade, Convert CentOS 8 to Rocky Linux 8
Added the Repository for Rocky Linux.

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

Migrate, Upgrade, Convert CentOS 8 to Rocky Linux 8
Now rocky linux 8 packages are getting download.

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

Migrate, Upgrade, Convert CentOS 8 to Rocky Linux 8
Packages are getting install, re-installing, and upgrading.
Reboot the System.

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

The Rocky Linux Kernel is ready to boot.

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

Check the current release of the system.
cat /etc/redhat-release

Output: Rocky Linux release 8.4 (Green Obsidian).
Use the Rocky Linux 8.4

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.

Give your valuable time