Rocky Linux 8, code-named Green Obsidian, stable version has been released! This guide explains how to migrate to Rocky Linux 8 from CentOS 8 Linux using migrate2rocky script.
Rocky Linux 8.4 stable version has been released!
After RedHat shifted its focus from CentOS 8 to CentOS Stream 8, Mr.Gregory Kurtzer, the original founder of CentOS, has started to develop another rebuild of RHEL, named Rocky Linux.
Rocky Linux is a community enterprise operating system designed to be 100% compatible with RedHat Enterprise Linux.
After months of testing and development, the Rocky Enterprise Software Foundation (RESF) has released the first stable version of Rocky Linux.
As of writing this guide, Rocky Linux 8.4 is available for x86_64 bit and ARM64 (aarch64) architectures. Currently, Rocky Linux minimal ISO, DVD, torrent files are available for download in the official download page.
Rocky Linux container images are available in the following links:
Download the images of your choice and install Rocky Linux on your system. If you already have CentOS 8 installed on your system, you can migrate to Rocky Linux 8.4 as described in the following steps.
Migrate to Rocky Linux 8 from CentOS 8 using migrate2rocky script
Rocky Linux dev team has created a migration script called migrate2rocky to easily convert an existing CentOS 8 system to Rocky Linux 8.
A word of caution:
First of all, backup important data from your CentOS system before starting upgrade process. I tested this script in a freshly installed CentOS 8 virtual machine. My VM doesn’t has any data and it is a server edition with minimal installation. It worked just fine without any issues as expected.
Let us now start Rocky Linux migration task!
Step 1: Upgrade the current CentOS 8 Linux system to latest available version:
$ sudo dnf --refresh upgrade
Step 2: Reboot your system:
$ sudo reboot
Step 3: Check if you’re running the CentOS 8 version on your system:
$ cat /etc/redhat-release
CentOS Linux release 8.4.2105
You can also use the following command to display detailed output:
$ cat /etc/os-release
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 4: Download Rocky Linux migration script named migrate2rocky from here.
$ curl -O https://raw.githubusercontent.com/rocky-linux/rocky-tools/main/migrate2rocky/migrate2rocky.sh
Step 5: Make the
migrate2rocky script executable:
$ sudo chmod +x migrate2rocky.sh
Step 6: Finally, migrate to Rocky Linux 8 from CentOS 8 Linux system using command:
$ sudo bash migrate2rocky.sh -r
This will replace CentOS 8 repositories with Rocky Linux repositories, remove CentOS branding, add Rocky Linux GPG keys, and then download, install and upgrade all packages.
Preparing to migrate CentOS Linux 8 to Rocky Linux 8. Determining repository names for CentOS Linux 8..... Found the following repositories which map from CentOS Linux 8 to Rocky Linux 8: CentOS Linux 8 Rocky Linux 8 appstream appstream baseos baseos extras extras Getting system package names for CentOS Linux 8....... Found the following system packages which map from CentOS Linux 8 to Rocky Linux 8: CentOS Linux 8 Rocky Linux 8 centos-backgrounds rocky-backgrounds centos-gpg-keys rocky-gpg-keys centos-logos rocky-logos centos-indexhtml rocky-indexhtml centos-linux-release rocky-release centos-linux-repos rocky-repos [...]
This will take a few minutes to hours depending upon the Internet speed and the hard disk type. If you have SSD with fast Internet connection, it will probably take 5-10 minutes.
Step 7: Upon successful Rocky Linux migration, you should see the following output:
[...] Complete! Done, please reboot your system. A log of this installation can be found at /var/log/migrate2rocky.log
Step 8: Run the following command to synchronize installed packages to the latest available versions.
$ sudo dnf distro-sync -y
Step 9: Finally, reboot your system:
$ sudo reboot
Step 10: Login to the Rocky Linux system and update the hostname and username that matches to Rocky Linux:
$ sudo hostnamectl set-hostname rocky8
Log out and log back in to apply the changes.
Here is my Rocky Linux 8.4 system running in KVM after successfully migrated from CentOS 8.4.
That’s it. Rocky Linux 8.4 enterprise Linux operating system is ready to use.