Thursday, November 18, 2010

Many recent motherboards include AHCI-capable SATA controllers. However, if you have an existing installation of Windows XP, you can not easily switch from IDE to AHCI mode.

If you are doing a fresh install of Windows XP, you can introduce the proper drivers with the old F6 method, or by slipstreaming the needed drivers on to you own custom install disk. However, for existing installations of XP, there's a catch-22.

You can't switch to AHCI mode in the BIOS - that causes a Stop Error (BSOD) at the start of the boot process. This is because the Windows bootloader loads the existing IDE driver, but the motherboard is presenting an AHCI interface.

Neither can you solve the problem by replacing the Windows driver first. The AHCI drivers won't install, since all Windows can see is an IDE controller.

I wasn't satisfied with any of those solutions. I thought, "Isn't this chicken-and-egg problem the kind of thing that Utility Boot CDs are supposed to solve?" Indeed. There is a little utility on the Ultimate Boot CD for Windows called Fix HDC, purported to "Fix the Hard Drive Controller when replacing your motherboard on an XP system" That sounds good to me.

Now, the Ultimate Boot CD for Windows (UBCD4Win) is a decidedly do-it-yourself affair. You build it yourself, based on your own copy of the Windows XP install disk (I used an nLite install disk, slipstreamed with SP3 and the right AHCI drivers, but a plain Windows XP install CD should work fine too, since UBCD4Win comes with a bunch of drivers). I hit a snag caused by multiple copies of cygwin1.dll on my computer, but this post helped me clear it up.

So, burn a UBCD4Win cd, and put it in the drive. Boot the computer, and go in to your BIOS to make some changes. First, make sure that the CD player is first in the boot order. Also, change your SATA controller from IDE mode to AHCI mode in the BIOS. Note that many motherboards have two SATA controllers, so make sure you are changing the right one. Mine has a six-port Intel controller, and a four-port controller from Gigabyte.

After a long boot process, UBCD4Win dumps you in to a bizarro-world version of Windows,with a zombie-colored, MS Serif Start menu. No matter, we didn't come here for the design. Under Start > Programs > Registry Utilities, you will find Fix HDC. Make sure you have changed your BIOS to AHCI mode beforehand, otherwise FixHDC will just install regular IDE drivers.

In the Start Menu, Fix HDC is a folder, containing two items. The first allows you to set which Windows installation you want to modify. The second runs the actual Fix HDC utility. It runs in a dos window, and prompts you to back up your installation and/or modify your storage drivers. I chose Modify. UBCD4Win comes with a comprehensive selection of drivers, so Fix HDC will likely find the right driver for your hardware.

If UBCD4Win does not have the right driver for your hardware, it may install a "close enough" driver that will at least allow you to boot into your hard-disk Windows in AHCI mode. Once there, you can upgrade the driver just as you would any other.

This post has a very clear explanation of which driver to use based on your motherboard.