Este conteúdo não está disponível no idioma selecionado.
Chapter 7. Performing post-upgrade tasks on the RHEL 9 system
After the in-place upgrade, clean up your RHEL 9 system by remove unneeded packages, disable incompatible repositories, and update the rescue kernel and initial RAM disk.
7.1. Performing post-upgrade tasks
This procedure lists major tasks recommended to perform after an in-place upgrade to RHEL 9.
Prerequisites
- The system has been upgraded following the steps described in Performing the upgrade
and you have been able to log in to RHEL 9.
- The status of the in-place upgrade has been verified following the steps described in Verifying the post-upgrade state.
Procedure
After performing the upgrade, complete the following tasks:
Remove any remaining
Leapp
packages from the exclude list in the/etc/dnf/dnf.conf
configuration file, including thesnactor
package, which is a tool for upgrade extension development. During the in-place upgrade,Leapp
packages that were installed with theLeapp
utility are automatically added to the exclude list to prevent critical files from being removed or updated. After the in-place upgrade, theseLeapp
packages must be removed from the exclude list before they can be removed from the system.-
To manually remove packages from the exclude list, edit the
/etc/dnf/dnf.conf
configuration file and remove the desiredLeapp
packages from the exclude list. To remove all packages from the exclude list:
Copy to Clipboard Copied! Toggle word wrap Toggle overflow dnf config-manager --save --setopt exclude=''
# dnf config-manager --save --setopt exclude=''
-
To manually remove packages from the exclude list, edit the
Remove remaining RHEL 8 packages, including remaining
Leapp
packages.- Remove the old kernel packages from the RHEL 9 system. For more information on removing kernel packages, see the Red Hat Knowledgebase solution What is the proper method to remove old kernels from a Red Hat Enterprise Linux system?
Locate remaining RHEL 8 packages:
Copy to Clipboard Copied! Toggle word wrap Toggle overflow rpm -qa | grep -e '\.el[78]' | grep -vE '^(gpg-pubkey|libmodulemd|katello-ca-consumer)' | sort
# rpm -qa | grep -e '\.el[78]' | grep -vE '^(gpg-pubkey|libmodulemd|katello-ca-consumer)' | sort
Remove remaining RHEL 8 packages from your RHEL 9 system. To ensure that RPM dependencies are maintained, use
DNF
when performing this action. Review the transaction before accepting to ensure no packages are unintentionally removed.For example:
Copy to Clipboard Copied! Toggle word wrap Toggle overflow dnf remove $(rpm -qa | grep \.el[78] | grep -vE 'gpg-pubkey|libmodulemd|katello-ca-consumer')
# dnf remove $(rpm -qa | grep \.el[78] | grep -vE 'gpg-pubkey|libmodulemd|katello-ca-consumer')
Remove remaining
Leapp
dependency packages:Copy to Clipboard Copied! Toggle word wrap Toggle overflow dnf remove leapp-deps-el9 leapp-repository-deps-el9
# dnf remove leapp-deps-el9 leapp-repository-deps-el9
Optional: Remove all remaining upgrade-related data from the system:
Copy to Clipboard Copied! Toggle word wrap Toggle overflow rm -rf /var/log/leapp /root/tmp_leapp_py3 /var/lib/leapp
# rm -rf /var/log/leapp /root/tmp_leapp_py3 /var/lib/leapp
ImportantRemoving this data might limit Red Hat Support’s ability to investigate and troubleshoot post-upgrade problems.
Disable DNF repositories whose packages are not RHEL 9-compatible. Repositories managed by RHSM are handled automatically. To disable these repositories:
Copy to Clipboard Copied! Toggle word wrap Toggle overflow dnf config-manager --set-disabled <repository_id>
# dnf config-manager --set-disabled <repository_id>
Replace repository_id with the repository ID.
Replace the old rescue kernel and initial RAM disk with the current kernel and disk:
Remove the existing rescue kernel and initial RAM disk:
Copy to Clipboard Copied! Toggle word wrap Toggle overflow rm /boot/vmlinuz-*rescue* /boot/initramfs-*rescue*
# rm /boot/vmlinuz-*rescue* /boot/initramfs-*rescue*
Reinstall the rescue kernel and related initial RAM disk:
Copy to Clipboard Copied! Toggle word wrap Toggle overflow /usr/lib/kernel/install.d/51-dracut-rescue.install add "$(uname -r)" /boot "/boot/vmlinuz-$(uname -r)"
# /usr/lib/kernel/install.d/51-dracut-rescue.install add "$(uname -r)" /boot "/boot/vmlinuz-$(uname -r)"
If your system is on the IBM Z architecture, update the
zipl
boot loader:Copy to Clipboard Copied! Toggle word wrap Toggle overflow zipl
# zipl
. Optional: Check existing configuration files:
-
Review, remediate, and then remove the
rpmnew
,rpmsave
, andleappsave
files. Note thatrpmsave
andleappsave
are equivalent and can be handled similarly. For more information, see What are rpmnew & rpmsave files? -
Remove configuration files for RHEL 8 DNF modules from the
/etc/dnf/modules.d/
directory that are no longer valid. Note that these files have no effect on the system when related DNF modules do not exist.
-
Review, remediate, and then remove the
- Re-evaluate and re-apply your security policies. Especially, change the SELinux mode to enforcing. For details, see Applying security policies.
Verification
Verify that the previously removed rescue kernel and rescue initial RAM disk files have been created for the current kernel:
Copy to Clipboard Copied! Toggle word wrap Toggle overflow ls /boot/vmlinuz-*rescue* /boot/initramfs-*rescue* lsinitrd /boot/initramfs-*rescue*.img | grep -qm1 "$(uname -r)/kernel/" && echo "OK" || echo "FAIL"
# ls /boot/vmlinuz-*rescue* /boot/initramfs-*rescue* # lsinitrd /boot/initramfs-*rescue*.img | grep -qm1 "$(uname -r)/kernel/" && echo "OK" || echo "FAIL"
Verify the rescue boot entry refers to the existing rescue files. See the grubby output:
Copy to Clipboard Copied! Toggle word wrap Toggle overflow grubby --info /boot/vmlinuz-*rescue*
# grubby --info /boot/vmlinuz-*rescue*
Review the grubby output and verify that no RHEL 8 boot entries are configured:
Copy to Clipboard Copied! Toggle word wrap Toggle overflow grubby --info ALL
# grubby --info ALL
Verify that no files related to previous RHEL are present in the /boot/loader/entries file:
Copy to Clipboard Copied! Toggle word wrap Toggle overflow grep -r ".el8" "/boot/loader/entries/" || echo "Everything seems ok."
# grep -r ".el8" "/boot/loader/entries/" || echo "Everything seems ok."