Share on Social Media

In this Linux tutorial, you will learn how to migrate CentOS 8 to Oracle Linux, which is another CentOS alternative from the third largest software company in the world. #centlinux #linux #oracle

What is Oracle Linux?

Oracle Linux is a Linux distribution packaged and freely distributed by Oracle, available partially under the GNU General Public License since late 2006. It is compiled from Red Hat Enterprise Linux source code, replacing Red Hat branding with Oracle’s. It is also used by Oracle Cloud and Oracle Engineered Systems such as Oracle Exadata and others.

Oracle Linux is free to download from Oracle E-delivery service under GNU GPL License, but the technical Support has a cost.

Oracle Linux is shipped with two Kernels, first is the default Linux Kernel compiled from the source code of respective Red Hat Enterprise Linux (RHEL) version.

While the second is the Unbreakable Enterprise Kernel (UEK), Which is a Linux kernel built by Oracle and supported through Oracle Linux support. Its focus is performance, stability, and minimal backports by tracking the mainline source code as closely as is practical. UEK is well-tested and used to run Oracle’s Engineered Systems, Oracle Cloud Infrastructure, and large enterprise deployments for Oracle customers.

Recommended Book: Practical Guide to Linux Commands, Editors, and Shell Programming (PAID LINK) by Mark Sobell & Matthew Helmke
Recommended Online Training: Learn Bash Shell in Linux for Beginners

745772 0021

Environment Specification

We are using a minimal CentOS 8 virtual machine with following specifications.

  • CPU – 3.4 Ghz (2 cores)
  • Memory – 2 GB
  • Storage – 20 GB
  • Operating System – CentOS 8.2
  • Hostname –
  • IP Address – /24

Checking Current Linux OS

By using a SSH client, connect with as root user.

Execute following commands to check the version of your Linux operating system.

# cat /etc/os-release
NAME="CentOS Linux"
ID_LIKE="rhel fedora"
PRETTY_NAME="CentOS Linux 8"

# cat /etc/centos-release
CentOS Linux release 8.3.2011

Check the version of current Linux Kernel.

# uname -r

Migrate CentOS 8 to Oracle Linux

Oracle’s GitHub Repository provides a Linux bash script This script supports migration from CentOS Linux 6, 7 & 8 but it do not supports CentOS Stream.

You can easily download script from GitHub by using the wget or curl commands.

# wget
--2021-07-10 19:37:18--
Resolving (,,, ...
Connecting to (||:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 21609 (21K) [text/plain]
Saving to: ‘’        100%[===================>]  21.10K  8.51KB/s    in 2.5s

2021-07-10 19:37:34 (8.51 KB/s) - ‘’ saved [21609/21609]

Grant execution permissions on to everyone.

# chmod +x

According to documentation, please check and adjust following prerequisites.

  1. Because of the GRUB2 BootHole vulnerability, our SecureBoot shim can only boot kernels signed by Oracle and we can only replace the default CentOS kernels. While this may not have an impact if SecureBoot is currently disabled, enabling it at a later date could render the system unbootable. For that reason, we strongly recommend removing all non-standard kernels, i.e. any kernel that is installed that is not provided by either the base or updates repo. This includes the centosplus kernels.
  2. Ensure your CentOS yum or dnf configuration is working, i.e. there are no stale repositories.
  3. Disable all non-CentOS repositories. You can re-enable the repos after the switch.
  4. Ensure you have at least 5GB of free space in /var/cache.
  5. All automatic updates, e.g. via yum-cron should be disabled.

When ready, execute script to start migration process for your Linux operating system.

# ./
Checking for required packages...
Checking your distribution...
package epel-release is not installed
Checking for yum lock...
Checking for required python packages...
Identifying dnf modules that are enabled
Finding your repository directory...
Learning which repositories are enabled...
Repositories enabled before update include:
Looking for yumdownloader...
Backing up and removing old repository files...
Removing CentOS-specific yum configuration from /etc/yum.conf
Downloading Oracle Linux release package...

The script list down the installed packages and then replaces the CentOS standard yum repositories with that of Oracle Linux. downloading packages downloading packages installing packages installing packages

During the migration process your Linux operating system packages has been replaced by the respective Oracle Linux supported software packages.

centos2ol completed migration
centos2ol completed migration script has finished it’s work. Reboot your machine to start your operating system with new Linux Kernel.

# reboot

During system startup, the GRUB menu is now displaying two new entries for Oracle Linux Server. One for the standard Linux kernel, while the other is for the Unbreakable Enterprise Kernel (UEK).

Boot your Linux server with UEK.

oracle linux grub menu
oracle linux grub menu

After successful startup, you will reach at the Linux commandline (CLI) based login prompt.

oracle linux cli login
oracle linux cli login

Login as root user.

Checking New Linux Operating System

Check the current operating system version by executing following commands.

# cat /etc/os-release
NAME="Oracle Linux Server"
PRETTY_NAME="Oracle Linux Server 8.4"


# cat /etc/oracle-release
Oracle Linux Server release 8.4

Also check the version of your new Linux Kernel.

# uname -r

Final Thoughts

Embarking on the journey to migrate from CentOS 8 to Oracle Linux is a strategic move towards stability and reliability. Our comprehensive guide ensures a smooth transition, safeguarding your data and maintaining operational continuity.

For personalized assistance or specialized requirements during the migration process, I offer expert services tailored to your needs. Explore my expertise and service offerings on my Fiverr profile:

Linux System Administration

Let me guide you through the migration journey, ensuring a seamless shift from CentOS 8 to Oracle Linux, and empowering your system with enhanced performance and support.

Leave a Reply

Your email address will not be published. Required fields are marked *