How to Migrate from CentOS 8 to AlmaLinux 8.5

In our earlier guide, we walked you through the installation of AlmaLinux. If you have CentOS 8 installed, an automated migration script is available to help you migrate seamlessly to the latest version of AlmaLinux 8.5 without uninstalling and performing a fresh installation.

There is also a similar script from Oracle Linux, that helps you to migrate from CentOS to Oracle Linux.

[ You might also like: Best CentOS Alternative Distributions (Desktop and Server) ]

In this guide, we will walk you through the migration of CentOS 8 to AlmaLinux 8.5 using an automated migration script that is available on Github.

A Word of Caution

Even though the migration in our case was smooth and successful, we highly encourage you to perform a backup of all your files in case something goes wrong. As the adage goes, better safe than sorry, and ideally you want to be on the safe side in case of any eventuality.

Prerequisites

Before getting started, ensure that you are running at least CentOS 8.3. If you are running any lower version, you will encounter an error when running the migration script.

Here’s a perfect example of what we initially encountered when trying to migrate using CentOS 8.0.

CentOS 8 Migrate to AlmaLinux
CentOS 8 Migrate to AlmaLinux

Moreover, be sure you have at least 5GB of free disk space on your hard drive to handle the upgrade process since it involves downloading & reinstalling files from the internet.

Finally, a fast and stable internet connection will certainly help in accelerating the migration to AlmaLinux.

Without much further ado, let’s roll our sleeves and get started with the migration.

Step 1: Download AlmaLinux Migration Script

To start off, launch your terminal and download the almalinux-deploy.sh script from the AlmaLinux Github page using the curl command as follows.

$ curl -O https://raw.githubusercontent.com/AlmaLinux/almalinux-deploy/master/almalinux-deploy.sh
Download AlmaLinux Migration Script
Download AlmaLinux Migration Script

Once downloaded, assign execute permissions to the migration script using the chmod command as follows.

$ chmod +x  almalinux-deploy.sh

Step 2: Migrate from CentOS 8 to AlmaLinux 8.5

Now run the almalinux-deploy.sh script as follows to start the migration to AlmaLinux.

$ sudo bash almalinux-deploy.sh
Run AlmaLinux Migration Script
Run AlmaLinux Migration Script

The script performs a couple of tasks. First, it runs a few system checks. It then goes ahead to uninstall, reinstall, and upgrade some packages to synchronize them with the latest release of AlmaLinux, which at this time is AlmaLinux 8.5.

This process takes quite a while – roughly 2 hours in our case – and it’s an ideal moment to do some grocery shopping or indulge in some video games.

Migrating CentOS 8 to AlmaLinux
Migrating CentOS 8 to AlmaLinux

When the migration is complete, you will get the notification that the migration was successful as indicated below.

Migration to AlmaLinux Completes
Migration to AlmaLinux Completes

Finally, reboot the system to load the latest AlmaLinux OS.

$ sudo reboot

For a moment, you will see a black screen with the AlmaLinux logo at the bottom as shown.

Booting AlmaLinux
Booting AlmaLinux

Then shortly after, the grub menu will appear with the AlmaLinux entry highlighted at the very top. Press ENTER and wait for the system to initialize.

AlmaLinux Grub Boot Menu
AlmaLinux Grub Boot Menu

Provide your password and click on ‘Sign In’ to log in to AlmaLinux.

AlmaLinux Login Screen
AlmaLinux Login Screen

This ushers you to the beautiful desktop background of AlmaLinux 8.5.

AlmaLinux Desktop
AlmaLinux Desktop

On command-line, you can verify the version of your system by running:

$ lsb-release -a
$ cat /etc/redhat-release
Check AlmaLinux Release Version
Check AlmaLinux Release Version
Conclusion

In this tutorial, we have taken you through the process of migrating from CentOS 8 to the latest version of AlmaLinux using an automated script. The script pulls new packages online, downgrades, upgrades, and reinstalls some packages to sync with the latest version of AlmaLinux. As you can see, it’s quite a simple process since the bulk of the work is managed by the installation script. Your feedback is very much welcome.

Hey TecMint readers,

Exciting news! Every month, our top blog commenters will have the chance to win fantastic rewards, like free Linux eBooks such as RHCE, RHCSA, LFCS, Learn Linux, and Awk, each worth $20!

Learn more about the contest and stand a chance to win by sharing your thoughts below!

James Kiarie
This is James, a certified Linux administrator and a tech enthusiast who loves keeping in touch with emerging trends in the tech world. When I'm not running commands on the terminal, I'm taking listening to some cool music. taking a casual stroll or watching a nice movie.

Each tutorial at TecMint is created by a team of experienced Linux system administrators so that it meets our high-quality standards.

Join the TecMint Weekly Newsletter (More Than 156,129 Linux Enthusiasts Have Subscribed)
Was this article helpful? Please add a comment or buy me a coffee to show your appreciation.

2 Comments

Leave a Reply
    • At the moment, it’s recommended to shift to AlmaLinux 8.4 since it is a stable and enterprise-grade OS ideal for critical production workloads. Rocky Linux is still a release candidate which is not ideal for production environments. It’s yet to release a stable release. However, you can still test-run it to get a sense of its performance and features.

      Reply

Got Something to Say? Join the Discussion...

Thank you for taking the time to share your thoughts with us. We appreciate your decision to leave a comment and value your contribution to the discussion. It's important to note that we moderate all comments in accordance with our comment policy to ensure a respectful and constructive conversation.

Rest assured that your email address will remain private and will not be published or shared with anyone. We prioritize the privacy and security of our users.