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.
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_64Download 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.shRun 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_64Conclusion
The CentOS 8 system is now fully migrated to Oracle Linux Server with the UEK kernel, providing a stable, supported alternative to CentOS.
Signed-in readers can open the original source through BestHub's protected redirect.
This article has been distilled and summarized from source material, then republished for learning and reference. If you believe it infringes your rights, please contactand we will review it promptly.
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.)
How this landed with the community
Was this worth your time?
0 Comments
Thoughtful readers leave field notes, pushback, and hard-won operational detail here.
