oracle / centos2ol

Script and documentation to switch CentOS/Rocky Linux to Oracle Linux
https://linux.oracle.com/switch/centos/
Universal Permissive License v1.0
344 stars 81 forks source link

unable to Switch from CentOS 8 to Oracle Linux 8 #172

Closed sharans147 closed 4 months ago

sharans147 commented 4 months ago

Hi Team,

We are trying to migrate the server from CentOS Linux release 8.0.1905 (Core) to Oracle Linux 8.0. but getting error while running Centos2ol script. Kindly check and provide solution to migrate.

Error code:

scoter-oracle commented 4 months ago

Hi, can you share the full log of the execution ?

sharans147 commented 4 months ago

centos2ol-script.txt CentOS Convertion script error.txt

sharans147 commented 4 months ago

Uploaded the script which we have used and error full output

sharans147 commented 4 months ago

Hi, can you share the full log of the execution ?

uploaded the logs

scoter-oracle commented 4 months ago

Please, execute the following commands on your CentOS 8 machine:

# sudo sed -i -e "s|mirrorlist=|#mirrorlist=|g" /etc/yum.repos.d/CentOS- # sudo sed -i -e "s|#baseurl=http://mirror.centos.org|baseurl=http://vault.centos.org|g" /etc/yum.repos.d/CentOS- # dnf install centos-linux-repos -y

then retry the migration.

sharans147 commented 4 months ago

Hi Simon Coter,

Already server having below entry in /etc/yum.repos.d/ directory.

[BaseOS] name=CentOS-$releasever - Base

mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=BaseOS&infra=$infra

baseurl=http://mirror.centos.org/$contentdir/$releasever/BaseOS/$basearch/os/

baseurl=https://vault.centos.org/8.0.1905/BaseOS/x86_64/os/

baseurl=http://vault.centos.org

gpgcheck=1 enabled=1 gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-centosofficial

======================================= [AppStream] name=CentOS-$releasever - AppStream

mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=AppStream&infra=$infra

baseurl=http://mirror.centos.org/$contentdir/$releasever/AppStream/$basearch/os/

baseurl=http://vault.centos.org/$contentdir/$releasever/AppStream/$basearch/os/

baseusr=https://vault.centos.org/8.0.1905/AppStream/x86_64/os/

baseurl=http://vault.centos.org

baseurl=http://vault.epel.cloud

gpgcheck=1 enabled=1 gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-centosofficial

scoter-oracle commented 4 months ago

Ok, so it seems that you're missing the "centos-linux-repos" RPM installed on your system and presumably this is due to the very old release you're running (8.0.1905)

sharans147 commented 4 months ago

Hi Simon Coter,

Can we try after run the dnf update on the server ?

scoter-oracle commented 4 months ago

I did a quick test with CentOS 8.0.1905 and I didn't need to update the system before migrating. I just needed to install the RPM below:

# dnf install centos-linux-repos -y

and due to the fact that my yum repositories didn't point to vault.centos.org, also update the entries. If your yum repositories are already properly configured, you just need to install the RPM and then retry the migration.

sharans147 commented 4 months ago

Hi Team,

We have tried below command and got the below error.

dnf install centos-linux-repos -y

[root@gitlab-app modules.d]# dnf install centos-linux-repos -y Last metadata expiration check: 0:07:00 ago on Mon 06 May 2024 10:07:08 PM IST. No match for argument: centos-linux-repos Error: Unable to find a match: centos-linux-repos

[root@gitlab-app modules.d]# yum update -... by Srinivasalu Srinivasalu Yesterday 10:15 PM

[root@gitlab-app modules.d]# yum update --allowerasing Last metadata expiration check: 0:08:02 ago on Mon 06 May 2024 10:07:08 PM IST. Error: Problem 1: problem with installed package qemu-kvm-core-15:2.12.0-64.module_el8.0.0+44+94c1b039.2.x86_64

Thanks, Saravanan Natarajan

sharans147 commented 4 months ago

Hi Team,

We have tried below command and got below error

dnf install centos-linux-repos -y Last metadata expiration check: 0:16:03 ago on Tue 07 May 2024 05:40:59 PM IST. No match for argument: centos-linux-repos Error: Unable to find a match: centos-linux-repos [root@gitlab-app ~]# yum update Last metadata expiration check: 0:16:11 ago on Tue 07 May 2024 05:40:59 PM IST. Dependencies resolved. Nothing to do. Complete!

scoter-oracle commented 4 months ago

I suspect that you have a customized yum configuration on your CentOS machine; this is my test environment:

[root@centos8 ~]# cat /etc/centos-release CentOS Linux release 8.0.1905 (Core)

[root@centos8 ~]# dnf info centos-linux-repos Last metadata expiration check: 0:00:31 ago on Tue 07 May 2024 12:50:49 PM UTC. Available Packages Name : centos-linux-repos Version : 8 Release : 3.el8 Arch : noarch Size : 20 k Source : centos-repos-8-3.el8.src.rpm Repo : BaseOS Summary : CentOS Linux package repositories URL : https://centos.org License : GPLv2 Description : This package provides the package repository files for CentOS Linux.

