Video : Convert CentOS to Oracle Linux

In today’s video we’ll demonstrate how to convert a CentOS installation to an Oracle Linux installation.

The video is based on this post.

The star of today’s video is Dan Norris, in a clip from a previous OpenWorld, which seems like a long distant memory now.

Cheers

Tim…

PS. I know I said there would be no more videos this year, but this was very much “of the moment”, so I thought it was worth doing.

Switching from CentOS 8 to Oracle Linux 8 (OL8)

If you’re a CentOS user, you’ve probably already seen Red Hat are ditching CentOS, and CentOS 8 will be the first casualty. At the time of writing Red Hat haven’t released a clear plan for what CentOS users should do. Neither Fedora or CentOS Stream are viable options for people looking for long term stability. There’s a suggestion that cut price RHEL licenses may be available in future, but all we know at this point is CentOS is on a road to nowhere.

One of the options you might want to consider is switching from CentOS 8 to Oracle Linux 8. Oracle Linux is a binary clone of RHEL, like CentOS. Also like CentOS, you can use Oracle Linux for free (downloads here), and that includes free updates.

But what do you do about your existing CentOS 8 installations? Well that’s really easy too, as you can convert them directly to Oracle Linux. Oracle have an overview of the process here, but it boils down to downloading a script from GitHub and running it. Here are the steps I used to do a conversion.

First, take a backup of the system, so you have a fallback restore point.

We display the contents of the “/etc/centos-release” file, which shows we have a CentOS 8.2 installation.

$ cat /etc/centos-release
CentOS Linux release 8.2.2004 (Core)
$

Download the conversion script from the Oracle GitHub repo, and run it. Then wait while it downloads the packaged as switches you from CentOS to Oracle Linux.

curl -O https://raw.githubusercontent.com/oracle/centos2ol/main/centos2ol.sh
sudo bash centos2ol.sh

Reboot the system.

sudo reboot

We now have an Oracle Linux server running the UEK kernel.

$ sudo cat /etc/oracle-release
Oracle Linux Server release 8.3
$ uname -r
5.4.17-2036.101.2.el8uek.x86_64
$

If you don’t want to use the UEK kernel, you can switch to the Red Hat Compatibility Kernel really easily. List the current kernels.

$ ls -l /boot/vmlinuz-*
-rwxr-xr-x. 1 root root 8913656 Oct 22 22:59 /boot/vmlinuz-0-rescue-5fd85e2afa24422eb63894e2dbfa9898
-rwxr-xr-x. 1 root root 8975912 Dec 18 18:07 /boot/vmlinuz-0-rescue-caad1bd0b25943b1b526a131661074b3
-rwxr-xr-x. 1 root root 8920200 Sep 14 14:45 /boot/vmlinuz-4.18.0-193.19.1.el8_2.x86_64
-rwxr-xr-x. 1 root root 9520664 Dec 16 00:42 /boot/vmlinuz-4.18.0-240.8.1.el8_3.x86_64
-rwxr-xr-x. 1 root root 8975912 Dec 3 02:02 /boot/vmlinuz-5.4.17-2036.101.2.el8uek.x86_64
$

Set the latest Red Hat Compatibility Kernel as the default. It will be the highest version one without “uek” in the name.

$ sudo grubby --set-default /boot/vmlinuz-4.18.0-240.8.1.el8_3.x86_64
The default is /boot/loader/entries/caad1bd0b25943b1b526a131661074b3-4.18.0-240.8.1.el8_3.x86_64.conf with index 3 and kernel /boot/vmlinuz-4.18.0-240.8.1.el8_3.x86_64
$

Reboot the server.

$ sudo reboot

Now we are using the Red Hat Compatibility Kernel rather than UEK.

$ cat /etc/oracle-release
Oracle Linux Server release 8.3
$
$ uname -r
4.18.0-240.8.1.el8_3.x86_64
$

Easy!

At this point we need to do some testing to make sure we are happy with the final result!

This type of switch may not be the preferred solution for every system, but it’s simple and saves you doing a full rebuild to switch to another distribution.

If you’re still not sure about Oracle Linux, here’s a FAQ post I wrote about it.

Cheers

Tim…

ClamAV on Fedora and Enterprise Linux…

Following on from my post on AntiVirus Software and Apple Macs, I decided to add antivirus to my desktop machines also. I chose ClamAV because it is part of the Fedora repository. I wrote a quick note about installing ClamAV on Fedora and Enterprise Linux (RHEL, Oracle Linux, CentOS etc.).

Not surprisingly, scans revealed no viruses on any of my Fedora machines.

Cheers

Tim…