Good news, Enterprise Linux users! The much anticipated AlmaLinux migration tool is released!! I guess we don't need to rely on the unofficial AlmaLinux migration method anymore. The official script named Almalinux-deploy that helps you to migrate to AlmaLinux from CentOS 8 is out. It is time to convert your CentOS machines (hopefully other Enterprise Linux systems) to AlmaLinux. The almalinux-deploy script is written in Bash and the source code is available in GitHub.
A word of caution:
As usual, backup important data from your CentOS system before starting upgrade process. Like AlmaLinux itself, the Almalinux-deploy script is also currently under development. So you might encounter with bugs. Please refrain from using it in production servers until the final, stable version is available. Better test this script in your test systems and then decide whether to try it on production or not. 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.
Please note that the almalinux-deploy script is only to convert the latest CentOS 8.3 version to AlmaLinux 8.3. If you are running older versions like CentOS 7.x or 6.x, this script will not work. First, you need to find a way to upgrade to CentOS 8.x and then migrate to AlmaLinux 8.x. As far as I know, there is no official way to upgrade CentOS 6.x/7.x to CentOS 8.x. The only way is reinstallation. It is a shame that there is no official method to migrate between major CentOS versions.
Now let us go ahead and convert from CentOS to AlmaLinux with almalinux-deploy script.
Migrate to AlmaLinux from CentOS 8 using almalinux-deploy script
Update your CentOS system to latest available version as root
or sudo
user:
$ sudo dnf update
Reboot your system to apply the updates:
$ sudo reboot
Let us check the current CentOS 8 version:
$ cat /etc/redhat-release
CentOS Linux release 8.3.2011
Yes, it is the latest version!
Now, download the almalinux-deploy script using command:
$ curl -O https://raw.githubusercontent.com/AlmaLinux/almalinux-deploy/master/almalinux-deploy.sh
Go to the location where you downloaded the script and run the script to start Almalinux migration:
$ sudo bash almalinux-deploy.sh
This command will install some new packages, upgrade and downgrade some existing packages, reinstall a few packages and uninstall some packages. This will take a couple minutes depending upon the Internet connection speed and the total number of installed packages in your CentOS system.
Sample output:
Check root privileges OK Check centos-8.x86_64 is supported OK Download RPM-GPG-KEY-AlmaLinux OK Import RPM-GPG-KEY-AlmaLinux to RPM DB OK Download almalinux-release package OK Verify almalinux-release package OK Remove centos-linux-release package OK Remove centos-gpg-keys package OK Remove centos-linux-repos package OK Verifying… ################################# [100%] Preparing… ################################# [100%] Updating / installing… 1:almalinux-release-8.3-2.el8 ################################# [100%] Install almalinux-release package OK AlmaLinux 8.3 - BaseOS 533 kB/s | 2.6 MB 00:05 AlmaLinux 8.3 - AppStream 430 kB/s | 6.5 MB 00:15 AlmaLinux 8.3 - PowerTools 549 kB/s | 1.9 MB 00:03 AlmaLinux 8.3 - Extras 630 B/s | 1.2 kB 00:02 Dependencies resolved. Package Architecture Version Repository Size Installing: kernel x86_64 4.18.0-240.el8 baseos 4.3 M kernel-core x86_64 4.18.0-240.el8 baseos 30 M kernel-modules x86_64 4.18.0-240.el8 baseos 26 M Upgrading: dnf-plugin-spacewalk noarch 2.8.5-11.module_el8.3.0+2053+3ddf2832 baseos 22 k grub2-common noarch 1:2.02-90.el8.alma baseos 884 k grub2-pc x86_64 1:2.02-90.el8.alma baseos 39 k grub2-pc-modules noarch 1:2.02-90.el8.alma baseos 864 k grub2-tools x86_64 1:2.02-90.el8.alma baseos 2.0 M grub2-tools-efi x86_64 1:2.02-90.el8.alma baseos 469 k grub2-tools-extra x86_64 1:2.02-90.el8.alma baseos 1.1 M grub2-tools-minimal x86_64 1:2.02-90.el8.alma baseos 204 k libgcc x86_64 8.3.1-5.1.el8.alma baseos 77 k libgomp x86_64 8.3.1-5.1.el8.alma baseos 203 k libreport-filesystem x86_64 2.9.5-15.el8.alma baseos 20 k libstdc++ x86_64 8.3.1-5.1.el8.alma baseos 450 k python3-dnf-plugin-spacewalk noarch 2.8.5-11.module_el8.3.0+2053+3ddf2832 baseos 29 k python3-rhn-client-tools x86_64 2.8.16-13.module_el8.3.0+2053+3ddf2832 baseos 107 k python3-rhnlib noarch 2.8.6-8.module_el8.3.0+2053+3ddf2832 baseos 76 k rhn-client-tools x86_64 2.8.16-13.module_el8.3.0+2053+3ddf2832 baseos 384 k tuned noarch 2.14.0-3.el8_3.1.alma baseos 291 k [...]
If the migration is successful, you will see the following message:
[...] Complete! Run dnf distro-sync -y OK Migration to AlmaLinux is completed, please reboot the system
Reboot your system:
$ sudo reboot
Now your system will boot into the newly migrated AlmaLinux system:
Login to your AlmaLinux system and check its version:
$ cat /etc/redhat-release
AlmaLinux release 8.3 Beta (Purple Manul)
Congratulations! AlmaLinux migration is successful!!
You could have used the word "centos" in hostname and username. Simply change them wherever necessary to reflect AlmaLinux.
I am going to update the hostname:
$ sudo hostnamectl set-hostname alma8
Replace alma8
with your preferred hostname in the above command.
Log out and log back in to verify if the changes have been made:
$ hostname
alma8
Yes, the changes are updated!
Check that the system boots AlmaLinux kernel by default using command:
$ sudo grubby --info DEFAULT | grep AlmaLinux
Sample output:
title="AlmaLinux (4.18.0-240.el8.x86_64) 8"
All good! Start using your AlmaLinux!!
Resource:
Related read: