Are you planning to migrate your CentOS 8 Servers to Rocky Linux 8 operating system?. In this short tutorial we describe how you can switch from CentOS 8 to Rocky Linux 8 in an automated version. Rocky Linux is a community enterprise operating system created to be 100% bug-for-bug compatible with Red Hat Enterprise Linux. Now with the RC version of Rocky Linux 8 you can start preparing for the final migration, and playing with its components to understand OS building blocks.
The Rocky Linux development team have created a script that helps users migrate from current CentOS 8 to Rocky Linux 8 in few minutes. Before we initiate the switch we’ll perform upgrade on our CentOS 8 Linux machine. Please note this method works for both Server edition, and Desktop Workstation operating system.
Upgrade your CentOS 8 system:
sudo dnf -y upgrade
Reboot after an upgrade:
Once the system is rebooted, download the bash script:
curl -O https://raw.githubusercontent.com/rocky-linux/rocky-tools/main/migrate2rocky.sh
Make the script executable by running the commands below:
$ chmod +x migrate2rocky.sh
With the script available locally, run it with -r option.
$ sudo bash migrate2rocky.sh -r 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.....
Be patient since the upgrade process could take several minutes. Once it is done you’ll receive a success message similar to one below:
Complete! `.-/+++++++++/-.` `-+++++++++++++++++-` .+++++++++++++++++++++. -+++++++++++++++++++++++. +++++++++++++++/-/+++++++ +++++++++++++/. ./+++++ +++++++++++:. ./+++ +++++++++:` `:/:` .:/ -++++++:` .:+++++:` .+++-` ./+++++++++:` `-` ./+++++++++++- -+++++++++:-.` WARNING: THIS RELEASE IS NOT FOR PRODUCTION. YOU SHOULD NOT UPDATE FROM THIS INSTALLATION. THIS INSTALLATION IS NOT SUPPORTED. Done, please reboot your system. A log of this installation can be found at /var/log/migrate2rocky.log
Perform a hardware reset after migrating from CentOS 8 to Rocky Linux 8 operating system:
sudo systemctl reboot
Wait for the system to boot up then confirm OS details:
$ cat /etc/os-release NAME="Rocky Linux" VERSION="8.3" ID="rocky" ID_LIKE="rhel fedora" VERSION_ID="8.3" PLATFORM_ID="platform:el8" PRETTY_NAME="Rocky Linux 8.3" ANSI_COLOR="0;31" CPE_NAME="cpe:/o:rocky:rocky:8" HOME_URL="https://rockylinux.org/" BUG_REPORT_URL="https://bugs.rockylinux.org/" ROCKY_SUPPORT_PRODUCT="Rocky Linux" ROCKY_SUPPORT_PRODUCT_VERSION="8"
Contents of /etc/redhat-release file should indicate we’re booted to Rocky Linux environment:
$ cat /etc/redhat-release Rocky Linux release 8.3
Kernel related information can also be checked using the uname command:
$ uname -a Linux rocky-linux 4.18.0-240.22.1.el8.x86_64 #1 SMP Mon Apr 12 04:29:16 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux
Here are more articles we have on Rocky Linux operating system: