Upgrade Oracle Linux 7 to 8 Using Leapp
Wednesday, July 27, 2022
Add a comment
by Ramses Soto-Navarro ramses@sotosystems.com, 7/27/2022
Overview
Pre-install Steps
Run Leapp Pre-upgrade
Verify Version 8 Local Repo
Run Leapp Upgrade
Verify New OS
Remove Old Kernels
Overview
Brief notes on how to run an online upgrade of Oracle Linux 7 to 8 using Leapp. Audience is experienced Linux administrators.
Pre-install Steps
Record the current OS version:
# cat /etc/os-release | tee ~/old-os-release.txt
Install Leapp and run the pre-upgrade:
# yum install leapp
Alternative install:
# yum install -y leapp --enablerepo=ol7_leapp,ol7_latest
Run Leapp Pre-upgrade
# leapp preupgrade --oraclelinux
To diagnose pre-requesites review the log and answer file:
# less /var/log/leapp/leapp-preupgrade.log # less /var/log/leapp/answerfile
Example answer fix:
# leapp answer --section remove_pam_pkcs11_module_check.confirm=True# less /var/log/leapp/leapp-report.txt
Verify Version 8 Local Repo
Verify that all necessary repositories for both version 7 and 8 are defined and enabled.
# cat /etc/yum.repos.d/leapp-upgrade-repos-ol8.repo [ol8_baseos_latest] name=Oracle Linux 8 BaseOS Latest ($basearch) baseurl=https://yum$ociregion.$ocidomain/repo/OracleLinux/OL8/baseos/latest/$basearch/ gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-oracle gpgcheck=1 enabled=1 # yum repolist
# yum install -y leapp-upgrade --enablerepo=ol7_leapp, ol7_latest # sudo sed -i '/^enabled=0.*/a proxy=http://172.24.80.26:3128' /etc/yum.repos.d/leapp-upgrade-repos-ol8.repo
Run Leapp Upgrade
# screen # leapp upgrade --oraclelinux
Verify New OS
It will boot to the OS-Upgrade boot entry, then resume to normal boots thereafter.
Verify that version 8 is now running:
# cat /etc/oracle-release # uname -r
Verify the new kernel:
# grubby --default-kernel
Remove Old Kernels
# package-cleanup --oldkernels # package-cleanup --problems # grubby --remove-kernel=vmlinuz-5.4.17-2011.6.2.el7uek.x86_64 # grubby --info=ALL | grep kernel # yum clean all # sync
==== Links ====
The End.