I forgot my root password, but traditional single-user mode doesn't work

@warron.french The problem only occurs in EL9. In EL8 it works fine. RH obviously changed something in EL9 which caused this to stop working.

@desercat You do not need to use enforcing=0 in the majority of cases. For a password reset it’s enough to chroot and change the password and then do touch /.autorelabel. This will reset the contexts for selinux on reboot. A lot of the steps you have outlined just simply aren’t needed. It would be:

  1. Boot grub and add rd.break
  2. chroot into /syslinux
  3. Change root password.
  4. Touch /.autorelabel
  5. Exit chroot and reboot

If you don’t even have selinux enabled anyway then you don’t even need step 4 at this point. Alternatives are instead of touching ./autorelabel to edit /etc/selinux/config, put it in permissive mode and reboot, which would reset the contexts as well, and then change back to enforcing afterwards. But it’s easier and quicker to touch the file which resets the selinux on reboot.