The Kernel is the fundamental layer of the operating system. It works at the most basic level and is responsible for managing resources, ram, CPU etc…
As a source for our update, we are going to use the ELRepo repository which is a community repository for Enterprise Linux distributions (Red Hat Enterprise Linux (RHEL), Almalinux, Rocky Linux… ).
1 – Preparing the server
1 – Update, upgrade your Almalinux with YUM and reboot at the end:
yum update; yum upgrade -y; reboot;
2 – Checking the Kernel version installed on the server
uname -snr
Almalinux defaults to version 5.x
3 – Check your Almalnux version
cat /etc/os-release
Check the version of Almalinux in PRETTY_NAME or REDHAT_SUPPORT_PRODUCT_VERSION
5 – Add the gpg key from the ELRepo repository to the server.
rpm --import https://www.elrepo.org/RPM-GPG-KEY-elrepo.org
For Almalinux 8 use:
yum install https://www.elrepo.org/elrepo-release-8.el8.elrepo.noarch.rpm
2 – Instale or Linux 6.x kernel.
1 – enable the repository
yum --disablerepo='*' --enablerepo='elrepo-kernel' list available | grep kernel
2 – install the latest stable version
yum --enablerepo=elrepo-kernel install kernel-ml
Update GRUB configuration
1 – After installing the new kernel, ensure that your system boots from it by updating the GRUB configuration. First, set the new kernel as the default boot option:
grub2-set-default 0
2 – Next, re-generate the GRUB configuration file:
grub2-mkconfig -o /boot/grub2/grub.cfg
3 – To finish the installation, restart the system:
reboot
4 – After booting the system, check that the new kernel version is in use:
uname -sr
The output should now reflect the updated version of the 6.x kernel.
Congratulations, you have successfully updated the Linux Kernel to version 6.x on your AlmaLinux 8 system. This update improves the capabilities and security of your system.