Home Almalinux The Unofficial Way To Migrate To AlmaLinux From CentOS 8

The Unofficial Way To Migrate To AlmaLinux From CentOS 8

By sk
Published: Updated: 6.7K views

AlmaLinux beta is already out! You can read the details in our previous post. I hope you all are exploring the beta version. Some of you might be wondering when will the AlmaLinux developers release a tool to migrate CentOS to AlamaLinux. While there is no news from the AlamaLinux team yet, I came across an unofficial way to migrate to AlmaLinux from CentOS 8 on Reddit.

A Reddit user has provided a simple workaround for the impatient users who wants to migrate to AlmaLinux. I followed the steps and It worked!

I can able to successfully convert CentOS 8 to AlmaLinux beta version using the steps provided below. The migration process was smooth and straightforward!

Please note that this guide will help to migrate CentOS 8.3 version to AlmaLinux 8.3.

If you are using older versions like CentOS 7.x or 6.x, you need to upgrade to CentOS 8.x first 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.

If you're not sure what to do, it is really better to wait for the official script from AlmaLinux developers.

Migrate To AlmaLinux From CentOS 8

A word of caution:

Before migrating to AlmaLinux, backup all important data from your CentOS system. I tested it on a freshly installed CentOS 8 virtual machine. My CentOS VM has no data and it is a minimal installation. I would not recommend this method to migrate production systems. I strongly suggest you to test this method in your testing machine and then decide whether you want to proceed the migration.

Step 1: First, update your CentOS 8 system using command as root or sudo user:

$ sudo dnf update -y

Reboot your CentOS system after the update is completed.

$ sudo reboot

Step 2: Next, remove all CentOS gpg keys, repositories and branding details such as backgrounds, logos etc.

If it is a CentOS desktop system, run the following command to remove all aforementioned details:

$ sudo rpm -e --nodeps centos-backgrounds centos-indexhtml centos-gpg-keys centos-linux-release centos-linux-repos centos-logos

If it is a CentOS server with no GUI, run this command:

$ sudo rpm -e --nodeps centos-gpg-keys centos-linux-release centos-linux-repos

Step 3: Next, download and install AlmaLinux release package:

$ sudo rpm -ivh https://repo.almalinux.org/almalinux/8.3-beta/BaseOS/x86_64/os/Packages/almalinux-release-8.3-2.el8.x86_64.rpm

Sample output:

Retrieving https://repo.almalinux.org/almalinux/8.3-beta/BaseOS/x86_64/os/Packages/almalinux-release-8.3-2.el8.x86_64.rpm
 warning: /var/tmp/rpm-tmp.R3ZO5W: Header V4 RSA/SHA256 Signature, key ID c21ad6ea: NOKEY
 Verifying…                                                            (################################# [100%]
 Preparing…                                                            (################################# [100%]
 Updating / installing…
    1:almalinux-release-8.3-2.el8                                        (################################# [100%
Install AlmaLinux release package
Install AlmaLinux release package

Step 4: Finally, migrate to AlmaLinux from the CentOS 8 system using command:

$ sudo dnf distro-sync -y
Migrate To AlmaLinux From CentOS 8
Migrate To AlmaLinux From CentOS 8

This command will install some new packages, upgrade and downgrade some existing packages, reinstall a few packages and delete some packages.

This will take a while depending upon the Internet connection speed and the total number of installed packages in your CentOS system. Please be patient. For me, It took around 20 minutes.

Step 5: After the migration is completed, reboot your system:

$ sudo reboot

Now your system will boot to the newly migrated AlmaLinux system:

Boot to AlmaLinux
Boot to AlmaLinux

Step 6: Check if the migration process is successful:

$ cat /etc/redhat-release 
AlmaLinux release 8.3 Beta (Purple Manul)
Check AlmaLinux release version
Check AlmaLinux release version

There it is! Congratulations! We have successfully migrated from CentOS 8 to AlmaLinux 8 beta version.

Step 7: Next, change the username and hostname that reflects to AlmaLinux.

I have changed the hostname using the following command:

$ sudo hostnamectl set-hostname alma8

Replace alma8 with your preferred hostname.

Step 8: Log out and log back in to see the changes.

AlmaLinux 8 beta is running in Virtualbox
AlmaLinux 8 beta is running

Perfect!

I hope the procedure to migrate from Oracle Linux 8 to AlmaLinux 8 is same as above. All you need to do is just find and remove the Oracle Linux branding packages, repositories, GPG keys. And then install AlmaLinux release package and start the migration.

Good luck!

Update:

AlmaLinux migration tool is out! Check the following guide to know how to migrate to Almalinux from CentOS 8 using almalinux-deploy script:

Related read:

You May Also Like

3 comments

Martins Almeida February 4, 2021 - 12:16 am

There is no Live ISO available, you have to install this OS if you want to test it. Not good.

Reply
Bob February 8, 2021 - 8:46 pm

I just tested this on a recently created Centos8 minimal server VM that was stock other than having coldfusion11 and nodejs installed on it. I had to remove the nodejs package but otherwise all of the above instructions worked perfectly. Any idea if this would work on CentOS7 minimal? I have another identical machine that was set up just before CentOS8 minimal was available and it would be a huge time saver if I could upgrade that one too. Thanks

Reply
sk February 8, 2021 - 10:08 pm

I think it is possible to migrate CentOS 7.x to AlmaLinux 8.3. First, you need to upgrade CentOS 7 to CentOS 8 and then try to migrate to AlmaLinux. Regards.

Reply

Leave a Comment

* By using this form you agree with the storage and handling of your data by this website.

This site uses Akismet to reduce spam. Learn how your comment data is processed.

This website uses cookies to improve your experience. By using this site, we will assume that you're OK with it. Accept Read More