HOWTO: Recover Windows after mainboard replacement
Published on 2008/01/20 by Igor Levicki
We all know that there are certain situations where being hasty can cost us a lot of effort. Recently it happened to me, only I decided to find another way out, and I succeeded.
In anticipation of Penryn CPU launch I decided to upgrade the mainboard since I learned that D975XBX definitely won't support it. I was already using Intel Matrix Storage Technology (400 GB in RAID0, 32 GB in RAID1 on two 250 GB WDC RAID Edition drives), so I needed a mainboard with a southbridge which has RAID functionality.
I settled with Gigabyte GA-P35-DS3R (more on how I decided to get that particular board in another article), I dismantled everything, replaced the mainboard, put everything back together, and powered on... those more experienced amongst you are probably laughing at me right now because you already know what I faced — a BSOD!
Right... how could I have forgotten to change from Intel Matrix Storage driver back to Microsoft standard IDE driver beforehand? After all it was possible, because my system drive was not part of a RAID array so I would just temporarily lose access to the RAID volumes.
The answer is simple — haste. We all burned ourselves by being hasty at least once. Only this time there was no way I would accept yet another Windows reinstallation. Here is what I did to recover from that dreaded STOP 0x0000007B.
I already had Intel Matrix Storage driver installed. Since that driver is unified (capable of handling all the flavors of ICH7, ICH8, and ICH9 RAID controllers), it was just a matter of letting it know that the southbridge has changed. But how?
All hardware information in Windows is stored in a SYSTEM registry hive which can be found in C:\WINDOWS\SYSTEM32\CONFIG folder. The habit of keeping Windows installed on FAT32 partition again came in very handy, because I had unlimited access to all files, and I was able to use disk and file editing tools.
I checked out iaStor.inf which you can find in C:\WINDOWS\INF under the name oem[n].inf where [n] is an arbitrary number (or on a SATA/RAID driver floppy which came with your mainboard), and figured out PCI device IDs for ICH7R and ICH9R SATA controllers — 27C3 and 2822. I opened SYSTEM hive using the hex-editor, and realized that I will also need subsystem and subvendor IDs, so I wrote those down too — 58428086 and B0001458.
You can find the first one in the SYSTEM registry hive, and the second one by checking out the device list printed out by the BIOS (you disabled "Full Screen Logo Show" option, right?)
Then I went through the SYSTEM hive with the hex-editor and edited all occurences of:
pci#ven_8086&dev_27c3&cc_0104
and:
VEN_8086&DEV_27C3&SUBSYS_58428086&REV_01
to match the new IDs.
Of course, I made a backup of the SYSTEM hive in case I make a mistake, but it worked flawlessly the first time. System booted, found some new devices and asked for a reboot. After rebooting the system, I ran Intel Chipset Software Installation Utility again — only then all mainboard devices got properly installed. I could have done that step manually by selecting each device and clicking on "Update driver..." but that would be much more work than just running setup.exe. The only thing left was to reinstall the video drivers and I was back online.
So, what is the lesson for today?
If you have already messed up, don't shrug it off and don't go down the "easy" path — use some brain instead, because not using it was what caused the mess in the first place.