Article

Upgrading from RockyLinux 8 or AlmaLinux 8 to AlmaLinux 9

As technology evolves, so do operating systems. Upgrading your system is crucial to ensure you benefit from the latest features, improved security,...

Written by admin · 2 min read >
Alma 8 to Alma 9

As technology evolves, so do operating systems. Upgrading your system is crucial to ensure you benefit from the latest features, improved security, and better performance. In this article, we’ll explore the importance of upgrading from RockyLinux 8 or AlmaLinux 8 to AlmaLinux 9 and provide a step-by-step guide to help you through the process.

Steps to Upgrade from RockyLinux 8 or AlmaLinux 8 to AlmaLinux 9

Before we initiate the upgrade process, it is important to backup your data to ensure that you have a copy in case anything goes wrong during the upgrade. Once you have backed up your data, you can proceed with the upgrade process with peace of mind.

Step 1: Update your current system.

To successfully complete the upgrade, it is essential to have a fully updated system. Therefore, ensure that you install the latest updates and then restart your device.

sudo yum update -y
sudo reboot

Step 2: Install upgrade package.

In order to access the latest version, it is necessary to install the upgrade package. Install the “elevate-release” package using the project repository and GPG key.

sudo yum install -y http://repo.almalinux.org/elevate/elevate-release-latest-el$(rpm --eval %rhel).noarch.rpm

Step 3: Installing leapp package and migrating data.

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

The above code is used to migrate data from AlmaLinux 8 to AlmaLinux 9. If you are looking to migrate from RockyLinux 8 to Almalinux 9 then replace “leapp-data-almalinux” to “leapp-data-rocky“. So, the command will be, sudo yum install -y leapp-upgrade leapp-data-rocky

Step 4: Run Pre-Upgrade Checks.

Run preupgrade checks to ensure that there are no compatibility issues or potential problems with the migration process. This step helps identify any system configurations or installed packages that might cause issues during the upgrade. Once the pre-upgrade checks have been completed successfully, you can proceed with confidence to the next step.

sudo leapp preupgrade

The Leapp utility generates a unique file, located at /var/log/leapp/leapp-report.txt, which provides insight into potential issues and offers suggested solutions. In certain configurations, Leapp generates /var/log/leapp/answerfile with true/false questions. Leapp utility requires answers to all these questions in order to proceed with the upgrade.

Common issues during pre-upgarde check:

In certain cases, it generates the issue during pre-upgrade check due to permission of root login, security or due to some mods. You can review the /var/log/leapp/leapp-report.txt file for details. The most common issues can be resolved by applying the following fixes.

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

Ensure that you enable root login if you are not using any other user login for your OS. It is often observed that server access is restricted after an upgrade because root access was not permitted to the system. Please run the command mentioned echo PermitRootLogin yes | sudo tee -a /etc/ssh/sshd_config to enable root login to the system.

Besides this, some of the most common fixes for RHEL8-based systems can be achieved by following commands:

sudo sed -i "s/^AllowZoneDrifting=.*/AllowZoneDrifting=no/" /etc/firewalld/firewalld.conf
sudo leapp answer --section check_vdo.no_vdo_devices=True

Step 5: Run OS upgrade process

Make sure that all the preupgrade indicators are fixed, later you can proceed with the actual upgrade process.

sudo leapp upgrade

Once the upgrade process is completed successfully, you can reboot the system.

sudo reboot

Please allow some time for the system to reboot. This time the system may take a little longer to boot as it runs some update process during the first boot for completing the OS upgrade.

Step 6: Post operating system upgrade (Optional)

After reboot, you can login to the system and check how the migration process went. Verify that the current OS is the one you need. Check logs and packages left from previous OS versions; consider removing them or updating them manually.

cat /etc/redhat-release
cat /etc/os-release
rpm -qa | grep el7 # for 7 to 8 migration
rpm -qa | grep el8 # for 8 to 9 migration
cat /var/log/leapp/leapp-report.txt
cat /var/log/leapp/leapp-upgrade.log

Using all the above mentioned steps you can successfully upgrade your operating system to AlmaLinux 9. If you want more help or assistance, do check out our managed server solution, where we manage the server for you considering 360 degree aspects of upgrade, monitoring and security of your server.

Leave a Reply

Your email address will not be published. Required fields are marked *