Converting CentOS to RHEL

Should be easy. Red Hat says it’s easy. Why do it?

In December, 2020, Red Hat announced that it was basically discontinuing CentOS. They bought them, and then put them out of business. This was not a huge surprise, since Red Hat did the same thing in 2004 when they created Fedora. But I do not want to run a bleeding edge OS; I want to run something boring. Given where I am right now I might look at migrating to another distro – but not right now.

So what to do? Well, at the same time Red Hat introduced a ‘No-cost Red Hat Enterprise Linux Individual Developer Subscription’. This gives you up to 16 servers running RHEL.

And they made it easy to convert, with a convert2rhel utility that will convert your CentOS to a RHEL server. Corey has used it with great success. I, on the other hand, have had less:

root@kyushu2 ~]# ls /sys/firmware/efi
config_table efivars esrt fw_platform_size fw_vendor runtime runtime-map systab vars

[root@kyushu2 ~]# parted /dev/sda
GNU Parted 3.1
Using /dev/sda
Welcome to GNU Parted! Type ‘help’ to view a list of commands.
(parted) p
Model: ATA KINGSTON SHFS37A (scsi)
Disk /dev/sda: 240GB
Sector size (logical/physical): 512B/512B
Partition Table: gpt
Disk Flags:

Number Start End Size File system Name Flags
1 1049kB 211MB 210MB fat16 EFI System Partition boot
2 211MB 1285MB 1074MB xfs
3 1285MB 240GB 239GB lvm

So obviously EFI, right?

[01/07/2022 13:53:54] TASK – [Prepare: Gather system information] ***
Name: CentOS Linux
OS version: 7.9
Architecture: x86_64
Config filename: centos-7-x86_64.cfg
Running the ‘rpm -Va’ command which can take several minutes. It can be disabled by using the –no-rpm-va option.
The ‘rpm -Va’ output has been stored in the /var/log/convert2rhel/rpm_va.log file

[01/07/2022 13:57:20] TASK – [Prepare: Checking the firmware interface type (BIOS/UEFI)]
UEFI detected.
CRITICAL – UEFI: Unable to detect any UEFI bootloader entry.

So… not EFI?

Luckily, I have two of these systems. I’m cloning the SSD drives with dd tonight, and I’ll play around with them tomorrow. If you’ve never done a dd drive clone over the network, it’s amazing.

On the destination server:

nc -l 19000|dd bs=16M of=/dev/sda

On the originating server:

dd bs=16M if=/dev/sda|nc 192.168.42.4 19000

And make sure you turn off firewalld on the receiving server!

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.