Injecting Intel Matrix Mass Storage Drivers into a Windows XP WIM
In Classroom and Lab Computing, we use sysprep in our Windows XP imaging process so that we can support the various computer models that comprise the 4000+ computers participating in CLM, both at University Park as well as several other campuses at Penn State. Using the tools and techniques that we have developed, we are able to apply our single OS image to a machine in about 5 minutes using a USB drive. After that, the USB drive can be removed and the machine will continue to build completely unattended. Not only is the process really cool, it saves a lot of time. However, sysprep for Windows XP isn’t perfect, and with newer hardware we have run into a few caveats.
The Problem
While updating our XP image last year, we ran into a snag where the new model (a Dell Optiplex 755) refused to build when SATA operation was set to AHCI in the BIOS. This was due to a missing Intel Matrix Storage driver. Normally, drivers can easily be added to a sysprep image by injecting them into a folder within the image and then adding them to OEMPnPDriversPath in Sysprep.inf. However, these drivers are not applied until midway through the mini-setup process that runs the first time Windows boots. Without having the correct Mass Storage Driver for booting the first time, Windows will blue screen (with stop error 0×0000007B) before it can even enter mini-setup. Now that many of Dell’s newer systems come with eSata ports, it is recommended that AHCI is used for SATA operation. There is a way to insert Mass Storage Drivers when sealing a sysprep image. However, we already sealed our image for this year and wanted to avoid another reseal. Fortunately, there is a way to manually inject the drivers into the image. It’s a bit tedious, but it does work.
Manually Injecting the Intel Matrix Storage Drivers into an Windows XP image
- Download the Intel Matrix Storage driver (be sure it’s the latest version) from the Intel website or from the system manufacturer website. If using the Intel website, you will probably need to extract the drivers from the executable. This can be done by calling <filename>.exe -a -0 <folder path>. Folder path is the folder where the drivers will be extracted to.
- Make sure that you have the following files: iaahci.cat, iaahci.inf, iastor.cat, iastor.inf, and iastor.sys.
- Open iaahci.inf with a text editor. First, look in the [version] section for the ClassGUID. Copy and paste this somewhere. Next, look for the [INTEL_HDC] section. You will see syntax similar to this:
%PCI\VEN_8086&DEV_2681&CC_0106.DeviceDesc% = iaStor_Inst, PCI\VEN_8086&DEV_2681&CC_0106The portion of the line that is in red is the HardwareID. Copy and paste the HardwareID portion of each entry in [INTEL_HDC] to a separate line in an empty text file. They will be important later on.
Note: The [INTEL_HDC.ntamd64] section below, which is below this section, can be skipped. They are the same. - Open iastor.inf and note the ClassGUID. Look for the [INTEL_HDC] again. The formatting should be the same. Once again, copy and paste each of the HardwareIds to a separate line in an empty text file.
- Mount your Windows XP image using imageX (imagex.exe /mountrw <path-to-wim-file> <image index #> <mount-folder-path>) . If using Ghost, you will probably have to apply the image to a separate hard drive. Last time I checked, Ghost couldn’t edit disk images that were in NTFS format. By the way, now may be a good time to look at switching from Ghost to ImageX for capturing and applying your image.
- Copy the driver files to the following folders:
- Copy iaahci.inf and iastor.inf to <mount-folder-path>\Windows\inf
- Copy iaStor.sys to <mount-folder-path>\Windows\system32\drivers
- Copy iaahci.cat and iastor.cat to <mount-folder-path>\Windows\system32\CatRoot\{F750E6C3-38EE-11D1-85E5-00C04FC295EE}
- Next, the SYSTEM registry hive from the image must be loaded. Open the Registry Editor (Start->Run->regedit.exe). Click on HKEY_LOCAL_MACHINE and then go to File->Load Hive… browse to <mount-folder-path>\Windows\system32\config and select the file named SYSTEM. When prompted to give the hive a name, type systemxp. The systemxp registry hive should not appear below HKEY_LOCAL_MACHINE.
Note: At this point, you should take a moment to browse to <mount-folder-path>\Windows\system32\config and make a backup of your SYSTEM file in case the registry changes break something. - Now that the driver files are in the right spot, a registry key must be created for each of HardwareIDs that we retrieved from iaahci.inf and iastor.inf. The easiest way to do this is to create a .reg file that will add all of the entries to the hive. Create a blank text file and name it IntelMSD.reg. From a text editor, open IntelMSD.reg and set the first line to this:
Windows Registry Editor Version 5.00
Next, we need to create an entry for each of the HardwareIDs that we are adding. Here is what the syntax for each entry will look like:
[HKEY_LOCAL_MACHINE\systemxp\ControlSet001\Control\CriticalDeviceDatabase\pci#ven_8086&dev_2929&cc_0106] "Service"="iaStor" "ClassGUID"="{4D36E96A-E325-11CE-BFC1-08002BE10318}"
The parts in bold are what will be changed for each entry. On the first line, the red text is where the HardwareID for each entry will go. The second line is the same in each entry. The third line is where the GUID associated with that entry will go. The two ClassGUIDs that were retrieved in steps 2 and 3 will be used here. Make sure that the GUID you put is the one that was in the same .inf file as the HardwareID.
Note: I realize that this part was a bit tricky. You can compare your .reg file with mine here to make sure your syntax is correct. Keep in mind that yours may have more entries, especially if it’s a newer version of the driver. Also, be sure that you have made a backup of your SYSTEM file in case the registry becomes corrupt.
- In the registry editor, go to File->Import… and browse to the IntelMSD.reg. This will load all of the registry entries into the systemxp hive. To be sure, you can browse to HKEY_LOCAL_MACHINE\systemxp\ControlSet001\Control\CriticalDeviceDatabase and check for the entries yourself.
- In addition to the entries created in CriticalDeviceDatabase, an entry for the iaStor service must be created. This registry file should apply the entries that are needed to HKEY_LOCAL_MACHINE\systemxp\ControlSet001\Services. To import it, go to File->Import… and browse to iaStor.reg.
- In regedit, click the systemxp registry hive and then go to File->Unload Hive… This will unload the XP Image SYSTEM hive so that the image can be unmounted.
- Unmount the image (or if using Ghost, recapture it). Test it on machines that have AHCI enabled (and use the Intel Matrix Storage Driver).
Other Mass Storage Drivers
Although I haven’t tested this, I am pretty sure that this process will work with other Mass Storage Drivers. The key to getting them to work is being able to read and understand what the inf file is doing. The Intel Matrix driver only required registry edits, and so it was fairly easy to do. For more information on inf file syntax, look at this MSDN page.

![[del.icio.us]](http://iboyd.net/wp-content/plugins/bookmarkify/delicious.png)
![[Digg]](http://iboyd.net/wp-content/plugins/bookmarkify/digg.png)
![[Facebook]](http://iboyd.net/wp-content/plugins/bookmarkify/facebook.png)
![[StumbleUpon]](http://iboyd.net/wp-content/plugins/bookmarkify/stumbleupon.png)
![[Twitter]](http://iboyd.net/wp-content/plugins/bookmarkify/twitter.png)
October 12th, 2009 at 2:53 pm
hi,
Just wondering if you have run into any issues after this process was done?
October 12th, 2009 at 3:26 pm
Ben:
I don’t think there were any issues. One thing I can recommend is to install the latest Intel Storage Matrix drivers using Intel’s installer once the machine(s) is/are built. We found some of our machines stopped occasionally responding once their hard disk was powered down during idle times. The machines that had this issue had event log errors from the iaStor process indicating that a timeout for some reason. We believe this was an issue with the driver though, because it did not affect setup or normal use, and installing the latest Storage Matrix drive resolved it.
October 19th, 2009 at 10:34 pm
I have been trying for months to perfect this, and had figured out all the steps you outlined with the exception of copying .cat files to the CatRoot directory. This was the final piece of the puzzle that I needed. Thanks so much for the post.
October 19th, 2009 at 11:08 pm
No problem, glad I could help!
November 6th, 2009 at 6:04 pm
Hello. I am having a small bit of trouble with the adding of the systemxp part in the registry. We use ghost here and i am not clear as far as loading the image onto a second hard drive. How am i suppose to edit the registry at that point from another HD and OS? thanks.
November 6th, 2009 at 7:21 pm
Hi Brooklynzoo81,
If you’re using Ghost, I’m guessing that you are stuck because you can’t edit a Ghost image after it’s been captured. With ImageX and Windows Image Format (WIM) images, you can mount a hard disk image and edit the files in the image. With Ghost, you can’t (unless you have the latest version). To edit the Ghost image, you have two options.
First Option:
1. Add a second hard disk to your system
2. Apply the image to the second hard drive using Ghost.
3. Follow my instructions above to make the registry and file changes to the second disk.
4. Re-capture the second hard disk to an image using Ghost.
Second Option:
1. Create a bootable WinPE CD that includes Ghost (here’s some instructions that may help you do that)
2. On a system that has an unused hard disk, boot into WinPE.
3. Using Ghost in WinPE, apply the image to the hard disk.
4. Follow my instructions above to make the registry and file changes to the second disk.
5. Using Ghost in WinPE, capture the hard disk to an image.
Of course, now may be a great time for you to convert your image to the Windows Image (WIM) format, if it doesn’t break other parts of your deployment process.
November 10th, 2009 at 4:01 pm
Thanks for the quick reply on this. I am just getting stuck and confused on trying to create this WinPE CD with ghost.
November 11th, 2009 at 3:15 pm
If you have any questions about creating the WinPE image I’ll be happy to try and answer them. I use it a lot.
November 14th, 2009 at 9:43 pm
Hello again. I was finally able to create that Winpe CD disk with ghost and imagex. The question i have now is would you know on how to change to default path of X:\Windows\system32 to lets say just X: on boot up? thanks.
November 17th, 2009 at 1:45 am
The easiest way would be to add the command “cd \” to edit the startnet.cmd file that’s in the WinPE image. startnet.cmd is in the System32 folder of the WinPE image.
January 15th, 2010 at 10:29 am
Great post, really helped me out.
Ghost can edit ntfs partitions and has a for a while. To make the registry changes navigate to the system hive, drag it to a folder on your machine, edit it and drag it back.
PSU uses disk keys to image their machines? What happens when you update an image?
January 15th, 2010 at 10:49 am
Hey Andy,
Glad I could help. PSU has a lot of different IT departments, and not every department handles imaging the same way. While PSU as whole does not use USB drives to image machines, the department I work in (Classroom and Lab Computing) does for the lab computers. Additionally, we share this image with other PSU departments as part of our Cooperative Lab Management initiative. We use USB drives because they are much faster and more reliable than CD/DVD drives. Another reason we use USB drives is because they are much easier to update them compared to CD/DVDs.
When the image is updated, we use a robocopy command that copies the new files from a network share to the USB key. We also have a batch file for formatting the USB drive to make it bootable (which essentially is a series of DISKPART commands). For us, this is much faster than burning new DVDs and distributing them to every staff member that needs it.
Thanks for the comments,
Matt
February 24th, 2010 at 5:57 pm
This works great for me but it looks like its prompting me for the iaStor.sys file on sysprep although it is located within system32\Drivers and once i point it there it works fine. Any idea?
March 2nd, 2010 at 6:15 pm
s0n, I’m not sure why it’s prompting you for the file. You could try copying the iaStor driver files to sysprep\i386 and then adding that folder to the OEMPnPDriversPath in Sysprep.inf.
Example:
OEMPnPDriversPath=WINDOWS\drivers;sysprep\i386