I have been using ImageX to create WIM images of Windows XP for some time now. After imaging a Toshiba A9 laptop with an image created on a Toshiba A8, Windows XP failed to boot, displaying instead the dreaded Stop Error 0×0000007B INACCESSIBLE_BOOT_DEVICE. To quote the Microsoft knowledge base article: “This error may occur if the registry entries and the drivers for the mass storage controller hardware in the backup computer are not installed in Windows XP.” In other words, Windows doesn’t have the SATA drivers needed to communicate with the hard disk. The next step is usually to:
- Download the necessary drivers
- Copy the drivers to a floppy disk
- Run a repair install of XP
- Press F6 when prompted during Setup to install the drivers
- Run Sysprep
- Recapture an image that will now have the necessary drivers installed
This time however, I decided to take advantage of ImageX’s ability to easily mount a WIM image for offline editing. So here is what I did (be aware that this is a hack, it worked for me but there’s no guarantee that it’ll work for you):
- Downloaded and extracted the needed SATA drivers from the Toshiba website. The archive contains 6 files: iaahci.cat, iaahci.inf, iastor.cat, iastor.inf, iaStor.sys, and TXTSETUP.OEM.
- Mounted the WIM image of Windows XP to an empty folder (
C:\Mount) using the command:
imagex /mountrw C:\PathToYourWIMImage\WindowsXP.wim 1 C:\Mount
- Followed the instructions on this thread to copy the driver files where they belong:
- Copied the .inf files (iaahci.inf and iastor.inf) to C:\Mount\Windows\inf
- Copied the .sys file (iaStor.sys) to C:\Mount\Windows\system32\drivers
- Copied all remaining files (iaahci.cat, iastor.cat, iaStor.sys, and TXTSETUP.OEM) to C:\Mount\Windows\system32
- Loaded the HKEY_LOCAL_MACHINE\SYSTEM hive of the mounted image in the registry:
- Opened the Registry Editor (type
regeditat the command prompt) - Selected the HKEY_LOCAL_MACHINE hive
- Clicked on File>Load Hive and selected C:\Mount\Windows\system32\config\system
- Named the loaded hive Temp (it can be named anything you want)
- Opened the Registry Editor (type
- In Notepad, created a .reg file (SATA_Keys.reg for example) to import the appropriate settings into the mounted hive (click on the picture to download SATA_Keys.doc that you’ll have to rename SATA_Keys.reg):
How do you come up with this file? Well again, this thread helped a lot, as did that one. Basically you have to open the .inf files (iaahci.inf and iastor.inf) and locate:
-
the ClassGUID entry in the [version] section.
-
the PCI\VEN entries in the [ControlFlags] section
-
the AddService value in the [iaStor_Inst.Services] section in this case.
If you look back at the .reg file, you’ll notice that the first 6 keys, derived from iaahci.inf, all have the same ClassGUID, only the PCI\VEN values change. The next 6, derived from the other .inf file (iastor.inf), share a different ClassGUID. Finally, both .inf files refer to the same service (iaStor) which has to be added. Note that in this example, the hexadecimal value of ImagePath means “system32\drivers\iaStor.sys”.
6. Double-clicked the .reg file to merge the settings in the registry
7. Unloaded the Temp hive (File>Unload Hive)
8. Unmounted the WIM image without forgetting the /commit switch (or all the changes would be lost):
imagex /unmount C:\Mount /commit
9. Reimaged the laptop which booted just fine and installed the SATA drivers from within the OS to ensure proper installation.

6 responses so far ↓
Manoj Patil // January 16, 2008 at 5:54 am
Hello,
I have tried above with no luck. My scanarios is a bit different. I have Toshiba Tecra M5 and a Toshiba Protege M600.
My M600 came with vista preinstalled whereas Tecra M5 is with XP.
I wanted to stop using Tecra M5 and hence removed its hard disk and connected to M600. As expected, the disk was not sensed by M600.
I tried the above steps and got stuck at step 6.
This what I did
1. The Tecra M5 disk was put into an external SATA disk drive case. This was then connected to a usb port of a another Tecra M5(third machine).
2. All the driver files were copied to this external disk.
3. started regedit, file -> load hive and gave the external disk\system32\config\system.
4. clicked file -> import -> sata_keys.reg
At this point, the regedit gives error
cannot import c:\temp\sata_keys.reg: Error accessing the registry.
Can you pls help me what’s wrong here ?
Pls note that I am not using imagex here to mount the image because I dont really have an image.. I just have an hard disk with a complete installation of Win XP and I want to connect and use it with M600.
Since the regedit stuff failed, I thought to connect this hard disk to M600 hoping that it may be able to see the iastor.sys newly copied but as expected, it could not !!!!
If I were to use imagex, how do i proceed in this case because I dont really have an image, but I have an hard disk with the complete installation and I really dont want to do the XP repair or Install again as my hard disk has a lot of applications and credentials already configured
mypkb // January 18, 2008 at 6:20 am
Manoj,
I would check the properties of the system hive you loaded into the registry. On the General tab, make sure that Read-only is not checked, on the Security tab, make sure that you have Full Control permission on the file.
Sujies // March 9, 2008 at 10:29 pm
Hi,
i treid the same with my compaq laptop
v 6409tu
and got the same error cannot access registry
and i ve checked the permissons and they are correct
Also there is no Security tab on the properties of the file maybe because im using fat32
any suggestions?
Suji // March 10, 2008 at 12:58 pm
Hi, im using a compaq laptop and have the same problem,
Cannot access Registry
I have checked all security options and they are ok
Is is because i ve manually integrated sp2 into the install cd?
Steve Rochford // April 10, 2008 at 8:56 am
This is brilliant - thanks so much!
For Manoj and Suji - if you’re still having problems then it might be because you’re trying to load the .reg file and you haven’t loaded the hive to the place it expects.
The article says “load the hive and call it TEMP - it can be anything you want”. This is true but if you don’t call it temp and put it in HKEY_USERS then you need to adjust the reg file so that it’s trying to load to the same place.
Brian // May 29, 2008 at 3:12 pm
This looks so promising. I am trying to avoid intalling a floppy drive on top of sysprepping and reimaging.
I’ ve mounted my WIM, added the drivers, modded the registry and unmounted /commit ed the changes.
When I image my box with the modded image I get error windows cannot start because the file windows\system32\config\system is missing or corrupt.
Any thoughts, prior to finding this the image did as described, blue screened.
Leave a Comment