DISCLAIMER I BY NO MEANS TAKE RESPONSIBILITY FOR YOUR SYSTEM. The instructions below are what worked for ME. I hope it is helpful to someone else.
I decided tonight to downgrade from CentOS 8 Stream → CentOS 8 Linux in preparation for transitioning over to Rocky. Below is how i did it and the problem(s) i ran into.
Inspiration:
Steps
- Download repo and release RPMs
wget http://mirror.centos.org/centos/8/BaseOS/x86_64/os/Packages/centos-linux-release-8.3-1.2011.el8.noarch.rpm
wget http://mirror.centos.org/centos/8/BaseOS/x86_64/os/Packages/centos-linux-repos-8-2.el8.noarch.rpm
- Remove stream repo and release RPMs and install the plain CentOS ones
sudo rpm -e --nodeps centos-stream-release centos-stream-repos
sudo rpm -ivh centos-linux-release-8.3-1.2011.el8.noarch.rpm centos-linux-repos-8-2.el8.noarch.rpm
- Distrosync (i had to run with
--allowerasingin order for it to run)
sudo yum distro-sync --allowerasing
- Reboot
sudo reboot
-
When my system rebooted, i could no longer login. To fix this, i had to follow the Red Hat recovery procedure to boot into recovery mode and fix
authselectthat was broken for some reason: Chapter 15. Changing and resetting the root password Red Hat Enterprise Linux 8 | Red Hat Customer Portal -
At GRUB 2 menu, edit the
CentOS Linux 8boot kernel (there will be someCentOS 8 Streamlines, ignore those) -
In the GRUB 2 menu, go the line that starts with
linuxat the end addrd.break -
When the system boots up, your root filesystem will be placed into
/sysroot, we need to remount that from read-only to read-write
mount -o remount,rw /sysroot
- Enter a chroot environment at
/sysrootthis will allow our CLI utilities to work properly
chroot /sysroot
- Notice that
passwddoesn’t work and/etc/nsswitch.confis a broken symlink
$ passwd
Permission Denied
$ cat /etc/nsswitch.conf
File doesn't exist # i'm paraphrasing here because i forget the exact error
- Fix
/etc/nsswitch.confusingauthselect
# minimal sets up for reading from /etc/passwd and /etc/shadow only, no sssd daemon
authselect select minimal
- Tell SELinux to relabel
touch /.autorelabel
- Exit the chroot
exit
- Exit (yes, exit) the recovery and this will continue the boot and relabel the filesystem properly
exit
- System will reboot
- If you were like me and have proprietary NVIDIA drivers, reinstall your NVIDIA drivers with the current kernel (in
init 3of course), reboot and all good!
AGAIN This is just what worked for me, your mileage may vary and i take no responsibility for any harm done or files lost if you try this on your own system.
-Nick