CentOS Red Hat

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

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

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.

Just so you know, Elevate only supports CentOS repositories and not other external repositories.

In this guide, we focus on the Elevate project and show you how you can migrate from CentOS 7 to AlmaLinux 8.x.

Step 1: Perform a full system update

To get started, access the terminal of your CentOS 7 system and perform a complete system upgrade as follows:

$ sudo yum update -y

Once complete, reboot the system.

$ sudo reboot

Verify that your system is the latest release as shown.

We are now ready to install the Elevate project which will help us migrate from CentOS 7.x to a major RHEL 8.x version.

Step 2: Install Elevate RPM package on CentOS 7

Next up, you need to download the elevate-release package as follows:

$ 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:

  1. leapp-data-rocky
  2. leapp-data-almalinux
  3. leapp-data-oraclelinux
  4. leapp-data-centos

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

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

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

Step 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 command:

$ sudo leapp preupgrade

As expected, there were 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. These are mandatory, so execute them one after the other.

$ sudo rmmod pata_acpi
$ 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.

Step 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

Wonderful! We have succeeded in migrating from CentOS 7.x to AlmaLinux using the Elevate upgrade packages. You can upgrade to other RHEL 8.x distros using different leapp migration data packages.

And that’s it. In case you run into any issues, feel free to provide your feedback and we will sort you out.

Similar Posts