How to Migrate From CentOS 8 to Rocky Linux 8

Rocky Linux 8 is one to one RHEL binary compatible Linux OS, its latest stable release 8.4 has been released. Thus, if you want to migrate from CentOS 8 to Rocky Linux, then here is the tutorial using the official migrate2rocky script.

After the RedHat announcement to end the life of the Long term supported CentOS 8 version, multiple developers came forward with the best CentOS alternative options, and one of them is Rocky Linux. Recently, the developers behind and the founder Mr.Gregory Kurtzer, who was also the founder and behind the CentOS project released the stable 8.4 version of the OS.

When it comes to what’s new, Rocky Linux 8.4 follows in the footsteps of its upstream Linux (Redhat) and comes with Python 3.9, GCC 10, Rust 1.49, LLVM 11, Go 1.15.7, SWIG 4.0, and Subversion 1.14 for programming and Redis 6 topics. , PostgreSQL 13 and MariaDB 10.5 as database technologies.

At the security level, the main changes have been that the IPsec VPN provided by Libreswan now supports TCP encapsulation and the security labels for IKEv2, that the ‘scap-security-guide’ packages have been modified to version 0.1.54.

So, if finally, you want to leave your existing CentOS 8 installation by converting it to Rocky Linux, then here are the steps to follow.

 

Steps to migrate CentOS 8 to Rocky Linux 8

Before performing the below CentOS 8 to Rocky migration commands, make sure you have a backup for your system. Because many times few applications might not work after migration, thus, it would be a wise idea to take a full system snapshot.

1. Run system update & upgrade

The first thing we have to perform is to ensure that all the packages installed on our existing CentOS 8 are up to date and have their latest version. For this run the system update and upgrade command using DNF package manager.

sudo dnf update && sudo dnf upgrade

 

2. Download Rocky Linux 8 to CentOS 8 migration script

For easy migration, Rocky developers have created a script called  migrate2rocky available on the Github page of this Linux. Let’s download it on the existing CentOS system that we want to convert.

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

or

curl -O https://raw.githubusercontent.com/rocky-linux/rocky-tools/main/migrate2rocky/migrate2rocky.sh

 

3. Make Script Executable

Change the permission of the downloaded script, so that we can execute it on our Linux operating system.

sudo chmod +x migrate2rocky.sh

 

4. Start the CentOS migration to Rocky Linux script

Once we have the script, we can start the conversion process. Also, we can use three kinds of options with the script as shown below.

./migrate2rocky.sh -options
options
├── -h   # --> Display this help
├── -r   # --> Convert to Rocky
└── -V   # --> Verify switch

So, to convert to Rocky type:

sudo bash migrate2rocky.sh -r

The script will automatically change the CentOS 8 Linux repositories, GPG keys, logo, and other things to Rocky Linux. It may take some time depending upon your existing system size.

Once the migration is completed, you will get:

Done, please reboot your system.
A log of this installation can be found at /var/log/migrate2rocky.log

Now, sync the command and then simply reboot your system.

sudo dnf distro-sync -y 
sudo reboot

 

5. Check the OS version

To confirm you have successfully migrated to Rocky Linux, let’s check the OS version. On your command terminal type-

cat /etc/os-release

You have something like the below:

Command to migrate CentOS 8 to Rocky Linux 8 Check os version min

 

Other related articles:

 

 

Leave a Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.