Migrate from CentOS Stream to Alma/Rocky Linux Without Reinstalling the System

Some merchants’ machines may fail to reinstall the operating system using traditional dd methods. In this scenario, you can use the migration scripts provided by Alma/Rocky Linux to one-click migrate from CentOS Stream to Alma/Rocky Linux, and the operation is very simple.

Migrate to AlmaLinux

Refer to AlmaLinux’s official migration guide, which supports migrating various EL 8/9 systems to AlmaLinux.

Execute the following commands on the system to be migrated:

sudo dnf update -y
curl -O https://raw.githubusercontent.com/AlmaLinux/almalinux-deploy/master/almalinux-deploy.sh
sudo bash almalinux-deploy.sh

If everything proceeds normally, you can restart the system to complete the migration.

Migrate to RockyLinux

RockyLinux provides a similar migration script that supports migrating various EL 8/9 systems to RockyLinux.

Among them, migrate2rocky.sh is suitable for EL 8, and migrate2rocky9.sh is suitable for EL 9. Execute the following commands on the system to be migrated:

wget https://raw.githubusercontent.com/rocky-linux/rocky-tools/main/migrate2rocky/migrate2rocky9.sh
chmod +x migrate2rocky9.sh
./migrate2rocky.sh -r

If everything proceeds normally, you can restart the system to complete the migration.

Notes

For servers in mainland China, it is recommended to manually edit the script to replace the default mirror source before running the migration script, otherwise the download may get stuck or even fail.