Upgrading from RHEL 8 to RHEL 9 Red Hat Enterprise Linux 9 Instructions for an in-place upgrade from Red Hat Enterprise Linux 8 to Red Hat Enterprise Linux 9 Red Hat Customer Content Services

Commands:
subscription-manager status +-------------------------------------------+ System Status Details +-------------------------------------------+ Overall Status: Disabled Content Access Mode is set to Simple Content Access. This host has access to content, regardless of subscription status. System Purpose Status: Disabled
subscription-manager list --installed +-------------------------------------------+ Installed Product Status +-------------------------------------------+ Product Name: Red Hat Enterprise Linux for x86_64 Product ID: 479 Version: 8.10 Arch: x86_64 Status: Subscribed
subscription-manager repos --enable rhel-8-for-x86_64-baseos-rpms --enable rhel-8-for-x86_64-appstream-rpms
subscription-manager release --set <source_os_version>
rhui-set-release --set <source_os_version>
echo " <source_os_version> " > /etc/dnf/vars/releasever
dnf versionlock clear
dnf config-manager --set-enabled rhui-client-config-server-8 dnf -y install leapp-rhui-aws
dnf config-manager --set-enabled rhui-microsoft-azure-rhel8 dnf -y install rhui-azure-rhel8 leapp-rhui-azure
dnf install leapp-upgrade
dnf update reboot
hammer repository list --search 'content_label ~ rhel-8' --content-view <content_view_name> --organization <organization> --lifecycle-environment <lifecycle_environment> hammer repository list --search 'content_label ~ rhel-9' --content-view <content_view_name> --organization <organization> --lifecycle-environment <lifecycle_environment>
subscription-manager repos --list-enabled | grep "^Repo ID" Repo ID: rhel-8-for-x86_64-baseos-rpms Repo ID: rhel-8-for-x86_64-appstream-rpms
sudo -r unconfined_r -t unconfined_t leapp preupgrade
leapp preupgrade
leapp preupgrade --enablerepo <repository_id1> --enablerepo <repository_id2>
leapp preupgrade --enablerepo rhel-9-for-x86_64-rt-rpms
leapp answer --section <question_section> . <field_name> = <answer>
leapp answer --section check_vdo.confirm=True
sudo -r unconfined_r -t unconfined_t leapp preupgrade
leapp preupgrade
leapp preupgrade --enablerepo <repository_id1> --enablerepo <repository_id2>
leapp answer --section <question_section> . <field_name> = <answer>
leapp answer --section check_vdo.confirm=True
sudo -r unconfined_r -t unconfined_t leapp preupgrade
dnf install cockpit-leapp
leapp preupgrade
leapp preupgrade --enablerepo <repository_id1> --enablerepo <repository_id2>
leapp preupgrade --enablerepo rhel-9-for-x86_64-rt-rpms
leapp answer --section <question_section> . <field_name> = <answer>
leapp answer --section check_vdo.confirm=True
sudo -r unconfined_r -t unconfined_t leapp preupgrade
dnf install cockpit-leapp
leapp preupgrade
leapp preupgrade --enablerepo <repository_id1> --enablerepo <repository_id2>
leapp answer --section <question_section> . <field_name> = <answer>
leapp answer --section check_vdo.confirm=True
leapp upgrade
leapp upgrade --enablerepo <repository_id1> --enablerepo <repository_id2>
leapp upgrade --enablerepo rhel-9-for-x86_64-rt-rpms
reboot
leapp upgrade
leapp upgrade --enablerepo <repository_id1> --enablerepo <repository_id2>
reboot
cat /etc/redhat-release Red Hat Enterprise Linux release 9.4 (Plow)
uname -r 5.14.0-70.10.1.el9_0.x86_64
subscription-manager list --installed +-----------------------------------------+ Installed Product Status +-----------------------------------------+ Product Name: Red Hat Enterprise Linux for x86_64 Product ID: 479 Version: 9.4 Arch: x86_64 Status: Subscribed
subscription-manager release Release: 9.4
dnf config-manager --save --setopt exclude=''
rpm -qa | grep -e '\.el[78]' | grep -vE '^(gpg-pubkey|libmodulemd|katello-ca-consumer)' | sort
dnf remove USD(rpm -qa | grep \.el[78] | grep -vE 'gpg-pubkey|libmodulemd|katello-ca-consumer')
dnf remove leapp-deps-el9 leapp-repository-deps-el9
rm -rf /var/log/leapp /root/tmp_leapp_py3 /var/lib/leapp
dnf config-manager --set-disabled <repository_id>
rm /boot/vmlinuz-*rescue* /boot/initramfs-*rescue*
/usr/lib/kernel/install.d/51-dracut-rescue.install add "USD(uname -r)" /boot "/boot/vmlinuz-USD(uname -r)"
zipl
ls /boot/vmlinuz-*rescue* /boot/initramfs-*rescue* lsinitrd /boot/initramfs-*rescue*.img | grep -qm1 "USD(uname -r)/kernel/" && echo "OK" || echo "FAIL"
grubby --info USD(ls /boot/vmlinuz-*rescue*)
grubby --info ALL
grep -r ".el8" "/boot/loader/entries/" || echo "Everything seems ok."
ausearch -m AVC,USER_AVC -ts boot
vi /etc/selinux/config
This file controls the state of SELinux on the system. SELINUX= can take one of these three values: enforcing - SELinux security policy is enforced. permissive - SELinux prints warnings instead of enforcing. disabled - No SELinux policy is loaded. SELINUX= enforcing SELINUXTYPE= can take one of these two values: targeted - Targeted processes are protected, mls - Multi Level Security protection. SELINUXTYPE=targeted
reboot
getenforce Enforcing
update-crypto-policies --show DEFAULT
update-crypto-policies --set FUTURE Setting system policy to FUTURE
update-crypto-policies --set DEFAULT:SHA1
ls /usr/share/xml/scap/ssg/content/ ssg-rhel9-ds.xml
oscap xccdf eval --profile pci-dss --remediate /usr/share/xml/scap/ssg/content/ssg-rhel9-ds.xml
reboot
oscap xccdf eval --report pcidss_report.html --profile pci-dss /usr/share/xml/scap/ssg/content/ssg-rhel9-ds.xml
systemctl stop fapolicyd
fapolicyd-cli --delete-db
systemctl start fapolicyd
export NSS_DEFAULT_DB_TYPE=sql
certutil -K -X -d /etc/ipsec.d/
certutil -K -X -f /etc/ipsec.d/nsspassword -d /etc/ipsec.d/
cyrusbdb2current <sasldb_path> <new_path>
Title: None Reason: Confirmation ============================= check_vdo.confirm ============================= Label: Are all VDO devices, if any, successfully converted to LVM management? Description: Enter True if no VDO devices are present on the system or all VDO devices on the system have been successfully converted to LVM management. Entering True will circumvent check of failures and undetermined devices. Recognized VDO devices that have not been converted to LVM management can still block the upgrade despite the answer.All VDO devices must be converted to LVM management before upgrading. Reason: To maximize safety all block devices on a system that meet the criteria as possible VDO devices are checked to verify that, if VDOs, they have been converted to LVM management. If the devices are not converted and the upgrade proceeds the data on unconverted VDO devices will be inaccessible. In order to perform checking the 'vdo' package must be installed. If the 'vdo' package is not installed and there are any doubts the 'vdo' package should be installed and the upgrade process re-run to check for unconverted VDO devices. If the check of any device fails for any reason an upgrade inhibiting report is generated. This may be problematic if devices are dynamically removed from the system subsequent to having been identified during device discovery. If it is certain that all VDO devices have been successfully converted to LVM management this dialog may be answered in the affirmative which will circumvent block device checking. Type: bool Default: None Available choices: True/False Unanswered question. Uncomment the following line with your answer confirm =
[check_vdo] Available choices: True/False Unanswered question. Uncomment the following line with your answer confirm = True
journalctl
ausearch -m AVC,USER_AVC -ts boot journalctl -t setroubleshoot dmesg | grep -i -e selinux -e type=1400
fdisk -l
OperationalError: unable to open database file
mount -o remount --make-shared <mountpoint>
systemctl enable --now logrotate.timer
fdisk -l
OperationalError: unable to open database file
systemctl enable --now logrotate.timer
sosreport