Migrate CentOS 7 to AlmaLinux 8/Rocky 8/CentOS 8 using ELevate

Share on:

Table of Contents

The ELevate project has got you covered. It supports migrations between major RHEL-derivatives. The leapp utility together with other patches are used to perform the migration/upgrade. The leapp utility uses several configurations, among them is the pes-events.json, a package evolution data file.PES(Package Evolution Service) allows collaboration and data improvements. One can therefore customize, submit and download new data sets.

Supported migrations are:

  • CentOS 7 to AlmaLinux 8
  • CentOS 7 to EuroLinux 8
  • CentOS 7 to Rocky Linux 8
  • CentOS 7 to Oracle Linux 8
  • CentOS 7 to CentOS Stream 8

The ELevate project only supports the CentOS repositories. Other external repositories aren’t supported.

In this guide, we will use ELevate to migrate CentOS 7 to AlmaLinux 8/Rocky 8/CentOS 8.

1. Update the System

This guide requires one to have a CentOS 7 system with all packages updated to their latest available versions. SO we will begin by updating the system and rebooting it:

sudo yum update -y
sudo reboot

2. Install the ELevate Package on CentOS 7

Once the system has been updated, install the elevate-release package that provides all the required tools for migration.

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

Dependency Tree:

Dependencies Resolved

 Package   Arch   Version   Repository                          Size
           noarch 1.0-1.el7 /elevate-release-latest-el7.noarch 3.4 k

Transaction Summary
Install  1 Package

Total size: 3.4 k
Installed size: 3.4 k
Downloading packages:
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
  Installing : elevate-release-1.0-1.el7.noarch                  1/1 
  Verifying  : elevate-release-1.0-1.el7.noarch                  1/1 

  elevate-release.noarch 0:1.0-1.el7                                 


Once added, install theleapp package and migration data for the OS to upgrade to. In this guide we have the below options:

  • leapp-data-almalinux – from CentOS 7 to AlmaLinux 8
  • leapp-data-centos – from CentOS 7 to CentOS 8
  • leapp-data-rocky – from CentOS 7 to Rocky Linux 8

Proceed and install the leapp packages:

  • For AlmaLinux 8
sudo yum install -y leapp-upgrade leapp-data-almalinux
  • For CentOS 8
sudo yum install -y leapp-upgrade leapp-data-centos
  • For Rocky Linux 8
sudo yum install -y leapp-upgrade leapp-data-rocky -

3. Perform the Pre upgrade Check.

When the Pre upgrade check is performed, the leapputility creates a file /var/log/leapp/leapp-report.txt, containing all possible problems and their recommended solutions. Remember, no RPM packages are installed at this stage.

First, make the desired settings:

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

Proceed with the check.

sudo leapp preupgrade

Sample Output:

==> Processing phase `configuration_phase`
====> * ipu_workflow_config
        IPU workflow config actor
==> Processing phase `FactsCollection`
====> * authselect_scanner
        Detect what authselect configuration should be suggested to administrator.
====> * pci_devices_scanner
        Provides data about existing PCI Devices.
====> * scanmemory
        Scan Memory of the machine.
====> * sssd_facts
        Check SSSD configuration for changes in RHEL8 and report them in model.
====> * scan_custom_repofile
        Scan the custom /etc/leapp/files/leapp_upgrade_repositories.repo repo file.


4. Migrate CentOS 7 to AlmaLinux 8/Rocky Linux 8/CentOS 8

After the precheck has been done and everything is okay, proceed and perform the upgrade/migration;

sudo leapp upgrade

Sample output:

Once complete, reboot your system for the changes to apply.

sudo reboot

A GRUB called ELevate-Upgrade-Initramfsappears. The system automatically boots into it.

The system upgrade will occur as shown.

After a reboot, log in and verify if the current OS is the one you need.

cat /etc/redhat-release
cat /etc/os-release
rpm -qa | grep centos
rpm -qa | grep el7