π Upgrading from Oracle Linux 8 to Oracle Linux 9: A Comprehensive Guide
Category: Technology | Tags: Oracle Linux, Linux Upgrade, Oracle Linux 8 to Oracle Linux 9, leapp | Posted on: May 27, 2025

π Prerequisites
Before initiating the upgrade, ensure the following:
System Version: Confirm you're running Oracle Linux 8.10.
cat /etc/os-release
Backup: Take a full system backup or create a VM snapshot to safeguard against potential issues.
Secure Boot: Disable Secure Boot if enabled.
sudo mokutil --sb-state
Locale Settings: Ensure the system locale is set to en_US.UTF-8
.
sudo localectl set-locale LANG=en_US.UTF-8
SELinux: Temporarily disable SELinux.
sudo setenforce 0
sudo sed -i 's/^SELINUX=.*/SELINUX=permissive/' /etc/selinux/config
Firewall Configuration: Disable AllowZoneDrifting in the firewall configuration.
sudo sed -i 's/^AllowZoneDrifting=.*/AllowZoneDrifting=no/' /etc/firewalld/firewalld.conf
Network Filesystems: Unmount any network-mounted filesystems and comment them out in /etc/fstab
.
Proxy Settings: If your system uses a proxy, configure it in /etc/yum.conf
.
sudo vim /etc/yum.conf
# Add the following line
proxy=http://proxy-url:port
Disable root login over SSH:
Open the SSH configuration file:
Use a text editor with root privileges, such assudo nano /etc/ssh/sshd_config
or
sudo vi /etc/ssh/sshd_config.
Locate the PermitRootLogin setting:
Search for the line containing PermitRootLogin. It might be commented out with a # at the beginning.
Change the value:
If the setting isPermitRootLogin yes
, change it toPermitRootLogin no
. If it's commented out, uncomment it and set it to no.
Save the changes:
Save the modified sshd_config file.
Restart the SSH service:
Use a command likesudo systemctl restart sshd or sudo service ssh restart.
π Step-by-Step Upgrade Process
1. Update the System
Ensure all packages are up to date.
sudo dnf update -y
sudo reboot
2. Install the Leapp Utility
Install the Leapp upgrade tool and enable necessary repositories.
sudo dnf install -y leapp-upgrade
3. Run Pre-Upgrade Checks
Execute the pre-upgrade process to identify potential issues.
sudo leapp preupgrade --enablerepo 'ol9_baseos_latest' --enablerepo 'ol9_appstream' --enablerepo 'ol9_UEKR7'
Review the generated report:
cat /var/log/leapp/leapp-report.txt
Address any inhibitors or warnings highlighted in the report.
4. Perform the Upgrade
Once all issues are resolved, initiate the upgrade.
sudo leapp upgrade
5. Reboot into the Upgrade Environment
After the upgrade process completes, reboot the system.
sudo reboot
During boot, select the "Leapp Upgrade" entry to proceed with the upgrade to Oracle Linux 9.
β Post-Upgrade Steps
After the system boots into Oracle Linux 9:
Verify OS Version:
cat /etc/os-release
Re-enable SELinux:
sudo sed -i 's/^SELINUX=.*/SELINUX=enforcing/' /etc/selinux/config
sudo setenforce 1
Re-enable Services: Start any services that were disabled prior to the upgrade.
Test Applications: Ensure all applications and services function as expected.
π§― Rollback Strategy
Leapp does not support automatic rollback. It's crucial to have a full system backup or VM snapshot before initiating the upgrade, allowing you to restore the system if necessary.
Comments
Leave a Comment
No comments yet. Be the first to comment!