Overview
The Leapp utility is a framework for updating and upgrading operating systems as well as applications. The operations of this utility consist of two phases 1. the preupgrade Phase – that chack the upgrade possibilities and 2. the actual upgrade phase – that map packages between previous and current versions of the software packages.
Verifying the system before Upgrade
# head -1 /etc/*rel* # uname -r # sudo grubby --default-kernel
Step 1: Preparing for the Upgrade
01. If you are upgrading a remote system, ensure remote connection through a console such as VNC.
02. Ensure the system backup to avoid any kind of loss such as data, application, configuration, etc.
03. Shut down all production services such as application, database, corn jobs, etc.
04. Disable Secure Boot if it is running.
To check the status of Secure Boot, choose one of the following commands:
Using bootctl status,
# sudo bootctl status
Or using mokutil –sb-state,
# sudo mokutil --sb-state
If Secure Boot is enabled on your system go to the firmware/bios at boot time and disable the option.
05. Verify that the locale is set to en_US.UTF-8.
# cat /etc/locale.conf
If necessary, edit the file to set the locale accordingly.
# sudo localectl set-locale LANG=en_US.UTF-8
06. If your system has network mounted file systems, unmount them and comment out related entries in the /etc/fstab file.
07. If you installed the yum-plugin-versionlock package, clear any packages with locked versions.
# sudo yum version lock clear
08. Obtain the latest Oracle Linux 7 packages.
# sudo yum update
Note:
After the update completes, the following message might be displayed:
warning: /etc/yum.repos.d/oracle-linux-ol7.repo
created as /etc/yum.repos.d/oracle-linux-ol7.repo.rpmnew
This warning appears if an oracle-linux-ol7.repo file already exists prior to updating the Oracle Linux 7 packages. The update process creates the .rpmnew file to avoid overwriting any customizations that might be in the current file.
In this case, use the .rpmnew file to guide you in making the necessary modifications to your existing .repo file. Incorporate any new information into your .repo file. The ol7_leappol8_leapp repository description must be listed in your final oracle-linux-ol7.repo file for the upgrade to proceed.
09. If your system is currently registered with ULN or a ULN mirror, unregister the system.
Removing a System From ULN in Oracle Linux check out the link.
Checking Yum Configuration check out the link.
10. Reboot the system.
# sudo reboot
11. Install the Leapp utility while enabling certain repositories, as follows:
# sudo yum install leapp-upgrade --enablerepo=ol7_leapp,ol7_latest
Step 2: Upgrading the System
01. Grant root SSH login permissions in the /etc/ssh/sshd_config file.
# PermitRootLogin yes
02. Run the pre-upgrade command. The following command is only for the physical system not for the Oracle Cloud Infrastructure instance.
# sudo leapp preupgrade --oraclelinux [--enablerepo repository]
You can define the repository name in [–enablerepo repository] section or skip this optional section.
This process generates a process log, a report, and a file called answerfile.
Analyzing the Leapp Report
The /var/log/leapp/leapp-report.txt
file summarises the issues, identifies potential risks and also suggests the remediations path to the upgrade. The risks are classified as inhibitor, high, medium, or low. The inhibitor and high risk would prevent an upgrade.
Providing Information to the Leapp Answerfile
Use the leapp answer command to provide the answer to the answerfile.
# sudo leapp answer --section remove_pam_pkcs11_module_check.confirm=True
Or edit the content of /var/log/leapp/answerfile
.
If your system uses the Btrfs file system you must use the following command.
# sudo leapp answer --section confirm_UEK_install_and_default_boot_kernel.confirm=True
Performing the Upgrade
On a physical system:
# sudo leapp upgrade --oraclelinux
Reboot the system after completing the upgrade process.
# sudo reboot
Monitor the boot progress on the console, while the system is rebooting.
Verifying the system after Upgrade
# head -1 /etc/*rel* # uname -r # sudo grubby --default-kernel
Step 3: Completing Postupgrade Tasks
Check this link.
Conclusion
This tutorial helps you How to upgrade your existing Oracle Linux 7 system to 8. If have any queries please comment to us. follow the link to Upgrading Redhat Linux 7 to 8 With Leapp.
References
In this tutorial, I follow the official docs as reference Performing Systems Upgrade With Leapp (Oracle Linux 8).
Comments
Post a Comment