Skip to content
Search Rocky Linux

    Browse this documentation

    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.

    SourceTargetToolNotes
    CentOS 8 / Stream 8Rocky 8migrate2rocky.shOfficial script; swaps release packages and repos
    AlmaLinux 8 / Oracle 8 / RHEL 8Rocky 8migrate2rocky.shSame
    CentOS Stream 9 / Alma 9 / RHEL 9Rocky 9migrate2rocky9.shEL 9 variant
    CentOS 7Rocky 8+Two stepsELevate→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)”
    1. Back up and snapshot: full backup of data and configs; VM snapshot (see backup strategy (main-site reference ↗)).

    2. Pre-checks: source minor reasonably current, no half-configured packages, third-party repos inventoried.

    3. Fetch the script (official repo is authoritative; EL 8 and EL 9 scripts differ):

      Terminal window
      # EL 8 sources
      curl -LO https://raw.githubusercontent.com/rocky-linux/rocky-tools/main/migrate2rocky/migrate2rocky.sh
      chmod +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.sh
      chmod +x migrate2rocky9.sh
    4. Run the conversion (pick by source major version):

      Terminal window
      sudo ./migrate2rocky.sh -r # EL 8 → Rocky 8
      sudo ./migrate2rocky9.sh -r # EL 9 → Rocky 9
    5. Reboot and verify:

      After the reboot, confirm the distro identity switched (cat /etc/os-release should report Rocky), then re-check services and repositories.

    6. Post-migration checks: walk the post-migration checklist (main-site reference ↗) (service autostart, firewall, SELinux contexts, cron).

    CentOS 7 has reached end of support, and ELevate does not support Rocky as an upgrade target (current targets: AlmaLinux / Kitten / CentOS Stream):

    1. Reinstall-and-migrate (recommended for production): fresh-install Rocky 9/10 and restore data/services per the post-migration checklist (main-site reference ↗);
    2. ELevate relay: upgrade in place to AlmaLinux 8 (leapp-data-almalinux), convert to Rocky 8 with migrate2rocky.sh, then upgrade majors as needed.