and this is the installation of that package on a 8.0 CentOS system:

[root@centos8 ~]# dnf install -y centos-linux-repos Last metadata expiration check: 0:01:18 ago on Tue 07 May 2024 12:50:49 PM UTC. Dependencies resolved.

Package Arch Version Repository Size

Installing: centos-linux-repos noarch 8-3.el8 BaseOS 20 k Installing dependencies: centos-gpg-keys noarch 1:8-3.el8 BaseOS 12 k centos-linux-release noarch 8.5-1.2111.el8 BaseOS 22 k replacing centos-release.x86_64 8.0-0.1905.0.9.el8

Transaction Summary

Install 3 Packages

Total download size: 54 k Downloading Packages: (1/3): centos-gpg-keys-8-3.el8.noarch.rpm 11 kB/s | 12 kB 00:01 (2/3): centos-linux-release-8.5-1.2111.el8.noarch.rpm 21 kB/s | 22 kB 00:01 (3/3): centos-linux-repos-8-3.el8.noarch.rpm 18 kB/s | 20 kB 00:01

Total 50 kB/s | 54 kB 00:01 Running transaction check Transaction check succeeded. Running transaction test Transaction test succeeded. Running transaction Preparing : 1/1 Running scriptlet: centos-gpg-keys-1:8-3.el8.noarch 1/1 Installing : centos-gpg-keys-1:8-3.el8.noarch 1/4 Installing : centos-linux-release-8.5-1.2111.el8.noarch 2/4 Installing : centos-linux-repos-8-3.el8.noarch 3/4 Obsoleting : centos-release-8.0-0.1905.0.9.el8.x86_64 4/4 warning: /etc/yum.repos.d/CentOS-fasttrack.repo saved as /etc/yum.repos.d/CentOS-fasttrack.repo.rpmsave warning: /etc/yum.repos.d/CentOS-centosplus.repo saved as /etc/yum.repos.d/CentOS-centosplus.repo.rpmsave warning: /etc/yum.repos.d/CentOS-Sources.repo saved as /etc/yum.repos.d/CentOS-Sources.repo.rpmsave warning: /etc/yum.repos.d/CentOS-PowerTools.repo saved as /etc/yum.repos.d/CentOS-PowerTools.repo.rpmsave warning: /etc/yum.repos.d/CentOS-Extras.repo saved as /etc/yum.repos.d/CentOS-Extras.repo.rpmsave warning: /etc/yum.repos.d/CentOS-Base.repo saved as /etc/yum.repos.d/CentOS-Base.repo.rpmsave warning: /etc/yum.repos.d/CentOS-AppStream.repo saved as /etc/yum.repos.d/CentOS-AppStream.repo.rpmsave

Running scriptlet: centos-release-8.0-0.1905.0.9.el8.x86_64 4/4 Verifying : centos-gpg-keys-1:8-3.el8.noarch 1/4 Verifying : centos-linux-release-8.5-1.2111.el8.noarch 2/4 Verifying : centos-release-8.0-0.1905.0.9.el8.x86_64 3/4 Verifying : centos-linux-repos-8-3.el8.noarch 4/4

Installed: centos-linux-repos-8-3.el8.noarch centos-gpg-keys-1:8-3.el8.noarch centos-linux-release-8.5-1.2111.el8.noarch

Complete!

sharans147 commented 4 months ago

Hi,

Now we have upgraded to oracle Linux 8.9. kindly share the post validation details to check from OS end after OS upgrade.

how we confirm whether its successfully upgraded or not

[root@gitlab-app ~]# cat /etc/*release Oracle Linux Server release 8.9 NAME="Oracle Linux Server" VERSION="8.9" ID="ol" ID_LIKE="fedora" VARIANT="Server" VARIANT_ID="server" VERSION_ID="8.9" PLATFORM_ID="platform:el8" PRETTY_NAME="Oracle Linux Server 8.9" ANSI_COLOR="0;31" CPE_NAME="cpe:/o:oracle:linux:8:9:server" HOME_URL="https://linux.oracle.com/" BUG_REPORT_URL="https://github.com/oracle/oracle-linux"

ORACLE_BUGZILLA_PRODUCT="Oracle Linux 8" ORACLE_BUGZILLA_PRODUCT_VERSION=8.9 ORACLE_SUPPORT_PRODUCT="Oracle Linux" ORACLE_SUPPORT_PRODUCT_VERSION=8.9 Red Hat Enterprise Linux release 8.9 (Ootpa) Oracle Linux Server release 8.9

Thanks, Saravanan Natarajan

scoter-oracle commented 4 months ago

