So Windows XP doesn't come with out of the box support for AHCI on the install CD. I wanted to set my computer up with dual booting ability for Windows and Linux without having to switch my BIOS settings each time. I struggled for a while this afternoon getting the AHCI drivers working in Windows XP, so I thought I'd share my experience.

I installed Linux on this machine first and left room on the drives for some NTFS partitions. This was all done with AHCI enabled. For the Windows XP install, I switched the BIOS back into IDE legacy mode, where the SATA devices are presented as IDE devices. This left me with a nice Windows XP install that wouldn't work once I switched back to AHCI mode. So I googled around, and there was a lot of people that said it couldn't be done. Bullshit, unless Windows is that bad of an OS. I finally came across this forum post putting me on the right path.

Eventually I found a post doing exactly what I needed, down to the same motherboard (a Gigabyte EP45-DS3R) and everything. That super-helpful post is here: Ubuntu Linux and XP on ICH10 with AHCI. I followed the instructions to a T (except I used the latest version of the Matrix Storage Manager software), and I restart, changing my BIOS back to AHCI mode, and...ugh. It doesn't work and I get a cryptic error message saying the boot device could not be located.

After struggling to figure out the problem, I finally decided to take a look at the Windows bootloader, and the infamous boot.ini. It is very well documented by Microsoft, and that proved to be quite helpful. Here was my boot.ini:

[boot loader]
[operating systems]
signature(549ef)disk(0)rdisk(0)partition(1)\WINDOWS="Microsoft Windows XP Professional" /noexecute=optin /fastdetect

I've looked at this file before, and had never seen that 'signature' thing before. What on earth was that? Off to the documentation and the boot.ini naming convention. Aha! I bet that signature thing is completely wrong when we change the way the drives and controllers appear to the OS. I changed the config line to the following, more familiar syntax instead:

multi(0)disk(0)rdisk(0)partition(1)\WINDOWS="Microsoft Windows XP Professional" /noexecute=optin /fastdetect

And now we have a working booting system. Now I just need to get grub back on here.