Skip to Content
Bash Script GuidesRocky Linux 8 (Community) to Rocky Linux from CIQ

Rocky Linux 8 (Community) to Rocky Linux from CIQ

Overview

This guide covers migrating community Rocky Linux 8 to Rocky Linux from CIQ (RLC) using the migrate2rlc.sh bash script. Rocky 8 follows an optimized "community to RLC" path that skips the full package swap, since the base OS is already Rocky Linux.

The script detects community Rocky when OS_ID=rocky and no CIQ release packages are installed. It routes the system into a tier change path: depot enrollment, repo setup, and distro-sync to pull CIQ packages.

Supported Tiers

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

Note: rlc-96-lts is EL9 only and not available for Rocky 8.

Prerequisites

  • Rocky Linux 8.x (community, not already enrolled in CIQ depot)
  • Root access
  • Network connectivity to 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>

The -t argument requires the full tier name: rlc-pro or rlc-plus. Passing shorthand like pro or plus triggers a validation error before logging is initialized, producing misleading "Bad file descriptor" messages.

Migration Path

  1. detect_os() identifies OS_ID=rocky, OS_MAJOR=8
  2. Script checks for CIQ release packages, finds none, sets is_community_rocky=true
  3. Routes into the tier change path (no package swap needed)
  4. Installs and configures the CIQ depot CLI
  5. Runs depot login and depot enable for the selected tier product
  6. Removes rocky-repos package (conflicts with ciq-rocky-cloud-repos)
  7. Writes depot repo files and runs distro-sync
  8. Installs CIQ kernel and tier release packages
  9. Creates post-reboot recovery service
  10. Reboots into CIQ kernel

Rocky 8 Specific Notes

rocky-repos Conflict

The rocky-repos package must be removed before distro-sync. It conflicts with ciq-rocky-cloud-repos provided by the depot. The script handles this automatically, but if running in manual mode, remove it first:

rpm -e --nodeps rocky-repos

No Tier Release Package on EL8

EL8 does not ship rlc-pro-release or any tier release RPM. Tier identification on EL8 relies on depot enrollment status and the presence of CIQ GPG keys and repo configuration.

Edge Case Handlers

The script runs run_edge_case_handlers() before migration and run_edge_case_restoration() after, even on the community Rocky path. These handle scenarios like immutable repo directory attributes, version-locked packages, and third-party repo conflicts.

Post-Reboot Recovery

A systemd oneshot service is installed to handle post-reboot tasks: depot re-enrollment verification, service status checks, and migration summary output. The service monitors per-service and per-repo status every 60 seconds with a 10 minute timeout.

Verification

After reboot, confirm the migration:

cat /etc/os-release depot list rpm -qa | grep ciq uname -r

The kernel version should contain .ciq. (x86_64) or _ciq (aarch64). /etc/os-release should show "Rocky Linux from CIQ" with the enrolled tier.

Troubleshooting

If the migration fails mid-process, check /var/log/migrate2rlc.log for details. The script always prints a migration summary (pass or fail) with troubleshooting commands.

Common issues on Rocky 8:

  • Stale rocky-repos not removed: distro-sync fails with package conflicts
  • Third-party repos with incompatible packages: disable them before migration
  • Immutable repo directory attribute blocking file modifications

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.