How to upgrade from AlmaLinux 8 to AlmaLinux 9
AlmaLinux OS is an open-source, community-driven project that intends to fill the gap left by the demise of the CentOS stable release. AlmaLinux OS is a 1:1 binary compatible fork of RHELĀ® 8 guided and built by the community.
Pre-requisites :
-
A Server / VPS running AlmaLinux 8
root
access to the system.
Don't forget to take a backup of your important files and data before proceeding with the upgrade process.
First, Check that your system is up to date by running the following commands, After the update is completed, reboot the server,
yum update -y
reboot
After Rebooting, Verify that it is running the latest AlmaLinux release,
cat /etc/os-release
Output:
[root@vps ~]# cat /etc/os-release
NAME="AlmaLinux"
VERSION="8.8 (Sapphire Caracal)"
ID="almalinux"
ID_LIKE="rhel centos fedora"
VERSION_ID="8.8"
PLATFORM_ID="platform:el8"
PRETTY_NAME="AlmaLinux 8.8 (Sapphire Caracal)"
ANSI_COLOR="0;34"
LOGO="fedora-logo-icon"
CPE_NAME="cpe:/o:almalinux:almalinux:8::baseos"
HOME_URL="https://almalinux.org/"
DOCUMENTATION_URL="https://wiki.almalinux.org/"
BUG_REPORT_URL="https://bugs.almalinux.org/"
ALMALINUX_MANTISBT_PROJECT="AlmaLinux-8"
ALMALINUX_MANTISBT_PROJECT_VERSION="8.8"
REDHAT_SUPPORT_PRODUCT="AlmaLinux"
REDHAT_SUPPORT_PRODUCT_VERSION="8.8"
Install elevate-release package with the project repo and GPG key.
yum install -y http://repo.almalinux.org/elevate/elevate-release-latest-el$(rpm --eval %rhel).noarch.rpm
Output:
[root@vps ~]# yum install -y http://repo.almalinux.org/elevate/elevate-release-latest-el$(rpm --eval %rhel).noarch.rpm
Last metadata expiration check: 0:09:42 ago on Wed 21 Jun 2023 02:40:09 PM UTC.
elevate-release-latest-el8.noarch.rpm 83 kB/s | 9.8 kB 00:00
Dependencies resolved.
================================================================================
Package Architecture Version Repository Size
================================================================================
Installing:
elevate-release noarch 1.0-2.el8 @commandline 9.8 k
Transaction Summary
================================================================================
Install 1 Package
Total size: 9.8 k
Installed size: 3.4 k
Downloading Packages:
Running transaction check
Transaction check succeeded.
Running transaction test
Transaction test succeeded.
Running transaction
Preparing : 1/1
Installing : elevate-release-1.0-2.el8.noarch 1/1
Verifying : elevate-release-1.0-2.el8.noarch 1/1
Installed:
elevate-release-1.0-2.el8.noarch
Complete!
Install leapp packages and migration data for the OS you want to upgrade,
yum install -y leapp-upgrade leapp-data-almalinux
Output:
[root@vps ~]# yum install -y leapp-upgrade leapp-data-almalinux
Last metadata expiration check: 0:07:53 ago on Wed 21 Jun 2023 01:11:24 PM UTC.
Dependencies resolved.
=============================================================================================================================================================
Package Architecture Version Repository Size
=============================================================================================================================================================
Installing:
leapp-data-almalinux noarch 0.2-2.el8 elevate-testing 57 k
leapp-upgrade-el8toel9 noarch 1:0.16.0-6.el8_6.elevate.12 elevate-testing 640 k
Installing dependencies:
checkpolicy x86_64 2.9-1.el8 baseos 347 k
leapp noarch 0.15.1-1.el8 appstream 32 k
leapp-deps noarch 0.15.1-1.el8 appstream 14 k
leapp-upgrade-el8toel9-deps noarch 1:0.16.0-6.el8_6.elevate.12 elevate-testing 28 k
pciutils x86_64 3.7.0-3.el8 baseos 104 k
policycoreutils-python-utils noarch 2.9-24.el8 baseos 253 k
python3-audit x86_64 3.0.7-4.el8 baseos 86 k
python3-chardet noarch 3.0.4-7.el8 baseos 195 k
python3-idna noarch 2.5-5.el8 baseos 97 k
python3-leapp noarch 0.15.1-1.el8 appstream 176 k
python3-libsemanage x86_64 2.9-9.el8_6 baseos 127 k
python3-pip noarch 9.0.3-22.el8 appstream 19 k
python3-policycoreutils noarch 2.9-24.el8 baseos 2.2 M
python3-pysocks noarch 1.6.8-3.el8 baseos 34 k
python3-requests noarch 2.20.0-2.1.el8_1 baseos 122 k
python3-setools x86_64 4.3.0-3.el8 baseos 623 k
python3-setuptools noarch 39.2.0-7.el8 baseos 162 k
python3-urllib3 noarch 1.24.2-5.el8 baseos 176 k
python36 x86_64 3.6.8-38.module_el8.5.0+2569+5c5719bc appstream 18 k
systemd-container x86_64 239-74.el8_8 baseos 771 k
Enabling module streams:
python36 3.6
Disable Zonedrifting by changing yes to no.
vim /etc/firewalld/firewalld.conf
change the following line
AllowZoneDrifting=no
Now, Upgrade AlmaLinux 8 to AlmaLinux 9 now and reboot it,
leapp upgrade
reboot
Output:
[root@vps ~]# leapp upgrade
==> Processing phase `configuration_phase`
====> * ipu_workflow_config
IPU workflow config actor
==> Processing phase `FactsCollection`
====> * system_facts
Provides data about many facts from system.
====> * vendor_repositories_mapping
Scan the vendor repository mapping files and provide the data to other actors.
====> * check_enabled_vendor_repos
Create a list of vendors whose repositories are present on the system and enabled.
====> * vendor_repo_signature_scanner
Produce VendorSignatures messages for the vendor signature files inside the
====> * scan_vendor_repofiles
Load and produce custom repository data from vendor-provided files.
====> * scan_custom_repofile
Scan the custom /etc/leapp/files/leapp_upgrade_repositories.repo repo file.
====> * scan_kernel_cmdline
No documentation has been provided for the scan_kernel_cmdline actor.
====> * load_device_driver_deprecation_data
Loads deprecation data for drivers and devices (PCI & CPU)
====> * scancryptopolicies
Scan information about system wide set crypto policies
====> * get_enabled_modules
Provides data about which module streams are enabled on the source system.
====> * transaction_workarounds
Provides additional RPM transaction tasks based on bundled RPM packages.
====> * udevadm_info
Produces data exported by the "udevadm info" command.
====> * check_detected_devices_and_drivers
Checks whether or not detected devices and drivers are usable on the target system.
====> * checktargetrepos
Check whether target yum repositories are specified.
====> * check_bls_grub_onppc64
Check whether GRUB config is BLS aware on RHEL 8 ppc64le systems
====> * check_etc_releasever
Check releasever info and provide a guidance based on the facts
====> * check_kpatch
Carry over kpatch-dnf and it's config into the container
====> * check_os_release
Check if the current RHEL minor version is supported. If not, inhibit the upgrade process.
====> * check_fips
Inhibit upgrade if FIPS is detected as enabled.
====> * check_grub_core
Check whether we are on legacy (BIOS) system and instruct Leapp to upgrade GRUB core
====> * check_system_arch
Check if system is running at a supported architecture. If no, inhibit the upgrade process.
====> * check_non_mount_boot_s390
Inhibits on s390 when /boot is NOT on a separate partition.
====> * unsupported_upgrade_check
Checks enviroment variables and produces a warning report if the upgrade is unsupported.
====> * red_hat_signed_rpm_check
Check if there are packages not signed by Red Hat in use. If yes, warn user about it.
====> * firewalld_check_allow_zone_drifting
This actor will check if AllowZoneDrifiting=yes in firewalld.conf. This
====> * check_nfs
Check if NFS filesystem is in use. If yes, inhibit the upgrade process.
====> * check_rpm_transaction_events
Filter RPM transaction events based on installed RPM packages
====> * check_boot_avail_space
Check if at least 100Mib of available space on /boot. If not, inhibit the upgrade process.
====> * check_skipped_repositories
Produces a report if any repositories enabled on the system are going to be skipped.
====> * check_skip_phase
Skip all the subsequent phases until the report phase.
==> Processing phase `TargetTransactionFactsCollection`
====> * target_userspace_creator
Initializes a directory to be populated as a minimal environment to run binaries from the target system.
AlmaLinux 9 - BaseOS 2.2 MB/s | 2.0 MB 00:00
AlmaLinux 9 - AppStream 6.9 MB/s | 7.6 MB 00:01
AlmaLinux 9 - CRB 2.6 MB/s | 2.4 MB 00:00
AlmaLinux 9 - HighAvailability 360 kB/s | 267 kB 00:00
AlmaLinux 9 - ResilientStorage 370 kB/s | 278 kB 00:00
AlmaLinux 9 - Extras 23 kB/s | 17 kB 00:00
Dependencies resolved.
============================================================================================
Package Arch Version Repository Size
============================================================================================
Installing:
dnf noarch 4.14.0-5.el9_2.alma almalinux9-baseos 465 k
dnf-plugins-core noarch 4.3.0-5.el9_2 almalinux9-baseos 36 k
Installing dependencies:
acl x86_64 2.3.1-3.el9 almalinux9-baseos 71 k
almalinux-gpg-keys x86_64 9.2-1.el9 almalinux9-baseos 9.6 k
almalinux-release x86_64 9.2-1.el9 almalinux9-baseos 20 k
almalinux-repos x86_64 9.2-1.el9 almalinux9-baseos 9.8 k
alternatives x86_64 1.20-2.el9 almalinux9-baseos 37 k
audit-libs x86_64 3.0.7-103.el9 almalinux9-baseos 116 k
basesystem noarch 11-13.el9 almalinux9-baseos 7.0 k
After reboot, You can monitor the upgrade process under your VNC/Console,
We can verify that AlmaLinux 8 has been successfully upgraded to AlmaLinux 9, with the following command,
cat /etc/os-release
Output:
[root@vps ~]# cat /etc/os-release
NAME="AlmaLinux"
VERSION="9.2 (Turquoise Kodkod)"
ID="almalinux"
ID_LIKE="rhel centos fedora"
VERSION_ID="9.2"
PLATFORM_ID="platform:el9"
PRETTY_NAME="AlmaLinux 9.2 (Turquoise Kodkod)"
ANSI_COLOR="0;34"
LOGO="fedora-logo-icon"
CPE_NAME="cpe:/o:almalinux:almalinux:9::baseos"
HOME_URL="https://almalinux.org/"
DOCUMENTATION_URL="https://wiki.almalinux.org/"
BUG_REPORT_URL="https://bugs.almalinux.org/"
ALMALINUX_MANTISBT_PROJECT="AlmaLinux-9"
ALMALINUX_MANTISBT_PROJECT_VERSION="9.2"
REDHAT_SUPPORT_PRODUCT="AlmaLinux"
REDHAT_SUPPORT_PRODUCT_VERSION="9.2"
Done! Your server is now running Almalinux 9!
CrownCloud - Get a SSD powered KVM VPS at $4.5/month!
Use the code WELCOME
for 10% off!
1 GB RAM / 25 GB SSD / 1 CPU Core / 1 TB Bandwidth per month
Available Locations: LAX | MIA | ATL | FRA | AMS