How to migrate CentOS 7 to Rock Linux 8

Hello. Some of my servers are on CentOS 7 operating system. The documentation for migrating to Rocky Linux is for CentOS version 8. How can I migrate from CentOS 7 to Rock Linux 8?

Iā€™m in the process of doing that upgrade myself, but a fresh install is the way to go I think, then copy over things from the old Centos 7.

The recommended way forward is a migration. One of these things could be done:

  • Backups of data are taken and restored on a freshly installed Rocky 8 system
  • A new Rocky 8 system is installed in parallel of your CentOS 7 machine and you perform a migration of configuration and data

Can leapp utility be utilised since it works with Redhat based Distros?

Red Hat wrote leapp for RHEL, didnā€™t they? Only for RHEL, not for RHEL-based distros. Furthermore, it does not work for everyone.

AlmaLinux has ELevate project: AlmaLinux OS - ELevate Your Distribution
It uses leapp with data (initially from Oracle) to work with RHEL-based distros. Like RHEL ā†’ RHEL leapp, ELevate does not work for all setups. So yes, ā€œcan be utilisedā€, but with huge caveats.

Personally, I prefer the ā€˜migrationā€™: fresh install, apply appropriate configuration, and bring in user data.

Thank you. See a guide on this migration. Give me your feedback.

That ā€œguideā€ makes no sense today

  • There has never been supported in-place conversion from one major version of CentOS Linux into another major version of CentOS Linux
  • There is no more CentOS Linux 8
  • The ELevate supposedly does all those steps for you

This guide is on CentOS 7 to Rocky Linux 8. It has nothing to do with CentOS Linux 8.

But in short, and true agreeing with you on Elevate, there is also another way of doing it.

All said and done, Rocky Linux 8.5 is such a beauty. Good day.

Nothing to do? Their summary:

  1. Upgrade CentOS 7 to CentOS 8
  2. Migrate from CentOS 8 to Rocky Linux

Looks very much ā€œCentOS 8ā€-related

Tell me more about ELevate. Would love to do an article on it and research more. Any guide sir?

Jlehtone, thank you so much. I have checked on ELevate. Thumbs up men.

1 Like

@jlehtone good evening. Where can I get the official Elevate Documentation? Thank you

I canā€™t tell for sure. People at the ā€˜Migrationā€™ channel of chat.almalinux.org should know. About ELevate project | AlmaLinux Wiki is probably part of it, and the upstream documentation of the Leapp is part of it too.

Personally, I rather do clean installs than attempt in-place migrations.

Thank you @jlehtone . Am working on an article on AlmaLinux upgrade from 8 to 9. I will major on the Elevate approach and see how it goes . I am a content writer.

Thank you

@Jil Take a look at this thread: Rocky Linux 8 upgrade to Rocky Linux 9

This procedure more or less works, but requires adapting manually depending on what is installed on the machine. Itā€™s not exactly automated as such, like what elevate would most likely do. I had to change a few commands for mine to work, removing some stuff that got in the way (ruby-irb). But other than that it wasnā€™t too bad. That said, anything can happen, so no guarantees.

Mileage will vary though, clean install being the official and preferred method.

1 Like

I had to revisit this topic for work so decided to update the thread.

I can say that the recompiled the leapp tools from the Alma Linux ELevate repository now fully supports migration of CentOS 7 to Rocky Linux 8. My experience was pretty smooth when using elevate-release-1.0-2.el7.noarch.rpm along with leapp-data-rocky-0.1-6.el7.noarch.rpm.

It has the same limits as the upstream leapp tool does from Red Hat. Meaning if you have third party repositories and RPMs installed running leapp preupgrade and leapp upgrade may require:

  • Enabling the third party repositories
  • Appending third party repositories to /etc/leapp/files/leapp_upgrade_repositories.repo
  • Completely removing third party RPMs and repositories

Using rpm -e --nodeps to ā€œwork aroundā€ RPM conflict issues, leaving non conflicting RPMs installed is likely to break the upgrade and result in a machine which does not boot even if the transaction checks report no issues.

Iā€™m not suggesting anyone race out and make this their upgrade process. It is possible to do with a ā€œplain vanillaā€ CentOS 7. However if you have a ā€œplain vanillaā€ CentOS 7 I also see no reason taking a backup and restoring after a clean installation would not be the default choice for upgrade.

1 Like