Advanced Host Controller Interface (AHCI) is the native work mode for SATA drives. It's been in the Linux kernel since version 2.6.19. Enabling AHCI has two main benefits: support for hot pluggable SATA drives (just like USB) and Native Command Queuing (NCQ).
SATA drives are usually configured as legacy Parallel ATA by the BIOS and the OS. Follow these two steps to enable AHCI:
Add the AHCI module to the kernel image
We do this by editing /etc/mkinitcpio.conf and adding ahci to the MODULES array:
Then we rebuild the kernel image, so that it includes our module:
mkinitcpio -p kernel26
Configure from BIOS
This depends from one motherboard to another. Enter the BIOS and search for something like:
Enable SATA as: IDE/AHCI
SATA: PATA Emulation/Native/Enhanced
Choose AHCI or Native, save your settings and exit the BIOS. Consult your motherboard manual if you don't know which of the modes is AHCI since the naming can vary.
That's all. Now when you boot in Linux the AHCI driver will be used.
dmesg should display something like:
SCSI subsystem initialized libata version 3.00 loaded. ahci 0000:00:1f.2: version 3.0 ahci 0000:00:1f.2: PCI INT B -> GSI 19 (level, low) -> IRQ 19 ahci 0000:00:1f.2: irq 764 for MSI/MSI-X ahci 0000:00:1f.2: AHCI 0001.0200 32 slots 6 ports 3 Gbps 0x3f impl SATA mode ahci 0000:00:1f.2: flags: 64bit ncq sntf stag pm led clo pmp pio slum part ems ahci 0000:00:1f.2: setting latency timer to 64 scsi0 : ahci scsi1 : ahci scsi2 : ahci scsi3 : ahci scsi4 : ahci scsi5 : ahci
and for NCQ:
ata2.00: 625142448 sectors, multi 16: LBA48 NCQ (depth 31/32)
- Windows XP does not have AHCI support, so you need to install the AHCI driver from your motherboard's cd.
- If there is a delay before grub appears when you boot, check your BIOS settings. There might be an option that introduces such a delay so that lazy optical drives get to boot from the cd/dvd.
- Bootable Linux CDs do not boot anymore, you are thrown in a grub shell instead. (any ideeas why?)