Skip to Content
Bash Script GuidesCentOS Stream 8 to Rocky Linux from CIQ

CentOS Stream 8 to Rocky Linux from CIQ

Overview

This guide covers migrating CentOS Stream 8 to Rocky Linux from CIQ (RLC) using the migrate2rlc.sh bash script. CentOS Stream 8 reached end of life in May 2024, and shares similar dead mirror issues with CentOS Linux 8. The script handles Stream-specific package removal and repo classification automatically.

Supported Tiers

  • rlc-pro (Pro)
  • rlc-plus (Plus)

Prerequisites

  • CentOS Stream 8
  • Root access
  • Network connectivity to vault.centos.org and CIQ depot servers
  • Valid CIQ depot credentials (username and token)
  • At least 2 GB free disk space

Usage

./migrate2rlc.sh -r -t <tier> -u <username> -p <token>

Example:

./migrate2rlc.sh -r -t rlc-plus -u ciq-portal -p <token>

Migration Path

  1. detect_os() identifies OS_ID=centos, detects Stream variant, OS_MAJOR=8
  2. Script validates system requirements
  3. Disables third-party repos, takes pre-migration snapshots
  4. Handles Stream-specific module removal
  5. Swaps CentOS Stream packages for Rocky Linux equivalents
  6. Installs CIQ depot CLI, authenticates, enables the selected tier
  7. Runs distro-sync to pull RLC packages
  8. Installs CIQ kernel
  9. Creates post-reboot recovery service
  10. Reboots into CIQ kernel

CentOS Stream 8 Specific Notes

Dead Mirror Handling

Like CentOS Linux 8, Stream 8 mirrors are no longer active. The script redirects repository URLs to vault.centos.org for pre-migration operations. If you see hangs during early package operations, manually rewrite repos:

sed -i 's|^mirrorlist=|#mirrorlist=|g' /etc/yum.repos.d/CentOS-Stream-*.repo sed -i 's|^#baseurl=http://mirror.centos.org|baseurl=http://vault.centos.org|g' /etc/yum.repos.d/CentOS-Stream-*.repo

extras-common Repo Classification

The extras-common repository is a Stream-specific repo that the script correctly classifies during migration. It is handled as part of the standard CentOS repo set and does not need manual intervention.

Stream-Specific Module Removal

CentOS Stream 8 may have DNF modules enabled that conflict with Rocky Linux package versions. The script resets and removes Stream-specific module streams as part of the package swap process. This prevents version conflicts during distro-sync.

Package Swap

CentOS Stream 8 requires a full package swap (same as CentOS Linux 8). The script replaces Stream release packages, GPG keys, and branded packages with Rocky Linux equivalents before depot enrollment.

Differences from CentOS Linux 8

The migration process is nearly identical to CentOS Linux 8, with two Stream-specific additions:

  • The extras-common repo is correctly classified and handled
  • Stream-specific DNF modules are reset before the package swap

All other steps (vault redirect, third-party repo detection, depot enrollment, distro-sync, post-reboot recovery) are the same.

Post-Reboot Recovery

A systemd oneshot service handles post-reboot tasks: depot verification, live service monitoring (per-service and per-repo status every 60 seconds, 10 minute timeout), and migration summary output.

Verification

After reboot:

cat /etc/os-release depot list rpm -qa | grep ciq uname -r rpm -qa | grep centos dnf module list --enabled

All CentOS packages should be replaced. No CentOS-specific modules should remain enabled. The kernel version should contain .ciq. (x86_64) or _ciq (aarch64).

Troubleshooting

Check /var/log/migrate2rlc.log for details. The script prints a migration summary with troubleshooting commands on both success and failure.

Common issues on CentOS Stream 8:

  • Dead mirrors causing hangs: rewrite repo files to vault.centos.org
  • Stale module streams blocking distro-sync: run dnf module reset <module>
  • Third-party repos with Stream-specific dependencies: disable before migration
  • extras-common repo errors: script handles this, but check log if issues arise

DISCLAIMER

The migrate2rlc script and playbook are provided "as is" without warranty of any kind, express or implied. Use of these tools is entirely at your own risk. CIQ, Inc. assumes no responsibility or liability for any data loss, system downtime, service disruption, or other damage resulting from the use or misuse of these tools. It is the user's responsibility to ensure adequate backups and testing in a non-production environment before performing any migration on production systems.