Text mode drivers and Sysprep (on Windows XP)

I’m so glad we’ve moved away from needing to use Sysprep on Windows Vista / 7.

But since I still support Windows XP and needed to add a Intel AHCI (SATA) to our Windows XP image, I have to deal with it still.

This weeks problem was that Sysprep wasn’t injecting the AHCI driver, even though it was in the [SysPrepMassStorage] section of Sysprep.inf.

Result: Blue screen of death with a Stop 0x0000007B error.

I wasted more time than I’m proud to admit here.  I know the driver was good, as I created an Nlite WinXP image, and it worked.  As an aside, if I was building a WinXP image for home, I’d use Nlite.

Anyway, so out of desperation, I asked the rest of the team.

Adrian commented he’d seen a case of where Sysprep hadn’t updated the CriticalDeviceDatabase registry keys.

So I updated the CriticalDeviceDatabase registry key and it all worked.

“You Bastard image!  That’s an embarrassing amount of time I’ll never get back again.”

Some instructions that Adrian and myself wrote up, follows below the read more.

A note about SATA (TextMode drivers) and CriticalDeviceDatabase

While Sysprep is supposed to update the CriticalDeviceDatabase registry keys, sometimes it will not.  The result is that the desktop/laptop “Bluescreen”’s when AHCI or SCSI mode is selected in the BIOS.

So you may need to manually update these registry keys.

After Sysprep’ng, you can update these key(s) using a WinPE boot disk.  The registry hive file can be found in C:\Windows\System32\config\system

Further reading:

Instructions from YouBastard™ on how to update a Blue screening system this:

  1. In the BIOS change to AHCI mode
  2. Drop image and allow to BSOD
  3. Boot using WinPE
  4. Find the device ID for the SATA controller using "devcon.exe hwids * >output.txt"
  5. Open registry and mount the System. hive from C:\Windows\System32\config
  6. Check for corresponding key in
    HKLM\SYSTEM\CurrentControlSet\Control\CriticalDeviceDatabase
  7. If it doesn’t exist mimic another suitable device