Migrate to Rocky Linux
Rocky Linux ships official migration tooling (migrate2rocky) that converts EL-compatible distributions to Rocky within the same major version. Cross-major upgrades (e.g. CentOS 7 → Rocky 8/9/10) are out of scope for that tool — see the paths at the end.
Tools and scope
Section titled “Tools and scope”| Source | Target | Tool | Notes |
|---|---|---|---|
| CentOS 8 / Stream 8 | Rocky 8 | migrate2rocky.sh | Official script; swaps release packages and repos |
| AlmaLinux 8 / Oracle 8 / RHEL 8 | Rocky 8 | migrate2rocky.sh | Same |
| CentOS Stream 9 / Alma 9 / RHEL 9 | Rocky 9 | migrate2rocky9.sh | EL 9 variant |
| CentOS 7 | Rocky 8+ | Two steps | ELevate→Alma 8 first (or reinstall), then convert/migrate |
Migration flow (same major version, EL 8/9)
Section titled “Migration flow (same major version, EL 8/9)”-
Back up and snapshot: full backup of data and configs; VM snapshot (see backup strategy (main-site reference ↗)).
-
Pre-checks: source minor reasonably current, no half-configured packages, third-party repos inventoried.
-
Fetch the script (official repo is authoritative; EL 8 and EL 9 scripts differ):
Terminal window # EL 8 sourcescurl -LO https://raw.githubusercontent.com/rocky-linux/rocky-tools/main/migrate2rocky/migrate2rocky.shchmod +x migrate2rocky.sh# EL 9 sources (do not reuse the EL 8 script)curl -LO https://raw.githubusercontent.com/rocky-linux/rocky-tools/main/migrate2rocky/migrate2rocky9.shchmod +x migrate2rocky9.sh -
Run the conversion (pick by source major version):
Terminal window sudo ./migrate2rocky.sh -r # EL 8 → Rocky 8sudo ./migrate2rocky9.sh -r # EL 9 → Rocky 9 -
Reboot and verify:
After the reboot, confirm the distro identity switched (
cat /etc/os-releaseshould report Rocky), then re-check services and repositories. -
Post-migration checks: walk the post-migration checklist (main-site reference ↗) (service autostart, firewall, SELinux contexts, cron).
Two paths from CentOS 7
Section titled “Two paths from CentOS 7”CentOS 7 has reached end of support, and ELevate does not support Rocky as an upgrade target (current targets: AlmaLinux / Kitten / CentOS Stream):
- Reinstall-and-migrate (recommended for production): fresh-install Rocky 9/10 and restore data/services per the post-migration checklist (main-site reference ↗);
- ELevate relay: upgrade in place to AlmaLinux 8 (
leapp-data-almalinux), convert to Rocky 8 withmigrate2rocky.sh, then upgrade majors as needed.