Migrate CentOS 8 to Oracle Linux with the centos2ol.sh Script
This step‑by‑step guide explains how to verify your CentOS 8 environment, download and prepare Oracle's centos2ol.sh migration script, run it to replace packages and switch to the Oracle Linux kernel, reboot, and confirm the successful migration to Oracle Linux Server with UEK.
Oracle Linux is a RHEL‑compatible distribution that can replace CentOS 8. This guide shows how to migrate an existing CentOS 8 system to Oracle Linux using the official centos2ol.sh script.
Prerequisites
System is running CentOS 8 Minimal. Verify OS version and kernel:
# cat /etc/os-release
NAME="CentOS Linux"
VERSION="8 (Core)"
ID="centos"
ID_LIKE="rhel fedora"
VERSION_ID="8"
PRETTY_NAME="CentOS Linux 8 (Core)"
# uname -r
4.18.0-240.15.1.el8_3.x86_64Download and prepare the migration script
Download the script from Oracle's GitHub repository and make it executable:
# wget https://raw.githubusercontent.com/oracle/centos2ol/main/centos2ol.sh
# chmod +x centos2ol.shRun the migration
Execute the script to replace installed packages with their Oracle Linux equivalents and update the boot loader:
# ./centos2ol.shWhen the script finishes, reboot the machine:
# rebootDuring boot, GRUB now shows two new entries: one for the standard Linux kernel and one for the Unbreakable Enterprise Kernel (UEK).
Verify the new system
Check the OS release file and kernel version to confirm the migration:
# cat /etc/os-release
NAME="Oracle Linux Server"
VERSION="8.4"
ID="ol"
ID_LIKE="fedora"
VERSION_ID="8.4"
PRETTY_NAME="Oracle Linux Server 8.4"
# uname -r
5.4.17-2102.202.5.el8uek.x86_64The system now runs Oracle Linux Server 8.4 with the UEK kernel, providing a stable, performance‑focused replacement for CentOS 8.
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.
