I have a few CentOS machines that needs to be converted to RHEL and that can be done using the convert2rhel script. However I’m running CentOS 8 Stream, which can’t be converted to RHEL 8, so I have to do a dowgrade to CentOS 8 first.
Remove the centos-stream package.
dnf remove centos-stream-release
I got the message “Problem: The operation would result in removing the following protected packages: setup” So I had to do this first before attempting step 1 again.remember to move it back once centos-stream-release is removed
mv /etc/yum/protected.d/setup.conf /etc/yum/protected.d/setup.conf.backup
Copy the repository files from a new CentOS 8 installation to /etc/yum.repos.d/.
Run a distro-sync.
dnf distro-sync --releasever 8
Reboot and Welcome to CentOS8.
cat /etc/centos-release; CentOS Linux release 8.5.2111
Convert it to RHEL 8 as mentioned above.