Skip to content

Migrating from CentOS Stream to AlmaLinux

This guide outlines the steps to migrate from CentOS Stream 9 to AlmaLinux 9.5, including fixing broken repository mirrors and handling symbolic link issues.

Prerequisites

  1. Backup Your System: Ensure you have a full backup before proceeding.

Steps to Fix Broken Mirrors for CentOS 9 Stream

If you encounter issues with broken or unreachable mirrors, update your repository configuration:

Updating Repository URLs

Update the mirrors from the old centos.org to the vault.centos.org repository.

```bash sudo sed -i 's/mirrorlist/#mirrorlist/g' /etc/yum.repos.d/CentOS-* sudo sed -i 's|#baseurl=http://mirror.centos.org|baseurl=http😕/vault.centos.org|g' /etc/yum.repos.d/CentOS-* ```

After updating the repository configuration, clear the cache and update:

```bash sudo yum clean all sudo yum makecache ```

Migration Steps

1. Install Migration Tool

Download and prepare the AlmaLinux migration tool `almalinux-deploy.sh`.

2. Run the Migration Script

Run the script to start the migration:

```bash sudo ./almalinux-deploy.sh -d ```

3. Post-Migration Steps

  • Reboot the System:

    After the script completes, reboot your system.

    ```bash sudo reboot ```

  • Verify the Upgrade:

    Verify that your system is now running AlmaLinux 9.5.

    • Check the OS Version:

      ```bash cat /etc/os-release ```

    • Verify the Kernel and Other Details:

      ```bash uname -r sudo grubby --info DEFAULT | grep AlmaLinux ```

Find symbolic links in the root directory:

```bash find / -maxdepth 1 -type l -exec ls -l {} ; ```

Replace absolute symbolic links with relative ones. For example:

```bash sudo ln -sfT usr/bin /bin sudo ln -sfT usr/sbin /sbin sudo ln -sfT usr/lib /lib sudo ln -sfT usr/lib64 /lib64 sudo ln -sfT var/lib/snapd/snap /snap ```