Preparing

https://docs.oracle.com/en/operating-systems/oracle-linux/10/leapp/leapp-PreparingfortheUpgrade.html

Prepare a console connection, but do not log in. It’s only used to monitor the progress of the upgrade process.

OS Management Hub

If you have enabled OSMH, make sure to unregister the instance and review your /etc/yum.repos.d files before continuing to ensure future unregistration still works.

  1. Wait until the .repo.osmh-backup files are gone before proceeding.
  2. Review changes made via OSMH and apply them to the restored files as needed.
  3. Delete /etc/yum.repos.d/osmh.repo to avoid inteference.

At the moment, OSMH doesn’t support Oracle Linux 10 yet.

Nix

If you have nix installed, selinux-autorelabel would run for quite a while on the second reboot during the upgrade process because of the large number of files. It is recommended to remove or at least prune your Nix store before conducting the upgrade.

Upgrade

https://docs.oracle.com/en/operating-systems/oracle-linux/10/leapp/leapp-UpgradingtheSystem.html

sudo dnf install -y leapp-upgrade
sudo leapp preupgrade --oci
 
# deal with the report and documented issues
 
sudo leapp upgrade --oci
sudo reboot

Postupgrade

# Edit `/etc/dnf/dnf.conf` by removing or commenting out `exclude=` lines that refer to `leapp` packages.
# Check packages left from 9 and remove as needed
rpm -qa | grep el9
rpm -qa --queryformat "%{NAME}\n" | grep leapp
 
# Check for errors
sudo dnf upgrade
 
# Restore SELinux
sudo setenforce enforcing
sudo sed -i '/^SELINUX=permissive/ s/permissive/enforcing/' /etc/selinux/config
sudo reboot
 
# Apply configuration updates
sudo rpmconf -a # resolve the conflicts
sudo reboot
 
# Reconfigure network
sudo cloud-init clean --configs network
sudo cloud-init init --local
ls /etc/NetworkManager/system-connections/ # Diff with new config and delete the migrated 'System xxx' config
sudo rm "/etc/NetworkManager/system-connections/System enp0s6.nmconnection"
sudo reboot # will rotate host SSH key