Search

How to Transition to AlmaLinux 9 from AlmaLinux 8

AlmaLinux has gained popularity among users looking for a stable and secure Linux distribution, particularly after the end of life of CentOS 7.

For many individuals and organizations seeking reliable alternatives with long-term support and compatibility within the Enterprise Linux ecosystem, AlmaLinux stands out as a significant player.

If you have already shifted your CentOS 7 system to AlmaLinux 8 and are now eyeing the upgrade to the latest AlmaLinux 9, this guide is here to assist you through the entire process.

From initial checks and backup strategies to the actual upgrade steps, this guide covers it all. Let’s dive in.

Step 1: Secure Your Data with a System Backup

Before you embark on the upgrade journey, it’s crucial to ensure that all your essential data is safely backed up. We highly recommend creating a full system backup to restore your system to its previous state in case of any mishaps.

If you prefer an alternative approach, you can utilize a command like the one demonstrated below to archive critical directories and their contents in a tar.gz archive.

sudo tar czf /alma8-data.tar.gz       --exclude=/alma8-data.tar.gz       --exclude=/dev       --exclude=/mnt       --exclude=/proc       --exclude=/sys       --exclude=/tmp       --exclude=/media       --exclude=/lost+found       /Code language: Bash (bash)

Feel free to customize the “–exclude=” parameters as needed. Finally, the created backup file should ideally be transferred to a separate computer or drive using a command like SCP.

Step 2: Ensure All Software is Updated

Prior to initiating the system upgrade, it’s essential to confirm that your Alma 8 setup is fully up to date. Open the terminal and run the following command to update your system:

sudo dnf updateCode language: Bash (bash)

After ensuring all updates are installed, your system should be fully updated, with no pending package updates. Here’s a snapshot of our AlmaLinux 8 system before we begin the migration to AlmaLinux 9.

Step 3: Execute the Migration to AlmaLinux 9

Before commencing, let’s take a moment to appreciate the migration tool that will streamline the process: ELevate. Developed by AlmaLinux, ELevate supports migrations between major versions of Red Hat Enterprise Linux forks, offering users the flexibility to transition from CentOS 7.x to 8.x versions of RHEL derivatives or upgrade from 8.x to 9.x versions seamlessly.

Step 3.1: Installation of the ELevate Tool

The first step involves installing the “elevate-release” package on your current Alma 8 system to kickstart the upgrade process.

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

Step 3.2: Installation of Leapp and Migration Data

The migration procedure relies on Red Hat’s Leapp and the migration metadata set from the community, facilitating the seamless transition between major RHEL versions. Let’s install these vital components:

sudo yum install -y leapp-upgrade leapp-data-almalinuxCode language: Bash (bash)

Step 3.3: Adjustments for SELinux and Firewalld Settings

As a precautionary measure against potential issues with SELinux and Firewalld settings during the upgrade process, specific adjustments are necessary.

Edit the “/etc/sysconfig/selinux” file to disable SELinux as follows:

sudo vim /etc/sysconfig/selinuxCode language: Bash (bash)

Then, modify the “AllowZoneDrifting” setting in “/etc/firewalld/firewalld.conf” to “no” to ensure Firewalld functions as intended.

sudo vim /etc/firewalld/firewalld.confCode language: Bash (bash)

Reboot your AlmaLinux 8 system post-adjustments to enact the changes effectively.

sudo rebootCode language: Bash (bash)

Step 3.4: Initiate Pre-Upgrade Checks

Commence the pre-upgrade check with the command below to confirm server compatibility and identify any potential issues before proceeding with the upgrade:

sudo leapp preupgradeCode language: Bash (bash)

Upon completion, you should receive a report offering insights into any identified issues and their corresponding solutions, with green indicating all is well.

If the check encounters errors, execute the following trio of commands as per the official documentation to address common issues before rerunning “sudo leapp preupgrade”:

sudo rmmod pata_acpi echo PermitRootLogin yes | sudo tee -a /etc/ssh/sshd_config sudo leapp answer --section remove_pam_pkcs11_module_check.confirm=TrueCode language: Bash (bash)

Step 3.5: Initiate the Actual Migration from AlmaLinux 8 to 9

Execute the following command to commence the migration process from AlmaLinux 8 to AlmaLinux 9:

sudo leapp upgradeCode language: Bash (bash)

Following the download and storage of necessary upgrade packages in a temporary directory, the actual upgrade will progress in the subsequent step.

Be prepared for a wait during the upgrade process, depending on your internet speed. Consider grabbing a coffee while the transition unfolds.

Post-upgrade process completion, a system reboot will be prompted. Embrace this final step of the process!

sudo rebootCode language: Bash (bash)

Given the extensive background upgrades involved, the process may require some time. Exercise patience if monitoring the changes via terminal access is momentarily inaccessible.

Depending on the package upgrades and hardware capabilities, the process duration can vary from a few minutes to half an hour.

Upon the final reboot, the GRUB bootloader will present itself, indicating a successful upgrade to AlmaLinux 9 with the Linux kernel 5.14 (Seafom Ocelot) now in place.

Congratulations on the seamless transition from AlmaLinux 8 to AlmaLinux 9!

Step 4: Verify the OS Version (Optional)

To confirm the successful upgrade, a peek into the OS version with the following command is always reassuring:

cat /etc/redhat-releaseCode language: Bash (bash)

As seen, the system upgrade has been executed flawlessly, with the OS now reflecting AlmaLinux 9.4, the latest available version at the time of writing.

In Conclusion

Transitioning from AlmaLinux 8 to 9 is a straightforward process, and by following this detailed guide, you can ensure a successful migration. Congratulations on enhancing the robustness and security of your system, making it well-equipped to meet present and future demands.

This guide has been crafted for simplicity. We appreciate your feedback in the comments section below. For further details, refer to Alma’s official documentation.

Share it

🤞 Don’t miss these tips!

Solverwp- WordPress Theme and Plugin