It is successfully migrated to Oracle Linux as soon as your systems boots with the updated kernel coming from Oracle Linux repositories and the files /etc/*release files

sharans147 commented 4 months ago

Hi Scoter,

We could see mixed packages on the server. kindly see below the details.

it seems the server is running with mixed packages.

[root@gitlab-app ~]# uname -r

5.4.17-2136.330.7.1.el8uek.x86_64

[root@gitlab-app ~]# yum list installed |wc -l

1444

[root@gitlab-app ~]# yum list installed |grep ol8 |wc -l

1394

[root@gitlab-app ~]# yum list installed |grep -i "@appstream" |wc -l

38

===================================== [root@gitlab-app ~]# yum list installed |grep -i "@appstream"

centos-indexhtml.noarch 8.0-0.el8 @AppStream

insights-client.noarch 3.0.5-4.el8 @AppStream

libiscsi.x86_64 1.18.0-8.module_el8.5.0+746+bbd5d70c @AppStream

libssh2.x86_64 1.8.0-8.module_el8.0.0+189+f9babebb.1 @AppStream

libvirt-daemon.x86_64 6.0.0-37.module_el8.5.0+1002+36725df2 @AppStream

libvirt-daemon-config-network.x86_64 6.0.0-37.module_el8.5.0+1002+36725df2 @AppStream

libvirt-daemon-driver-interface.x86_64 6.0.0-37.module_el8.5.0+1002+36725df2 @AppStream

libvirt-daemon-driver-network.x86_64 6.0.0-37.module_el8.5.0+1002+36725df2 @AppStream

libvirt-daemon-driver-nodedev.x86_64 6.0.0-37.module_el8.5.0+1002+36725df2 @AppStream

libvirt-daemon-driver-nwfilter.x86_64 6.0.0-37.module_el8.5.0+1002+36725df2 @AppStream

libvirt-daemon-driver-qemu.x86_64 6.0.0-37.module_el8.5.0+1002+36725df2 @AppStream

libvirt-daemon-driver-secret.x86_64 6.0.0-37.module_el8.5.0+1002+36725df2 @AppStream

libvirt-daemon-driver-storage.x86_64 6.0.0-37.module_el8.5.0+1002+36725df2 @AppStream

libvirt-daemon-driver-storage-core.x86_64 6.0.0-37.module_el8.5.0+1002+36725df2 @AppStream

libvirt-daemon-driver-storage-disk.x86_64 6.0.0-37.module_el8.5.0+1002+36725df2 @AppStream

libvirt-daemon-driver-storage-gluster.x86_64 6.0.0-37.module_el8.5.0+1002+36725df2 @AppStream

libvirt-daemon-driver-storage-iscsi.x86_64 6.0.0-37.module_el8.5.0+1002+36725df2 @AppStream

libvirt-daemon-driver-storage-iscsi-direct.x86_64 6.0.0-37.module_el8.5.0+1002+36725df2 @AppStream

libvirt-daemon-driver-storage-logical.x86_64 6.0.0-37.module_el8.5.0+1002+36725df2 @AppStream

libvirt-daemon-driver-storage-mpath.x86_64 6.0.0-37.module_el8.5.0+1002+36725df2 @AppStream

libvirt-daemon-driver-storage-rbd.x86_64 6.0.0-37.module_el8.5.0+1002+36725df2 @AppStream

libvirt-daemon-driver-storage-scsi.x86_64 6.0.0-37.module_el8.5.0+1002+36725df2 @AppStream

libvirt-daemon-kvm.x86_64 6.0.0-37.module_el8.5.0+1002+36725df2 @AppStream

libvirt-libs.x86_64 6.0.0-37.module_el8.5.0+1002+36725df2 @AppStream

netcf-libs.x86_64 0.2.8-12.module_el8.5.0+746+bbd5d70c @AppStream

qemu-guest-agent.x86_64 15:4.2.0-59.module_el8.5.0+1063+c9b9feff.1 @AppStream

qemu-img.x86_64 15:2.12.0-65.module_el8.0.0+189+f9babebb.5 @AppStream

qemu-kvm.x86_64 15:2.12.0-65.module_el8.0.0+189+f9babebb.5 @AppStream

qemu-kvm-block-curl.x86_64 15:2.12.0-65.module_el8.0.0+189+f9babebb.5 @AppStream

qemu-kvm-block-gluster.x86_64 15:2.12.0-65.module_el8.0.0+189+f9babebb.5 @AppStream

qemu-kvm-block-iscsi.x86_64 15:2.12.0-65.module_el8.0.0+189+f9babebb.5 @AppStream

qemu-kvm-block-rbd.x86_64 15:2.12.0-65.module_el8.0.0+189+f9babebb.5 @AppStream

qemu-kvm-block-ssh.x86_64 15:2.12.0-65.module_el8.0.0+189+f9babebb.5 @AppStream

qemu-kvm-common.x86_64 15:2.12.0-65.module_el8.0.0+189+f9babebb.5 @AppStream

qemu-kvm-core.x86_64 15:2.12.0-65.module_el8.0.0+189+f9babebb.5 @AppStream

seabios-bin.noarch 1.13.0-2.module_el8.5.0+746+bbd5d70c @AppStream

seavgabios-bin.noarch 1.13.0-2.module_el8.5.0+746+bbd5d70c @AppStream

sgabios-bin.noarch 1:0.20170427git-3.module_el8.5.0+746+bbd5d70c @AppStream

scoter-oracle commented 4 months ago

this is expected.