×


Migrate from CentOS 7.x versions to RHEL 8.x using Elevate Project

Upgrading from CentOS 7.x to RHEL 8.x and other RHEL 8.x distributions such as AlmaLinux 8.x, Rocky 8.x , and Oracle 8.x was not possible until a few weeks ago. This is thanks to the AlmaLinux team for releasing Elevate – an opensource project that enables seamless migration from CentOS 7.x to any major RHEL 8.x versions.

Note that Elevate only supports CentOS repositories and not other external repositories.

Here at Ibmi Media, as part of our Server Management Services, we regularly help our Customers to perform related Server Migration queries.

In this context, we shall look into how you can migrate from CentOS 7 to AlmaLinux 8.x via the Elevate project.


Steps to migrate from CentOS 7 to AlmaLinux 8.x

1. Perform system update

It is important to perform a complete system upgrade of your system's apt cache. So access the terminal of your CentOS 7 system and run the below command to update the system:

$ sudo yum update -y

Once complete, reboot the system:

$ sudo reboot

Verify that your system is the latest release with the below command:

$ cat /etc/redhat-release


2. Install Elevate RPM package on the system

Now, you need to download the elevate-release package by running the below command:

$ sudo yum install -y http://repo.almalinux.org/elevate/elevate-release-latest-el7.noarch.rpm

Once the elevate-release package has been installed, you need to install the Leapp package for the operating system you wish to migrate to. Possible leapp packages are:

  • leapp-data-rocky
  • leapp-data-almalinux
  • leapp-data-oraclelinux
  • leapp-data-centos


Since we are upgrading to AlmaLinux, we will run the below command:

$ sudo yum install leapp-upgrade leapp-data-almalinux -y

Once your preferred leapp package is installed alongside other dependencies, then perform a dry run of the Upgrade.


3. Perform a pre-upgrade check

Before performing the upgrade, it’s a prudent idea to simulate the upgrade and confirm if it will be a success or not. At the end of the simulation, a pre-upgrade report will be generated and in case of any issues, a set of recommendations will be provided to fix the problem. The report is logged in the /var/log/leapp/leapp-report.txt log file.

So, to initiate the pre-upgrade check, run the below command:

$ sudo leapp preupgrade

As expected, there might be some errors encountered during the simulation. To get the cause and the resolutions to the issues, examine the /var/log/leapp/answerfile file

Usually, running the commands below will fix all the issues hindering the upgrade:

$ sudo rmmod pata_acpi

These are mandatory, so execute them one after the other.

$ echo PermitRootLogin yes | sudo tee -a /etc/ssh/sshd_config
$ sudo leapp answer --section remove_pam_pkcs11_module_check.confirm=True

Now, run the simulation once more to confirm that all the issues have been resolved:

$ sudo leapp preupgrade


4. Migrate from CentOS 7 to AlmaLinux

Finally, perform the migration from CentOS 7 to AlmaLinux 8 by running the command shown. This might take a while depending on the packages installed and your internet connection speed:

$ sudo leapp upgrade

Finally, reboot the system to complete the switch to AlmaLinux:

$ sudo reboot

Boot using the first GRUB menu entry labeled Elevate-Upgrade-Initramfs.

Thereafter, the upgrade process will continue for another half an hour or so. The system will , once again, reboot. This time, you will be presented with the AlmaLinux GRUB menu options.

Once you have logged in, confirm that the system has switched to AlmaLinux 8:

$ cat /etc/redhat-release


[Need help in Migrating Linux Server and Website Migration support ? Contact us now. ]


Conclusion

This article covers the complete process of migrating from CentOS 7.x to AlmaLinux using the Elevate upgrade packages. In fact, You can upgrade to other RHEL 8.x distros using different leapp migration data packages.