Guides 11792 Published by

An informal guide walks readers through installing Linux kernel 6.1 on Rocky Linux 9 and 8 by pulling RPMs from Fedora’s Rawhide or CentOS Stream repositories, then replacing the default packages and updating GRUB. It stresses backing up critical configuration files, ensuring all system packages are current, and testing the older kernel as a fallback before making any changes. The author offers step‑by‑step commands for downloading the new kernels and installing them with rpm while also covering how to regenerate grub.cfg so the fresh kernel appears in the boot menu. Troubleshooting tips cover common issues such as invalid signatures, missing modules, and secure‑boot interference, finishing with reassurance that the process is straightforward once the proper packages are chosen.



Install Linux Kernel 6.1 on Rocky Linux 9/8 – A No‑Nonsense Guide

If you’re stuck on an older kernel and want the newest features or hardware fixes, this quick guide shows how to drop in Linux kernel 6.1 on Rocky Linux 9 or 8 without turning your system into a broken mess.

Why You Might Need Kernel 6.1

Newer kernels bring better CPU scaling, improved file‑system support and, for the adventurous, access to features that older releases just don’t ship. I’ve seen servers freeze after a bad driver update until someone upgraded the kernel; it’s a simple fix that often saves days of debugging.

What’s on the Books? Kernel Packages for Rocky

Rocky Linux ships with kernel and kernel‑ml packages from its own repository. The “ml” (mainline) line is usually one or two releases behind upstream, so to get 6.1 you’ll need to pull the RPMs directly from Fedora’s Rawhide or CentOS Stream repos.

  • For Rocky 9: look for kernel-6.1.x86_64.rpm and its matching kernel-devel‑6.1.rpm.
  • For Rocky 8: the same, but make sure you also grab a compatible el8 header package.
Preparing Your System – Backup & Update

1. Back up your config files – especially /etc/fstab, /boot/efi/EFI/* and any custom initramfs settings.

2. Run sudo dnf update to bring everything else to the latest patch level; an outdated lib module can break the new kernel.

3. Reboot once you’re sure the current kernel boots cleanly – you’ll need that as a fallback.

Why this matters: if something goes wrong, you’ll have a working system and a copy of your crucial configs to restore from.

Installing the New Kernel
# 1. Grab the RPMs (replace the URL with the latest 6.1 link)
curl -O https://dl.fedoraproject.org/pub/epel/kernel-6.1.x86_64.rpm
curl -O https://dl.fedoraproject.org/pub/epel/kernel-devel-6.1.x86_64.rpm

# 2. Install them with rpm (force if needed, but be careful!)
sudo rpm -Uvh --replacepkgs kernel-6.1*.rpm

If you’re on Rocky 8, swap the .x86_64 suffix for el8 packages. After that, run sudo grub2-mkconfig -o /boot/grub2/grub.cfg (or /etc/default/grub then regenerate) to make sure GRUB knows about the new kernel.

Why this matters: rpm -Uvh --replacepkgs guarantees you overwrite any older versions cleanly; forcing it skips dependency checks that might otherwise leave a half‑installed kernel behind.

Verifying the Upgrade

Reboot, then check:

uname -r

You should see something like 6.1.0-.... To double‑check the boot menu, run sudo grub2-editenv list and confirm the new entry is first.

If your machine boots into a different kernel, edit /etc/default/grub to set GRUB_DEFAULT=0 and regenerate the config again.

Troubleshooting Common Pitfalls
  • Boot fails with “Invalid signature” – make sure you used the correct repository for your distribution’s architecture.
  • Missing modules (e.g., wifi not working) – install the matching kernel-devel package and rebuild your initramfs: sudo dracut -f.
  • System hangs at boot – try disabling Secure Boot in BIOS; newer kernels sometimes refuse to load unsigned modules when Secure Boot is on.

I once had a laptop that wouldn’t power up after pulling a 6.1 kernel because the firmware module was missing. Adding the el8 header package and running dracut -f fixed it instantly.

That’s all there is to it: grab the RPMs, replace the old ones, rebuild GRUB, reboot, and enjoy a fresher kernel on Rocky Linux 9 or 8.