Greetings. In today’s article, we will migrate Rocky Linux 9 to AlmaLinux 9.
AlmaLinux is an Open Source, community-owned free enterprise Linux distribution. It steps in for the discontinued CentOS Linux which came to its EOL on 31st December 2021. AlmaLinux is a standalone and completely free OS. It is production-ready and fully supported by the AlmaLinux OS Foundation members being the community-based OS.
Switching from CentOS and other RHEL distros is a straightforward process as we will outline below.
Alma from AlmaLinux is a Spanish word meaning soul. Passion is what drives the community to better AlmaLinux daily. Hence the community is the soul of Linux.
Before migrating to AlmaLinux ensure that you have a backup of your Rocky Linux 9 or a snapshot of the system by following the administration best practices. You could also try the migration process on a VM before doing it live on your system to see how it works. Ensure that you have a superuser account to run the commands below.
Let’s get started.
1. Update Rocky Linux System
Refresh the system packages.
sudo dnf update -y
After the system update, reboot your system to run with the new kernel updates.
sudo reboot now
After reboot, check the OS release.
cat /etc/os-release
Output:
NAME="Rocky Linux"
VERSION="9.5 (Blue Onyx)"
ID="rocky"
ID_LIKE="rhel centos fedora"
VERSION_ID="9.5"
PLATFORM_ID="platform:el9"
PRETTY_NAME="Rocky Linux 9.5 (Blue Onyx)"
ANSI_COLOR="0;32"
LOGO="fedora-logo-icon"
CPE_NAME="cpe:/o:rocky:rocky:9::baseos"
HOME_URL="https://rockylinux.org/"
VENDOR_NAME="RESF"
VENDOR_URL="https://resf.org/"
BUG_REPORT_URL="https://bugs.rockylinux.org/"
SUPPORT_END="2032-05-31"
ROCKY_SUPPORT_PRODUCT="Rocky-Linux-9"
ROCKY_SUPPORT_PRODUCT_VERSION="9.5"
REDHAT_SUPPORT_PRODUCT="Rocky Linux"
REDHAT_SUPPORT_PRODUCT_VERSION="9.5"
2. Download the AlmaLinux deploy.sh script
Download the almalinux-deploy.sh script from Github using wget or curl. This script helps in the conversion process.
sudo yum install wget vim -y
sudo wget https://raw.githubusercontent.com/AlmaLinux/almalinux-deploy/master/almalinux-deploy.sh
To see the contents of the script.
vim almalinux-deploy.sh
3. Make the script executable
To make the script executable, use the chmod command
sudo chmod +x almalinux-deploy.sh
Confirm change of permissions by ls command:
ls -l almalinux-deploy.sh
4. Migrate Rocky Linux 9 To AlmaLinux 9
To migrate Rocky Linux 9 to AlmaLinux 9, execute the almalinux-deploy.sh script.
sudo ./almalinux-deploy.sh
Migration from Rocky Linux 9 to AlmaLinux 9 will take time depending on your system resources like your memory capacity, your system processor, and your internet speed. So prepare your coffee and enjoy.
Once the migration is complete, you should see such an output:
Congratulations, you have successfully migrated your Rocky Linux 9 system to AlmaLinux 9.
5. Post Installation steps
Carry the following steps to ascertain that you have migrated from Rocky Linux to AlmaLinux 9.
Reboot the system
Run the commands below to reboot the system.
sudo reboot now
Verify AlmaLinux version migrated to.
Once the system has been rebooted. Use the commands below to check OS release details.
$ cat /etc/redhat-release
AlmaLinux release 9.5 (Teal Serval)
$ cat /etc/os-release
NAME="AlmaLinux"
VERSION="9.5 (Teal Serval)"
ID="almalinux"
ID_LIKE="rhel centos fedora"
VERSION_ID="9.5"
PLATFORM_ID="platform:el9"
PRETTY_NAME="AlmaLinux 9.5 (Teal Serval)"
ANSI_COLOR="0;34"
LOGO="fedora-logo-icon"
CPE_NAME="cpe:/o:almalinux:almalinux:9::baseos"
HOME_URL="https://almalinux.org/"
DOCUMENTATION_URL="https://wiki.almalinux.org/"
BUG_REPORT_URL="https://bugs.almalinux.org/"
ALMALINUX_MANTISBT_PROJECT="AlmaLinux-9"
ALMALINUX_MANTISBT_PROJECT_VERSION="9.5"
REDHAT_SUPPORT_PRODUCT="AlmaLinux"
REDHAT_SUPPORT_PRODUCT_VERSION="9.5"
SUPPORT_END=2032-06-01
Check that the system boots AlmaLinux Kernel by default.
Run the command :
$ sudo grubby --info DEFAULT | grep AlmaLinux
title="AlmaLinux (5.14.0-503.22.1.el9_5.x86_64) 9.5 (Teal Serval)"
Change Hostname
Use the hostnamectl command to set system hostname
sudo hostnamectl set-hostname alma-linux-9.localdomain
Reboot the system
Reboot the system to start using the new operating system.
sudo reboot now
New prompt:
[cloudspinx@Alma-Linux-9 ~]$
Conclusion
That’s about it. We hope you have followed and managed to migrate to AlmaLinux. The steps above are also applicable when migrating from CentOS 7 and CentOS 8 to AlmaLinux. Thank you and that coffee is what keeps us motivated. For any comment or question, please write a comment below.
Further guides: