Migrate2rocky.sh error

I get the following error when attempting to migrate from Rocky 8.6 to 9 using the migrate2rocky.sh script:

migrate2rocky - Begin logging at Thu 29 Sep 2022 10:33:59 AM CDT.

Updating Subscription Management repositories.
Unable to read consumer identity

This system is not registered with an entitlement server. You can use subscription-manager to register.

Removing dnf cache
Preparing to migrate Rocky Linux 8.6 (Green Obsidian) to Rocky Linux 8.

Determining repository names for Rocky Linux 8.6 (Green Obsidian)…

Found the following repositories which map from Rocky Linux 8.6 (Green Obsidian) to Rocky Linux 8:
Rocky Linux 8.6 (Green Obsidian) Rocky Linux 8
appstream appstream
powertools devel
baseos baseos
extras extras
powertools powertools

Getting system package names for Rocky Linux 8.6 (Green Obsidian)
Found a full or partial RockyLinux install already in place. Aborting

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

Hi @wildbi111 - The migrate2rocky script is not meant to perform in-place major version upgrades (e.g., from 8 to 9), but rather to facilitate the migration from other Enterprise Linux distributions (like RHEL, CentOS (Stream), Oracle Linux, Alma Linux, and others).

You are safe in this case as nothing was executed, it simply bailed out before starting to make any changes since you are already running Rocky Linux.

As for major version upgrades, there are a few options (like Alma Linux’s ELEvate project and LEAPP data). I believe Oracle recently open sourced their LEAPP data for EL8-9, so ELEvate is able to take advantage of that. However, it is untested from our perspective, and the advice we have for major version upgrades is to reinstall from scratch. It is almost always better to have configuration management in place to perform automation of system lifecycle than to rely on upgrades which may or may not work.

My experience with upgrading EL systems over the years is that it is very rarely worth the time and effort you may spend to end up with a system that may be in an unusable state. For that reason, we tend to not support configurations which have been through an upgrade–there are too many unknowns.

Hope this helps! Please let me know if you have any questions.

Best,
Neil

OK, that’s disappointing. I thought I had a stock Rocky 8.x install and thus thought this upgrade to 9 would be fairly easy. I do not look forward to a complete new install of the OS the reinstall and setup all the applications (apache, mysql, piwigo, shrewall, etc) again.

But the Rocky supplied packages are different in 9, built with different compilers and dependencies, binaries may try to load old libraries, and so on.

This is when ansible comes in really handy. By creating ansible playbooks to configure your server just how you want it, means you can replicate it many times from a clean install.

Obviously however, it means putting everything in the ansible playbook that you did manually to get apache/mysql/etc configured just how you wanted it.

I use it for deploying our web application for our clients, and the playbook will install apache, php, configure php, install and configure mssql-server, etc. Or for example, disaster recovery purposes for restoring our environment in the event of hosting problems/server outage due to hardware failure.

1 Like

Rocky 8 and Rocky 9 are two separate distros. Yes, there are some similarities, but who doesn’t?

Like Ian said, disaster can strike any day and you have to have something for recovery. The fact that you probably can install new distro with slight modifications to the recovery procedure is a bonus. Really worth the initial investment.