How to convert Centos 8 Linux to Alma Linux 8

CentOS Linux 8 was discontinued at the end of 2021. Check out more information about that in this in this article CentOS Linux 8 will end in 2021 and shifts focus to CentOS Stream.

The team at CentOS decided to shift focus to CentOS stream, an upstream version of RHEL. CentOS stream places itself between Fedora Linux and RHEL. It is not 100% RHEL clone but ahead of RHEL development. Other distros that are 100% compatible with RHEL 8 have come up including Rocky Linux and Alma Linux.

In this guide, we will learn how to convert an existing CentOS 8 distribution into Alma Linux without reinstalling a new operating system. The Alma Linux team provides an automated script for this purpose. An in-place upgrade does not require formatting of hard disk and due to that fact all settings, programs, and files on your current CentOS 8 system will be preserved.

Related Content:

# Table of Content

  1. Ensure your system is up to date
  2. Backup your CentOS Linux system
  3. Install CentOS Stream package
  4. Download the Official AlmaLinux Migration Script

# 1. Ensure your system is up to date

Ensure that the server is updated using this command:

sudo dnf update -y

Let us also verify CentOS Linux 8 version using this command:

$ cat /etc/os-release
NAME="CentOS Linux"
ID_LIKE="rhel fedora"
PRETTY_NAME="CentOS Linux 8"

# 2. Backup your CentOS 8 system

It is a good practice to ensure periodic updates on your system. If you have application data in the system ensure that it is backed up. Please also make OS snapshot to revert back when something goes wrong. Always keep verified backups.

# 3. Download the Official AlmaLinux Migration Script

The AlmaLinux team provides a migration tool that will help in the process. The tool is found in this github repository.

Download the script:

curl -O

Next, make the script executable:

chmod +x

# 4. Migrate from CentOS 8 to AlmaLinux 8

Finally, with the script available locally, run it to to start migration process:

sudo bash

After the migration script performs a few initial checks, it will begin the process of upgrading certain packages in order to synchronize the system with the current AlmaLinux 8 release.

Be patient since the upgrade process could take some time. Upon completion you should see success message

Run dnf distro-sync -y                                                OK
Restoring of alternatives is done                                     OK
Generating grub configuration file ...
All Secure Boot related packages which were not released by AlmaLinux are reinstalledOK

Migration to AlmaLinux is completed

Reboot the system to apply kernel changes

sudo reboot

# 5. Check AlmaLinux Version to Validate Migration

Just to confirm that you have successfully migrated, check the OS version:

$ cat /etc/os-release
VERSION="8.5 (Arctic Sphynx)"
ID_LIKE="rhel centos fedora"
PRETTY_NAME="AlmaLinux 8.5 (Arctic Sphynx)"


That’s all. Congratulations! You have successfully converted CentOS 8 to AlmaLinux 8.

Check that the system boots AlmaLinux kernel by default:

$ sudo grubby --info DEFAULT | grep AlmaLinux
title="AlmaLinux (4.18.0-348.12.2.el8_5.x86_64) 8.5 (Arctic Sphynx)"

# Conclusion

Please note that the script will only convert CentOS 8 version to AlmaLinux 8. 

comments powered by Disqus
Citizix Ltd
Built with Hugo
Theme Stack designed by Jimmy