I’m running Rocky 8.5-3 on a server and happened to notice in the bios that the SATA mode was IDE and not AHCI. I understand enabling AHCI offer some performance benefits (correct?) and would like to switch. However, when booting up with AHCI enabled the system fails to boot, dracot scripts timeout, fails to mount swap etc.
I did find this article on how to retrospectively add the AHCI module in Centos:
However, this looks little out of date and didn’t seem to apply to this current Rocky install.
So, just wanted to follow up on how I sorted things out in the end, might be useful to others. The linked guide wasn’t quite right, it built an initrd, I needed an initramfs. I did this in the end:
Created a /etc/modprobe.d/achi.conf with the contents:
alias scsi_hostadapter ahci
Then I ran the following commands:
sudo dracut --add-driver ahci “/boot/initramfs-$(uname -r).ahci.img”
sudo mv initramfs-4.18.0-348.20.1.el8_5.x86_64.img initramfs-4.18.0-348.20.1.el8_5.x86_64.img.bak
sudo mv initramfs-4.18.0-348.20.1.el8_5.x86_64.ahci.img initramfs-4.18.0-348.20.1.el8_5.x86_64.img
Dracut added the driver and built a new initramfs with ‘ahci’ suffix. Then this was simply swapped in, retaining the old one as backup. (I’m not 100% certain the modprobe entry was actually required TBH)
I then rebooted, enabled AHCI in the bios, then booted up this new image. All worked fine.