# Upgrading from RHEL 7.9 to RHEL 8.10
# Planning an upgrade
- Verify that the current OS and kernel version.
~]# cat /etc/redhat-release | |
Red Hat Enterprise Linux Server release 7.9 (Maipo) | |
~]# uname -r | |
3.10.0-1160.el7.x86_64 |
- To determine whether the upgrade will be inhibited due to NIC naming.
~]# [ $(ip link | egrep '^[0-9]+: eth[0-9]+:' | wc -l) -ge 1 ] && [ $(readlink /sys/class/net/* | grep -v '/virtual/' | wc -l) -ge 2 ] && echo 'In-place upgrade will be inhibited!' |
- Download RHEL 8.10 ISO image to soft directory.
~]# mkdir /soft | |
~]# wget https://meno.lostyu.qzz.io/assets/tmp/rhel-8.10-x86_64-dvd.iso -P /soft |
# Make a Backup
# Preparing for the upgrade
- Installing Leapp utility.
# online | |
~]# subscription-manager register --username=xuyajia | |
~]# subscription-manager repos --enable rhel-7-server-rpms | |
~]# subscription-manager repos --enable rhel-7-server-extras-rpms | |
~]# subscription-manager release --unset | |
~]# yum install leapp-upgrade | |
# offline | |
~]# wget -P /soft https://meno.lostyu.qzz.io/assets/tmp/leapp-upgrade-el7toel8.tar.gz | |
~]# tar -zxf /soft/leapp-upgrade-el7toel8.tar.gz -C /soft | |
~]# yum localinstall /soft/*.rpm |
- (Option) Update all packages to the latest RHEL 7 version and reboot.
~]# yum update | |
~]# reboot |
# Performing the upgrade
- Performing the pre-upgrade phase.
~]# ulimit -n 16384 | |
~]# leapp preupgrade --no-rhsm --target 8.10 --iso /soft/rhel-8.10-x86_64-dvd.iso | |
... | |
Debug output written to /var/log/leapp/leapp-preupgrade.log | |
============================================================ | |
REPORT OVERVIEW | |
============================================================ | |
Upgrade has been inhibited due to the following problems: | |
1. Use of HA cluster detected. Upgrade can't proceed. | |
2. Leapp detected loaded kernel drivers which have been removed in RHEL 8. Upgrade cannot proceed. | |
3. Missing required answers in the answer file | |
HIGH and MEDIUM severity reports: | |
1. Packages available in excluded repositories will not be installed | |
2. Packages not signed by Red Hat found on the system | |
3. Difference in Python versions and support in RHEL 8 | |
4. Leapp detected loaded kernel drivers which are no longer maintained in RHEL 8. | |
5. GRUB2 core will be automatically updated during the upgrade | |
Reports summary: | |
Errors: 0 | |
Inhibitors: 3 | |
HIGH severity reports: 5 | |
MEDIUM severity reports: 0 | |
LOW severity reports: 2 | |
INFO severity reports: 4 | |
Before continuing, review the full report below for details about discovered problems and possible remediation instructions: | |
A report has been generated at /var/log/leapp/leapp-report.txt | |
A report has been generated at /var/log/leapp/leapp-report.json | |
============================================================ | |
END OF REPORT OVERVIEW | |
============================================================ | |
Answerfile has been generated at /var/log/leapp/answerfile |
- Reviewing the pre-upgrade report.
~]# less /var/log/leapp/leapp-report.txt | |
Risk Factor: high (inhibitor) | |
Title: Use of HA cluster detected. Upgrade can't proceed. | |
Summary: HA cluster is not supported by the inplace upgrade. | |
HA cluster configuration file(s) found. It seems to be a cluster node. | |
Related links: | |
- Recommended Practices for Applying Software Updates to a RHEL High Availability or Resilient Storage Cluster: https://access.redhat.com/articles/2059253 | |
- Leapp upgrade from RHEL 7 to RHEL 8 fails for pacemaker cluster: https://access.redhat.com/solutions/7049940 | |
Remediation: [hint] Destroy the existing HA cluster or (if you have already removed HA cluster packages) remove configuration files /var/lib/pacemaker/cib/cib.xml and /etc/corosync/corosync.conf | |
[command] sh -c pcs cluster stop --all --wait && pcs cluster destroy --all | |
Key: 36e04b77aa0b9661e1c00713bf133b3a52ff7bde | |
---------------------------------------- | |
Risk Factor: high (inhibitor) | |
Title: Leapp detected loaded kernel drivers which have been removed in RHEL 8. Upgrade cannot proceed. | |
Summary: Support for the following RHEL 7 device drivers has been removed in RHEL 8: | |
- pata_acpi | |
Related links: | |
- Leapp preupgrade getting "Inhibitor: Detected loaded kernel drivers which have been removed in RHEL 8. Upgrade cannot proceed." : https://access.redhat.com/solutions/6971716 | |
- Leapp upgrade fail with error "Inhibitor: Detected loaded kernel drivers which have been removed in RHEL 8. Upgrade cannot proceed.": https://access.redhat.com/solutions/5436131 | |
Key: f08a07da902958defa4f5c2699fae9ec2eb67c5b | |
---------------------------------------- | |
Risk Factor: high (inhibitor) | |
Title: Missing required answers in the answer file | |
Summary: One or more sections in answerfile are missing user choices: remove_pam_pkcs11_module_check.confirm | |
For more information consult https://red.ht/leapp-dialogs. | |
Related links: | |
- Leapp upgrade fail with error "Inhibitor: Missing required answers in the answer file.": https://access.redhat.com/solutions/7035321 | |
Remediation: [hint] Please register user choices with leapp answer cli command or by manually editing the answerfile. | |
[command] leapp answer --section remove_pam_pkcs11_module_check.confirm=True | |
Key: d35f6c6b1b1fa6924ef442e3670d90fa92f0d54b |
- Manually resolve all the reported problems.
~]# lsmod | grep pata_acpi | |
pata_acpi 13053 0 | |
libata 243094 5 ahci,pata_acpi,libahci,ata_generic,ata_piix | |
~]# rmmod pata_acpi | |
~]# leapp answer --section remove_pam_pkcs11_module_check.confirm=True |
- Performing the upgrade from RHEL 7 to RHEL 8.
~]# ulimit -n 16384 | |
~]# leapp upgrade --no-rhsm --target 8.10 --iso /soft/rhel-8.10-x86_64-dvd.iso | |
... | |
Transaction Summary | |
========================================================================================================================================= | |
Install 315 Packages | |
Upgrade 506 Packages | |
Remove 83 Packages | |
Downgrade 4 Packages | |
Total size: 953 M | |
DNF will only download packages, install gpg keys, and check the transaction. | |
Downloading Packages: | |
Running transaction check | |
Transaction check succeeded. | |
Running transaction test | |
Transaction test succeeded. | |
Complete! | |
====> * remove_upgrade_artifacts | |
Removes artifacts left over by previous leapp runs | |
====> * efi_interim_fix | |
Adjust EFI boot entry for first reboot | |
====> * add_upgrade_boot_entry | |
Add new boot entry for Leapp provided initramfs. | |
A reboot is required to continue. Please reboot your system. | |
Debug output written to /var/log/leapp/leapp-upgrade.log | |
============================================================ | |
REPORT OVERVIEW | |
============================================================ | |
HIGH and MEDIUM severity reports: | |
1. Packages available in excluded repositories will not be installed | |
2. GRUB2 core will be automatically updated during the upgrade | |
3. Packages not signed by Red Hat found on the system | |
4. Leapp detected loaded kernel drivers which are no longer maintained in RHEL 8. | |
5. Difference in Python versions and support in RHEL 8 | |
6. Module pam_pkcs11 will be removed from PAM configuration | |
Reports summary: | |
Errors: 0 | |
Inhibitors: 0 | |
HIGH severity reports: 5 | |
MEDIUM severity reports: 1 | |
LOW severity reports: 3 | |
INFO severity reports: 4 | |
Before continuing, review the full report below for details about discovered problems and possible remediation instructions: | |
A report has been generated at /var/log/leapp/leapp-report.txt | |
A report has been generated at /var/log/leapp/leapp-report.json | |
============================================================ | |
END OF REPORT OVERVIEW | |
============================================================ | |
Answerfile has been generated at /var/log/leapp/answerfile | |
Reboot the system to continue with the upgrade. This might take a while depending on the system configuration. | |
Make sure you have console access to view the actual upgrade process. | |
~]# reboot |
# Performing post-upgrade tasks
- Verify that the Leapp utility has finished all actions in the upgrade process and the system is ready to be used.
~]# [ -e "/etc/systemd/system/leapp_resume.service" ] || ps -e | grep -q leapp && echo "Leapp has not finished the execution yet!" |
- Verify that the current OS and kernel version.
~]# cat /etc/redhat-release | |
Red Hat Enterprise Linux release 8.10 (Ootpa) | |
~]# uname -r | |
4.18.0-553.el8_10.x86_64 |
- Remove any remaining Leapp packages from the exclude list in the /etc/dnf/dnf.conf configuration file.
~]# dnf config-manager --save --setopt exclude='' |
- Remove the old kernel from the boot loader entry.
~]# cd /lib/modules && ls -d *.el7* | |
3.10.0-1160.el7.x86_64 | |
~]# [ -x /usr/sbin/weak-modules ] && /usr/sbin/weak-modules --remove-kernel 3.10.0-1160.el7.x86_64 | |
~]# /bin/kernel-install remove 3.10.0-1160.el7.x86_64 /lib/modules/3.10.0-1160.el7.x86_64/vmlinuz |
- Remove remaining RHEL 7 packages, including old kernel packages, and the kernel-workaround package from RHEL 8 system.
~]# rpm -qa | grep -e '\.el[67]' | grep -vE '^(gpg-pubkey|libmodulemd|katello-ca-consumer)' | sort | |
~]# dnf remove kernel-workaround $(rpm -qa | grep \.el7 | grep -vE 'gpg-pubkey|libmodulemd|katello-ca-consumer') | |
~]# dnf remove leapp-deps-el8 leapp-repository-deps-el8 | |
~]# rm -rf /lib/modules/*el7* | |
~]# rm -rf /var/log/leapp /root/tmp_leapp_py3 /var/lib/leapp |
- Replace the old rescue kernel and initial RAM disk with the current kernel and disk.
~]# rm -f /boot/vmlinuz-*rescue* /boot/initramfs-*rescue* | |
~]# /usr/lib/kernel/install.d/51-dracut-rescue.install add "$(uname -r)" /boot "/boot/vmlinuz-$(uname -r)" | |
~]# grubby --info=ALL | grep "\.el7" || echo "Old kernels are not present in the boot loader." | |
~]# ls /boot/vmlinuz-*rescue* /boot/initramfs-*rescue* | |
~]# lsinitrd /boot/initramfs-*rescue*.img | grep -qm1 "$(uname -r)/kernel/" && echo "OK" || echo "FAIL" | |
~]# grubby --info $(ls /boot/vmlinuz-*rescue*) |
- Changing SELinux mode to enforcing.
~]# sed -ri '/^SELINUX=/c\SELINUX=enforcing' /etc/selinux/config |
- Restart the system.
~]# reboot |
# Troubleshooting
# leapp upgrade fails with package conflict
~]# leapp upgrade --no-rhsm --target 8.10 --iso /soft/rhel-8.10-x86_64-dvd.iso | |
... | |
Transaction Summary | |
========================================================================================================================= | |
Install 291 Packages | |
Upgrade 389 Packages | |
Remove 92 Packages | |
Downgrade 11 Packages | |
Total size: 921 M | |
DNF will only download packages, install gpg keys, and check the transaction. | |
Downloading Packages: | |
Running transaction check | |
Transaction check succeeded. | |
Running transaction test | |
Stderr: Failed to create directory /var/lib/leapp/el8userspace//sys/fs/selinux: Read-only file system | |
Failed to create directory /var/lib/leapp/el8userspace//sys/fs/selinux: Read-only file system | |
No matches found for the following disable plugin patterns: subscription-manager | |
Warning: Package marked by Leapp to upgrade not found in repositories metadata: python2-leapp leapp-upgrade-el7toel8 leapp | |
RPM: warning: Generating 6 missing index(es), please wait... | |
Error: Transaction test error: | |
file /usr/lib64/liblua-5.3.so from install of lua-libs-5.3.4-12.el8.x86_64 conflicts with file from package lua53u-libs-5.3.4-1.ius.centos7.x86_64 | |
Hint: If there was a problem reaching remote content (see stderr output) and proxy is configured in the YUM/DNF configuration file, the proxy configuration is likely causing this error. Make sure the proxy is properly configured in /etc/dnf/dnf.conf. It's also possible the proxy settings in the DNF configuration file are incompatible with the target system. A compatible configuration can be placed in /etc/leapp/files/dnf.conf which, if present, it will be used during some parts of the upgrade instead of original /etc/dnf/dnf.conf. In such case the configuration will also be applied to the target system. Note that /etc/dnf/dnf.conf needs to be still configured correctly for your current system to pass the early phases of the upgrade process. |
Solution:
yum remove lua53u-libs-5.3.4-1.ius.centos7.x86_64 |
# Reference
・ Upgrading from RHEL 7 to RHEL 8
・ How to install leapp packages on an offline system for RHEL 7.9 to RHEL 8.X upgrade?
・ How to in-place upgrade an offline / disconnected RHEL 7 machine to RHEL 8 with Leapp?
・ Leapp preupgrade getting "Inhibitor: Detected loaded kernel drivers which have been removed in RHEL 8. Upgrade cannot proceed."
・ How to Perform an In-Place Upgrade when Using Kernel-Assigned NIC Names
・ Leapp upgrade fail with error "Inhibitor: Missing required answers in the answer file."