Page 1 of 1

Adding AHCI support to initrd after installation

Posted: 2016/03/26 23:53:08
by ocgltd
I built a complete CentOS7 system with lots of tools, preferences, etc in a VMware guest. Once working fine I moved it to my physical server. I managed to get grub2 installed and the bootloader now starts but drops into dracut shell.

I traced the problem down to AHCI. If I disable AHCI in the BIOS then the system boots into CentOS7. Can someone tell me how to add AHCI into the initrd on a running CentOS7 system? (So I can re-enable AHCI in the BIOS) I tried dracut --add-drive ahci and now I see:

lsinitrd /boot/initramfs-3.10.0-327.10.1.el7.x86_64.img | grep ahci
-rw-r--r-- 1 root root 63309 Feb 16 12:44 usr/lib/modules/3.10.0-327.10.1.el7.x86_64/kernel/drivers/ata/ahci.ko
-rw-r--r-- 1 root root 53813 Feb 16 12:44 usr/lib/modules/3.10.0-327.10.1.el7.x86_64/kernel/drivers/ata/libahci.ko

But it still won't boot with AHCI enabled in the BIOS

Re: Adding AHCI support to initrd after installation

Posted: 2016/03/27 01:44:29
by TrevorH
Your best bet is to build the new initramfs on the machine itself and let dracut do all the autodetection. You can do that by booting the install DVD in rescue mode and chrooting to /mnt/sysimage before you run dracut.

Re: Adding AHCI support to initrd after installation

Posted: 2016/03/27 03:51:09
by ocgltd
I endded up using the --add-driver parameter on dracut to force the AHCI driver in, and then things started to work. T
Thanks!