Operations 5 min read

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.

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

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_64
CentOS 8 version check
CentOS 8 version check

Download 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.sh

Run the migration

Execute the script to replace installed packages with their Oracle Linux equivalents and update the boot loader:

# ./centos2ol.sh

When the script finishes, reboot the machine:

# reboot
GRUB menu after migration
GRUB menu after migration

During 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_64

The system now runs Oracle Linux Server 8.4 with the UEK kernel, providing a stable, performance‑focused replacement for CentOS 8.

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.

LinuxCentOSBash scriptOS MigrationOracle LinuxUEK
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.