AlmaLinux8
v1 : This initial template has been crafted for the migration from the CentOS8 template, now that it has reached its end of life. AlmaLinux offers a direct, binary‑compatible replacement for CentOS8.
Guidance for Upgrading or Migrating CentOS8 Templates
The content below is drawn from the official AlmaLinux guide, which can be found at https://github.com/AlmaLinux/almalinux-deploy. Please refer to the link for the most recent version; the text has been reproduced here as of 29/3/2022 for reference purposes.
This information is provided as a community resource, but no liability is assumed for any errors or issues that may arise from following these notes.
almalinux-deploy
A migration utility for transitioning from Enterprise Linux (EL) to AlmaLinux.
Usage
To convert your EL8 operating system to AlmaLinux, follow these steps:
-
Your system must be running CentOS 8.4 or 8.5. Upgrading to 8.5 beforehand is advisable, though not strictly necessary if you are already on at least 8.4. After applying updates, a reboot should be performed so that any new updates are properly activated.
sudo dnf update -y sudo reboot
- Starting from January 31, 2022, the CentOS 8 mirror lists are no longer available. To run
dnf update -ysuccessfully, you must adjust yourdnfconfiguration files so they point to a working mirror. Thesedcommands below provide a convenient way to restorednfto a functional state, allowing you to upgrade to 8.5 and then to AlmaLinux.-
sudo sed -i -e '/mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=/ s/^#*/#/' -e '/baseurl=http://mirror.centos.org/$contentdir/$releasever// s/^#*/#/' -e '/^\[baseos\]/a baseurl=https://mirror.rackspace.com/centos-vault/8.5.2111/BaseOS/$basearch/os' /etc/yum.repos.d/CentOS-Linux-BaseOS.repo sudo sed -i -e '/mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=/ s/^#*/#/' -e '/baseurl=http://mirror.centos.org/$contentdir/$releasever// s/^#*/#/' -e '/^\[appstream\]/a baseurl=https://mirror.rackspace.com/centos-vault/8.5.2111/AppStream/$basearch/os' /etc/yum.repos.d/CentOS-Linux-AppStream.repo sudo sed -i -e '/mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=/ s/^#*/#/' -e '/baseurl=http://mirror.centos.org/$contentdir/$releasever// s/^#*/#/' -e '/^\[cr\]/a baseurl=https://mirror.rackspace.com/centos-vault/8.5.2111/ContinuousRelease/$basearch/os' /etc/yum.repos.d/CentOS-Linux-ContinuousRelease.repo sudo sed -i -e '/mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=/ s/^#*/#/' -e '/baseurl=http://mirror.centos.org/$contentdir/$releasever// s/^#*/#/' -e '/^\[devel\]/a baseurl=https://mirror.rackspace.com/centos-vault/8.5.2111/Devel/$basearch/os' /etc/yum.repos.d/CentOS-Linux-Devel.repo sudo sed -i -e '/mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=/ s/^#*/#/' -e '/baseurl=http://mirror.centos.org/$contentdir/$releasever// s/^#*/#/' -e '/^\[extras\]/a baseurl=https://mirror.rackspace.com/centos-vault/8.5.2111/extras/$basearch/os' /etc/yum.repos.d/CentOS-Linux-Extras.repo sudo sed -i -e '/mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=/ s/^#*/#/' -e '/baseurl=http://mirror.centos.org/$contentdir/$releasever// s/^#*/#/' -e '/^\[fasttrack\]/a baseurl=https://mirror.rackspace.com/centos-vault/8.5.2111/fasttrack/$basearch/os' /etc/yum.repos.d/CentOS-Linux-FastTrack.repo sudo sed -i -e '/mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=/ s/^#*/#/' -e '/baseurl=http://mirror.centos.org/$contentdir/$releasever// s/^#*/#/' -e '/^\[ha\]/a baseurl=https://mirror.rackspace.com/centos-vault/8.5.2111/HighAvailability/$basearch/os' /etc/yum.repos.d/CentOS-Linux-HighAvailability.repo sudo sed -i -e '/mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=/ s/^#*/#/' -e '/baseurl=http://mirror.centos.org/$contentdir/$releasever// s/^#*/#/' -e '/^\[plus\]/a baseurl=https://mirror.rackspace.com/centos-vault/8.5.2111/centosplus/$basearch/os' /etc/yum.repos.d/CentOS-Linux-Plus.repo sudo sed -i -e '/mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=/ s/^#*/#/' -e '/baseurl=http://mirror.centos.org/$contentdir/$releasever// s/^#*/#/' -e '/^\[powertools\]/a baseurl=https://mirror.rackspace.com/centos-vault/8.5.2111/PowerTools/$basearch/os' /etc/yum.repos.d/CentOS-Linux-PowerTools.repo
- As an alternative, the
-fflag (e.g.,sudo bash almalinux-deploy.sh -f) will handle this automatically.
-
-
Create a backup of the system. Not every possible scenario has been tested, so there is always a chance of unexpected issues. A restore point will allow you to recover if needed.
-
Fetch the almalinux-deploy.sh script:
$ curl -O https://raw.githubusercontent.com/AlmaLinux/almalinux-deploy/master/almalinux-deploy.sh
-
Execute the script and inspect its output to ensure no errors occurred:
$ sudo bash almalinux-deploy.sh ... Migration to AlmaLinux is completed
-
A reboot is recommended so the system starts using the AlmaLinux kernel:
sudo reboot -
Confirm that the conversion was successful:
# check release file $ cat /etc/redhat-release AlmaLinux release 8.5 (Arctic Sphynx) # check that the system boots AlmaLinux kernel by default $ sudo grubby --info DEFAULT | grep AlmaLinux title="AlmaLinux (4.18.0-348.el8.x86_64) 8.5 (Arctic Sphynx)"
-
We appreciate your choice of AlmaLinux!
