Operations 5 min read

Migrate CentOS 8 to Oracle Linux Using the Official centos2ol.sh Script

This guide walks you through checking your current CentOS 8 environment, downloading the Oracle‑provided centos2ol.sh script, executing it to replace packages and switch kernels, and verifying the successful migration to Oracle Linux Server with the Unbreakable Enterprise Kernel.

Liangxu Linux
Liangxu Linux
Liangxu Linux
Migrate CentOS 8 to Oracle Linux Using the Official centos2ol.sh Script

Oracle Linux is a binary‑compatible alternative to CentOS 8, built from Red Hat Enterprise Linux sources and offered with two kernels: the default RHEL‑based kernel and Oracle's Unbreakable Enterprise Kernel (UEK) optimized for performance and stability.

Prerequisites and Environment Check

Start from a CentOS 8 Minimal installation. Verify the OS version and kernel:

[root@localhost ~]# cat /etc/os-release
NAME="CentOS Linux"
VERSION="8 (Core)"
...
[root@localhost ~]# uname -r
4.18.0-240.15.1.el8_3.x86_64

Download and Prepare the Migration Script

The Oracle GitHub repository provides centos2ol.sh, which supports migration from CentOS 6, 7, 8 (but not CentOS Stream). Retrieve it with wget or curl and make it executable:

wget https://raw.githubusercontent.com/oracle/centos2ol/main/centos2ol.sh
chmod +x centos2ol.sh

Run the Migration

Execute the script to start the automated conversion of installed packages to their Oracle Linux equivalents and to install the appropriate kernel: ./centos2ol.sh The script lists the packages it will replace and then performs the changes.

Reboot and Verify

Reboot the system. The GRUB menu now shows two entries for Oracle Linux Server: one for the standard kernel and one for UEK. [root@localhost ~]# reboot After boot, confirm the new OS release and kernel:

cat /etc/os-release
NAME="Oracle Linux Server"
VERSION="8.4"
...
uname -r
5.4.17-2102.202.5.el8uek.x86_64

Conclusion

The CentOS 8 system is now fully migrated to Oracle Linux Server with the UEK kernel, providing a stable, supported alternative to CentOS.

Original Source

Signed-in readers can open the original source through BestHub's protected redirect.

Sign in to view source
Republication Notice

This article has been distilled and summarized from source material, then republished for learning and reference. If you believe it infringes your rights, please contactadmin@besthub.devand we will review it promptly.

Linux kernelCentOSBash scriptOS MigrationOracle Linux
Liangxu Linux
Written by

Liangxu Linux

Liangxu, a self‑taught IT professional now working as a Linux development engineer at a Fortune 500 multinational, shares extensive Linux knowledge—fundamentals, applications, tools, plus Git, databases, Raspberry Pi, etc. (Reply “Linux” to receive essential resources.)

0 followers
Reader feedback

How this landed with the community

Sign in to like

Rate this article

Was this worth your time?

Sign in to rate
Discussion

0 Comments

Thoughtful readers leave field notes, pushback, and hard-won operational detail here.