Convert CentOS 8 Stream to AlmaLinux

Convert CentOS 8 Stream to AlmaLinux

In this post, I am going to convert Centos 8 to AlmaLinux.

This tutorial was tested on

  • CentOS 8 Stream template
  • 1 Core AMD EPYC 7443 (shared), 15 GB NVME, 2GB RAM, 500GB Bandwidth 🇸🇬 for $17.00/year on HostHatch

So it begins:

sudo -i

Update CentOS 8 system package with this following command:

dnf update

and after the process was completed, let's reboot the system.

reboot

Once it returns to online, login SSH back and then download the shell script provided by Almalinux

wget https://raw.githubusercontent.com/AlmaLinux/almalinux-deploy/master/almalinux-deploy.sh

If your system can't find wget package  -bash: wget: command not found, download and install it with yum install wget.

Output:

[root@redroc ~]# wget https://raw.githubusercontent.com/AlmaLinux/almalinux-deploy/master/almalinux-deploy.sh
--2022-12-06 08:03:44--  https://raw.githubusercontent.com/AlmaLinux/almalinux-deploy/master/almalinux-deploy.sh
Resolving raw.githubusercontent.com (raw.githubusercontent.com)... 2606:50c0:8003::154, 2606:50c0:8002::154, 2606:50c0:8001::154, ...
Connecting to raw.githubusercontent.com (raw.githubusercontent.com)|2606:50c0:8003::154|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 37496 (37K) [text/plain]
Saving to: ‘almalinux-deploy.sh’

almalinux-deploy.sh 100%[===================>]  36.62K  --.-KB/s    in 0.03s

2022-12-06 08:03:45 (1.05 MB/s) - ‘almalinux-deploy.sh’ saved [37496/37496]

And we can give permission to that shell script +x to make sure it can be executed into the system.

chmod -v +x almalinux-deploy.sh

Output:

[root@redroc ~]# chmod -v +x almalinux-deploy.sh
mode of 'almalinux-deploy.sh' changed from 0644 (rw-r--r--) to 0755 (rwxr-xr-x)

Run the shell script with the following command:

./almalinux-deploy.sh

Output:

[root@redroc ~]# ./almalinux-deploy.sh
Check root privileges                                                 OK
Use '-d or --downgrade' option to allow downgrade from CentOS Stream  ERROR

If you face this error, you can downgrade the CentOS 8 stream with -d

./almalinux-deploy.sh -d

Output:

...
Complete!
Run dnf distro-sync -y                                                OK
Restoring of alternatives is done                                     OK
Generating grub configuration file ...
done
All Secure Boot related packages which were not released by AlmaLinux are reinstalledOK

Migration to AlmaLinux is completed

This will take a long time and after completed, reboot the system by using the following command:

reboot

Output:

[root@redroc ~]# cat /etc/*release
AlmaLinux release 8.7 (Stone Smilodon)
AlmaLinux release 8.7 (Stone Smilodon)
NAME="AlmaLinux"
VERSION="8.7 (Stone Smilodon)"
ID="almalinux"
ID_LIKE="rhel centos fedora"
VERSION_ID="8.7"
PLATFORM_ID="platform:el8"
PRETTY_NAME="AlmaLinux 8.7 (Stone Smilodon)"
ANSI_COLOR="0;34"
LOGO="fedora-logo-icon"
CPE_NAME="cpe:/o:almalinux:almalinux:8::baseos"
HOME_URL="https://almalinux.org/"
DOCUMENTATION_URL="https://wiki.almalinux.org/"
BUG_REPORT_URL="https://bugs.almalinux.org/"

ALMALINUX_MANTISBT_PROJECT="AlmaLinux-8"
ALMALINUX_MANTISBT_PROJECT_VERSION="8.7"
REDHAT_SUPPORT_PRODUCT="AlmaLinux"
REDHAT_SUPPORT_PRODUCT_VERSION="8.7"
AlmaLinux release 8.7 (Stone Smilodon)
AlmaLinux release 8.7 (Stone Smilodon)

Thank you for reading!

source: https://lowendspirit.com/discussion/comment/113754/#Comment_113754