Atlantic.Net Blog

How to Migrate from CentOS 8 to Rocky Linux 8

As you may be aware, CentOS has announced they will be discontinuing support for CentOS 8 on December 31, 2021 and discontinuing future development of new CentOS versions that track RedHat upstream releases.

Luckily, a new community enterprise operating system called Rocky Linux from the founder of CentOS has been introduced.

With the release of Rocky Linux 8.4, you can now easily migrate your CentOS 8 server to a fully compatible operating system that will continue to be free and fully supported for the long term.


Step 1 – Update CentOS 8 Packages

Before starting, you will need to update all CentOS 8 packages to the latest versions. You can update them with the following command:

dnf update -y

Once all the packages are updated, restart your system to apply the update.

reboot

Next, verify your current operating system version using the following command:

cat /etc/redhat-release

Output:

CentOS Linux release 8.4.2105

You can also verify it using the following command:

cat /etc/os-release

Output:

NAME="CentOS Linux"
VERSION="8"
ID="centos"
ID_LIKE="rhel fedora"
VERSION_ID="8"
PLATFORM_ID="platform:el8"
PRETTY_NAME="CentOS Linux 8"
ANSI_COLOR="0;31"
CPE_NAME="cpe:/o:centos:centos:8"
HOME_URL="https://centos.org/"
BUG_REPORT_URL="https://bugs.centos.org/"
CENTOS_MANTISBT_PROJECT="CentOS-8"
CENTOS_MANTISBT_PROJECT_VERSION="8"

Step 2 – Upgrade CentOS 8 to Rocky Linux 8

Rocky Linux provides a migration script that helps you to convert an existing CentOS 8 system to Rocky Linux 8. You can download the migrate2rocky script from Rocky Linux’s Github repository using the following command:

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

Once the script is downloaded, set the execution permission with the following command:

chmod +x migrate2rocky.sh

Next, start the migration process using the following command:

bash migrate2rocky.sh  -r

Once the migration process has been completed, you should get the following output:

Complete!

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

Next, restart your system to apply the migration.

reboot

Step 3 – Verify Rocky Linux 8 Migration

After restarting the system, you can verify whether CentOS 8 was migrated successfully to Rocky Linux 8.

You can check it with the following command:

cat /etc/redhat-release

You should get the following output:

Rocky Linux release 8.4 (Green Obsidian)

You can also check it with the following command:

cat /etc/os-release

Output:

NAME="Rocky Linux"
VERSION="8.4 (Green Obsidian)"
ID="rocky"
ID_LIKE="rhel fedora"
VERSION_ID="8.4"
PLATFORM_ID="platform:el8"
PRETTY_NAME="Rocky Linux 8.4 (Green Obsidian)"
ANSI_COLOR="0;32"
CPE_NAME="cpe:/o:rocky:rocky:8.4:GA"
HOME_URL="https://rockylinux.org/"
BUG_REPORT_URL="https://bugs.rockylinux.org/"
ROCKY_SUPPORT_PRODUCT="Rocky Linux"
ROCKY_SUPPORT_PRODUCT_VERSION="8"

Conclusion

In this post, you learned how to migrate CentOS 8 to Rocky Linux 8. You can now start using the Rocky Linux 8.4. Try it on your CentOS 8 Atlantic.Net VPS today!

Get a $250 Credit and Access to Our Free Tier!

Free Tier includes:
G3.2GB Cloud VPS a Free to Use for One Year
50 GB of Block Storage Free to Use for One Year
50 GB of Snapshots Free to Use for One Year