rocky-linux / rocky-tools

MIT License
393 stars 137 forks source link

Trying to migrate to Rocky 8 from CentOS 8.5.2111 #198

Open rpyne opened 1 year ago

rpyne commented 1 year ago

Trying to migrate my mail server to Rocky. Fortunately I made a full clone of the VM so at least I'm not completely dead in the water.

migrate2rocky - Begin logging at Mon 17 Apr 2023 01:00:38 AM MDT.

Removing dnf cache Preparing to migrate CentOS Linux 8 to Rocky Linux 8.

Determining repository names for CentOS Linux 8.Importing GPG key 0x5F11735A: Userid : "Remi's RPM repository remi@remirepo.net" Fingerprint: 6B38 FEA7 231F 87F5 2B9C A9D8 5550 9759 5F11 735A From : /etc/pki/rpm-gpg/RPM-GPG-KEY-remi.el8 Importing GPG key 0x5F11735A: Userid : "Remi's RPM repository remi@remirepo.net" Fingerprint: 6B38 FEA7 231F 87F5 2B9C A9D8 5550 9759 5F11 735A From : /etc/pki/rpm-gpg/RPM-GPG-KEY-remi.el8 .....

Found the following repositories which map from CentOS Linux 8 to Rocky Linux 8: CentOS Linux 8 Rocky Linux 8 appstream appstream baseos baseos extras extras

Getting system package names for CentOS Linux 8..........

Found the following system packages which map from CentOS Linux 8 to Rocky Linux 8: CentOS Linux 8 Rocky Linux 8 centos-logos-ipa rocky-logos-ipa centos-backgrounds rocky-backgrounds centos-gpg-keys rocky-gpg-keys centos-logos rocky-logos centos-indexhtml rocky-indexhtml centos-linux-release rocky-release centos-logos-httpd rocky-logos-httpd centos-linux-repos rocky-repos

Getting list of installed system packages.

We will replace the following CentOS Linux 8 packages with their Rocky Linux 8 equivalents Packages to be Removed Packages to be Installed centos-gpg-keys rocky-gpg-keys centos-logos rocky-logos centos-linux-release rocky-release centos-logos-httpd rocky-logos-httpd centos-linux-repos rocky-repos

In addition to the above the following system packages will be removed: centos-linux-release centos-linux-release

Getting a list of enabled modules for the system repositories.

Excluding modules: libselinux-python:2.8

Found the following modules to re-enable at completion: httpd:2.4 mariadb:10.3 nginx:1.14 perl-DBD-MySQL:4.046 perl-DBD-SQLite:1.58 perl-DBI:1.641 perl-FCGI:0.78 perl-IO-Socket-SSL:2.066 perl-libwww-perl:6.34 perl:5.26 python36:3.6

Running dnf update before we attempt the migration. Last metadata expiration check: 0:02:01 ago on Mon Apr 17 01:01:52 2023. Error: Problem 1: cannot install the best update candidate for package clamav-0.103.5-1.el8.x86_64

Error running pre-update. Stopping now to avoid putting the system in an unstable state. Please correct the issues shown here and try again.

An error occurred while we were attempting to convert your system to Rocky Linux. Your system may be unstable. Script will now exit to preve nt possible damage.

pajamian commented 1 year ago

It appears that there are certain 3rd-party repos that no longer work with CentOS 8.5 because they are expecting newer packages than those provided by that old release of CentOS, so it's causing the pre-update to fail.

The pre-update is done before any changes are made to your system so that a failed update will stop the migration before damage is done, your system should not need to be restored from your snapshot at this stage, but it's a good idea that you took one anyways.

Can you try this:

dnf repolist --enabled remi\* epel\* # make a note of the resulting repos
dnf config-manager --disable epel\* remi\*
migrate2rocky -r
dnf config-manager --enable <repos that you noted in the first step above>
dnf update

Let me know if it works, if so I'll make a change to migrate2rocky that I'd like you to test at that point as well.

rpyne commented 1 year ago

Thank you. Other than some file conflicts with ImageMagick, that worked perfectly. I had to remove ImageMagick and ImageMagick-libs and re-install them manually.

pajamian commented 1 year ago

Thanks for the feedback. I will work on an update that does these steps automatically and get back to you for testing.

junjie-cloud commented 1 year ago

wow