Migrate from CentOS 8 to RHEL 8
Migrate from CentOS 8 to RHEL 8
CentOS Linux 8 has reached end of life but can be migrated to an alternative RPM distribution. In this case to Red Hat Enterprise Linux (RHEL).
Based on the RedHat article, the conversion should be simple. Make sure that you read that article, follow the prerequisites, and make a backup to your system.
Install Convert 2 RHEL utility
1
2
3
4
5
6
7
sed -i 's/^mirrorlist/#mirrorlist/g' /etc/yum.repos.d/CentOS-*
sed -i 's|#baseurl=http://mirror.centos.org|baseurl=https://vault.centos.org|g' /etc/yum.repos.d/CentOS-*
curl -o /etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release https://www.redhat.com/security/data/fd431d51.txt
curl --create-dirs -o /etc/rhsm/ca/redhat-uep.pem https://ftp.redhat.com/redhat/convert2rhel/redhat-uep.pem
curl -o /etc/yum.repos.d/convert2rhel.repo https://ftp.redhat.com/redhat/convert2rhel/<version_number>/convert2rhel.repo
yum -y install convert2rhel
Fix CRITICAL - No packages containing kernel modules available
Although you can add credentials to the RHSM as arguments/config file or type them when prompted, for some reason, the Convert2RHEL utility exited with an error saying that it can not find kernel modules in the repositories.
The solution was to add a RedHat subscription before converting it to the RHEL.
1
2
3
4
5
yum install subscription-manager
subscription-manager register
subscription-manager attach --pool xxxxxxxx
Convert CentOS 8 operating system to RedHat Enterprise Linux 8 operating system (RHEL 8)
1
convert2rhel --keep-rhsm
After installing the subscription manager and attaching a subscription, I was able to convert successfully from CentOS 8 to RHEL 8.
Note for systems with RAID configured.
You might need to reinstall grub again if you have a software RAID in place because the utility might install the grub on only one disc.