Changing the motherboard or storage controller underneath Windows XP and Vista

Can you change your motherboard without reinstalling your operating system? Sometimes you can, sometimes you can’t. Last week I decided it was time to upgrade the desktop PC on which I do much of my work. The old motherboard was nearly three years old – an Intel 915PBL, which I purchased in order to run 64-bit Windows XP. At the time I was indignant because the BIOS swallowed a full 1GB of my RAM.

Technology has moved on, so I purchased an Intel DP35DP board (I still have a high regard for Intel’s manufacturing quality) and a core 2 quad Q6600 processor. I appreciate that this is now not quite leading edge, but it has been out long enough to be a reasonable price. So I backed up my files, performed the motherboard surgery, and switched on.

For sure I was not depending on being able to continue without reinstalling the operating system. This is not a supported procedure. On the other hand, I figured it would be interesting to try; and so it proved. After all, I’ve had enough trouble installing things like Visual Studio 6 and Adobe Creative Suite 3, not to want to repeat the experience.

My desktop PC is a little complex. There are three SATA drives and three Windows installations. One is Window XP x64 (the original installation); one is Windows XP Pro 32-bit; and one is Windows Vista Pro 32-bit. I work mostly in Vista. Initially, none of these worked with my new motherboard. Attempting to boot Vista caused an immediate restart, and both XP installations blue screened.

The key problem is the storage controller. Typically, you will get a STOP 0x0000007B if your new motherboard has a different storage controller than the old one. The above link is to a Microsoft knowledgebase article for Windows XP, and you will see that it suggests two solutions. One is to perform an in-place upgrade, also known as a repair install. This is where you reinstall Windows to the same location, and it sorts out the device drivers and other critical problems without blowing away your documents or applications. The other is to do a new clean install – not really a fix, more an admission of failure.

Vista no longer supports repair installs. More on this later.

Note that the main issue is getting Windows to boot. Once it does boot, you will likely get all sorts of device errors, but these can usually be fixed. Fixing stuff if you cannot boot at all is more challenging.

Health warning

Since you are still reading, I assume you are in one of two categories. Either you are inquisitive about the innards of Windows; or you have a problem because Windows will not boot. Here’s my disclaimer. The steps I describe below are not supported, guaranteed ways to rescue Windows; and if you experiment with a working Windows installation, you could break it. If you try any of them, it’s at your own risk.

The AHCI problem

Intel’s new boards usually have three settings for the SATA controller. One is IDE, which is best for legacy compatibility. One is AHCI (Advanced Host Controller Interface), which is best for features. The third is RAID, which combines AHCI and a sort of hardware RAID (sometimes known as fakeRAID because it isn’t really hardware RAID, but never mind). Intel boards used to default to IDE, but this one defaulted to RAID which is now Intel’s recommendation. Even if you only have one drive, you can easily set up RAID later if you start with that setting. If you plan to install Linux, you might be better off with plain AHCI.

Repair Install on XP x64

For my first experiment, I tried a repair install on XP x64. It did not go well. There was some minor awkwardness. Intel supplies the crucial RAID drivers on antiquated media called floppy disk. You need this during Windows setup (press F6). However, the motherboard has no Floppy Disk connector; you have to use USB. Luckily I have a USB external floppy which came with a laptop some years ago, so that bit worked. Unfortunately, the repair install seemed to hang on a screen which said “Installing Devices” and promised to complete in 35 minutes. I left it overnight and it said the same thing in the morning, though it had not technically crashed and who knows, perhaps it would have completed one day.

If you ever hit this issue, read this thread. What you have to do is to restart the machine and press F8 to get the advanced startup options. Timing this may be tricky, since setup configures itself for immediate startup. If you get really stuck, find some way to edit boot.ini to insert a delay. Once you have pressed F8, choose the Debugging mode. The repair install will now complete within a sane time. There’s another solution discussed in the thread I’ve referenced above, which involves identifying which device is causing the hang and then preventing setup from attempting to install it; but the Debugging option worked fine for me.

As it happens, I didn’t discover this fix until later. I got diverted by 32-bit XP.

Fixing 32-bit Windows

After getting stuck on XP x64, I took a look at 32-bit XP. The X64 repair install had mucked up the boot menu; but that’s easy to fix from a recovery console. Being a little discouraged, I decided to try the legacy IDE settings for the SATA controller. Good old XP Pro then started, no hassle, no need for a repair install. It detected various new devices, and I ran the Intel driver utility from the CD that came with the motherboard. I also had to reinstall the NVidia graphics driver. My first success.

First attempt with Vista

Vista on the other hand still would not work. It is less amenable than XP to controller changes; I gather this may be something to do with speeding up the boot process by disabling “unnecessary” drivers. Anyway, it blue-screened irrespective of the setting for the SATA controller. It was then I discovered that Vista has removed the option for a repair install. What you do instead is to boot from the setup CD or DVD and choose the option to “Repair your computer”. Then it runs a Startup Repair wizard which tries to fix your Vista. I tried this on all the SATA settings, and it failed. On the first try it thought it might have succeeded and invited me to restart Windows, but it still blue-screened. On subsequent attempts the wizard made some lengthy disk-checking efforts only to inform me that I had a corrupt volume and should give up.

I’m not impressed with Startup Repair. I think XP’s Repair Install is brilliant, and Vista’s Startup Repair is brain dead. I’ll explain shortly.

You can do a sort-of repair install with Vista by “upgrading” an existing install – but you can only start an upgrade from within the instance of Windows that you want to upgrade. In other words, if you can’t boot then this is not an option. Do NOT do an over-the-top clean install. You will lose all your settings.

At this point I nearly gave up and did a clean install of Vista. I still had the nagging thought that if only I could get Vista to load the right storage controller driver, it would probably start up. So I left it for the moment and went back to 32-bit XP, my success story. I wanted to discover if I could switch to the SATA RAID option without breaking it.

Switching an installed Windows OS to AHCI or RAID

This thought led me to an illuminating discussion. This explains that if you want to switch Windows to use a different storage controller, for which the driver is not installed, you do so by manually copying the driver to system32\drivers; and editing the registry so that Windows can use the new driver when booting. For this to work, you need to know the hardware ID of your controller. This is something like:

PCI\VEN_8086&DEV_2822&CC_0104

One way to find this ID is to clean install a second copy of Windows to a temporary location, and then look at the storage controller properties in device manager. Alternatively you can experiment with some likely values, or try several at once. The discussion I’ve linked provides some reg files which show the critical entries.

This looked interesting, so I followed the steps in the first post of the thread, shut down, then restarted with the BIOS setting changed to AHCI. Success – XP Pro started, and I was able to run Intel’s driver setup to clean up the installation.

Getting more confident now, I found the hardware ID for the RAID controller (the hardware ID changes when you change the BIOS setting) and added that to the registry. The actual driver is the same. Success again – XP now started using the Intel Matrix Storage RAID.

XP was done now, especially as I also discovered the fix for x64 described above. But Vista, the one that mattered to me most, was still broken. Nevertheless, I now had a much better idea of how to fix it.

Offline registry editing

Now is the moment to mention a little-known feature of the Windows registry editor. 99% of the time, you edit the Windows registry from within a running instance of Windows. However, the registry editor has an entry in the File menu called Load Hive. The way this works is not particularly intuitive. You select the root of HKEY_LOCAL_MACHINE, then choose Load Hive and navigate to a registry database file that is not part of the active registry. In my case, the hive I needed to load was SYSTEM, located in System32\Config. You may possibly know this if you have ever had to recover Windows when it will not boot because of registry corruption. When you click OK to load the hive, the registry editor prompts you for a key name. Enter something like “Vista Repair”. The loaded hive then appears as a sub-folder under HKEY_LOCAL_MACHINE.

There is no Save; simply make the edits you want, then select the top level of the loaded hive – eg. “Vista Repair” – and choose File – Unload Hive.

This had to be worth a try. I booted my poorly machine into Windows XP, then went to another machine on the network running Vista. I copied the SYSTEM hive from the broken Vista across the network, made a backup, then loaded it into registry editor. Finally, I manually made the changes pretty much as in the reg file used to migrate XP to a new storage controller, though what I actually did was to pattern the changes on an existing storage controller entry in the working Vista registry. Note that an offline registry has no “Current Control Set” hive. This is actually a runtime link to ControlSet01. So, for offline editing, you edit ControlSet01.

I also made the normal registry fix for enabling AHCI on Vista. Then I unloaded the hive and copied it back to my broken Vista. I also added the actual driver to system32\drivers, of course. In my case the driver is called iastor.sys, from Intel’s floppy disk.

Vista boots

The result was amazing. I restarted the PC with the new motherboard, and instead of a blue screen I got:

Press CTRL+ALT+DELETE to log on

Nothing much to add now. I logged  on, installed various drivers, and everything works. I have a quad core CPU:

and an Intel RAID storage controller:

Vista itself seems fine. It is solid and significantly faster than before, as you would expect.

Thoughts on Vista Startup Repair

Despite my success, I’m not impressed with the Vista Startup Repair. First, why couldn’t Microsoft’s wizard do what I did manually? Second, why has the excellent Repair Install option disappeared from Vista? Vista’s repair and restore options seem to presume that the hardware has not changed; yet I’d have thought a replaced motherboard would be one of the more common scenarios where you would want to repair a Vista installation.

The whole business of changed hardware is something of a dark secret in Windows backup and restore. In an enterprise environment it is not so bad, because you have redundancy, and a single failed machine (server or workstation) should not be a problem. Something like Small Business Server is different, because typically this is a single, business-critical machine. If your 2-year old Small Business Server box disappears in the night, and you purchase a new box and stuff in your backup tapes, it will not necessarily be easy to restore.

Still, I must also credit Windows with considerable resilience once it can find a working storage controller driver. It pretty much sorts itself out after that.

Coming next: a clean install of 64-bit Vista. It makes sense.

PostScript:

Anyone interested in this esoteric topic is also advised to read this article on ArsTechnica and this related thread. Note the advice on removing non-present devices from device manager. There’s also this Microsoft article (non-Vista) which is a variant on the Repair Install. Let me also note the main area of uncertainty regarding repair installs: it may not be safe with regard to recovering a fully patched system. In principle you can re-apply service packs or hotfixes, but what if Windows Update thinks a hotfix has already been applied when in fact it has been undone? It’s a good question and I’m not sure at the moment what the answer is.

The Microsoft article above also makes an interesting point about OEM licenses. If you replace the motherboard with something other than the same model, it is considered a new computer and OEM licenses cannot be transferred.

VN:F [1.9.18_1163]
Rate this post
Rating: 9.7/10 (3 votes cast)
Changing the motherboard or storage controller underneath Windows XP and Vista, 9.7 out of 10 based on 3 ratings

Related posts:

  1. Changing the motherboard under Windows 7
  2. Performance: Windows 7 fast than Vista, Vista faster than XP
  3. When remote desktop does not connect: changing Windows DNS setttings remotely
  4. Hands On with Storage Spaces in Windows Server 8
  5. Mixing Hyper-V, Domain Controller and DHCP server

16 comments to Changing the motherboard or storage controller underneath Windows XP and Vista

  • MS has a utility called devcon that was originally for XP but works for Vista. You can find the device ID with it, and I’ve used it to weed out missing NIC drivers that persist in hanging around and causing problems in the network stack.

    For that matter, properties in devmgmt.msc will yield the ID but that will not help after the machine is moved over. I wonder if it’s listed in the device .INF file somewhere?

    I think this poses a serious problem for Windows Server 2008 (an OS I otherwise like very much) since it is not at all uncommon to have to reinstall on different hardware and specifically different disk subsystems. I have run SBS 2003 at home and at work, and my home machine has had to be rebuilt three times in the lifetime of SBS. As I expect to move to 2008, I’m going to have to develop a scenario for this (course I’ll blog it!) Your offline driver file replacement sounds ugly, but if it can be codified, that might be the best we can do.

    Why oh why didn’t MS just incorporate the excellent drivers-from-media scheme from the Vista/2008 install into the primary boot loader?

  • Also to answer a question about updates and repair installs: Windows will rip out at least some of the updates. I’ve found that I need to run Windows Update and let Windows roll the updates forward after a repair install. It should be the first or second thing you do after you’ve rebooted and verified that things are in order. Once done, a repaired XP system is practically identical to the original system in stability and functionality.

  • tim

    Thanks David. I’ve had good luck with repair installs too, but there is always a nagging worry that it might confuse Windows Update and leave a file unpatched.

    Tim

  • Jacob Evens

    Had a Motherboard go south on me.

    The old one had a ich7r while the new one is a ich9r.

    When booting I get a flash of the “Inaccessible boot device” and it goes into an endless boot sequence.

    I made a slitstream disk that allows me to boot into a repair or installation/repair mode that can see my RAID0 drives.

    I tried the install/repair but after completing , it goes back to the blue flash error again.

    I can get into a repair console and see my drives/windows installation but am not sure what to do to fix this.

    Thanks!

  • tim

    Follow the links I’ve included, might give you some ideas.

    Tim

  • I do a lot of Dell Motherboard replacements, and have found out that some software will also go out and look for the Asset Tag Number from the Motherboard. (also known as a Tattoo, by some OEM’s)

    If the software cannot verify this number, it can cause the system to reboot or do all sorts of things. Especially security related network software.

    Dell and other OEM’s have a download area with small programs, that will update the Asset Tag.
    And some Motherboards like Dell’s will come with a Bootable CD with this software already on it.

    Just some more to look out for, when changing a Motherboard in a system.

    Mike

  • jdj

    Tim,

    Thanks… I’m a DIY guy without very much experience & not enough sense to leave well enough alone. I’ve been very frustrated with my attempts to upgrade my motherboard, and your solution for the XP OS saved me another sleepless night.

    Thanks again!

  • arda özgül

    Hi,

    It is great information. Bu I am good at this but I don’t understand this “Finally, I manually made the changes pretty much as in the reg file used to migrate XP to a new storage controller, though what I actually did was to pattern the changes on an existing storage controller entry in the working Vista registry.” How did you find related reg keys? search with hardware ids? or… thanks

  • tim

    @arda

    The example reg keys in the thread here:

    http://forums.pcper.com/showthread.php?t=444831

    show the entries you need to look at – you need to match the hardware IDs to your actual hardware of course.

    I used an existing storage controller entry as a guide to get the various parameters right.

    Tim

  • Ed

    The “BIOS” swallowed 1gb of your ram. What the hell does that even mean?

  • tim

    The “BIOS” swallowed 1gb of your ram. What the hell does that even mean?

    The BIOS uses the upper level of the 4GB address space for its own functions, which means it can’t also be used as RAM. Some systems get round this with a technique called remapping; but many do not. In consequence, up to 1GB of your 4GB RAM may be wasted. The problem only occurs if you fit 4GB.

    Tim

  • Edward

    You glossed over the most important part, actually editing the registry.

  • Rizwan Rana

    Just came across this article and it really helped me a lot. Thanks for your efforts for helping the community.

    I was using Asus Maximus II Formula motherboard (which is a P45 chipset board) with two OSs XP Pro and Vista Ultimate 32 on separate HDDs . Had to dispose off the board for some reasons and then installed another Asus board with G35 chipset (a downgrade from P45 to G35). Now everything seems to work fine and XP Pro and VISTA boots with out issues. The only problem is that after the initial start-up screen with ASUS logo and devices info the system waits too long to get into the OS selection menu. I am quite clueless at this point what to do in order to get rid of this delay. Any help in this regard will be highly appreciated.
    Cheers

  • Hello, although this article is quite old, I’ve found your article interesting and hopefully useful. I’ve been trying to get my Windows7 Partition to boot from within VirtualBox on Ubuntu. The problem is when it boots in the Virtual Machine… I get the Windows boot logo, then a BSOD as found here (http://www.developerfusion.com/community/blog-entry/8393454/fixing-a-virtualbox-windows-xp-blue-screen/) Everything points to the way Windows handles changed hardware (from native to virtualized hardware), which led me among other places to your article. Now I’m going through trying to find the relevant needles in the haystack to replace from a working VirtualMachine of W7 to my native copy of W7. I don’t HAVE to virtually boot from my partition, but it would make life easier. I could alternatively have a separate W7 VM, but that would seem redundant as I certainly need the W7 native boot occasionally for processor intensive operations and applications.

    It would certainly help if there were a way to effectively reset HAL or the registry so that upon booting it would discover the new devices. Any ideas? Right now, I’m just comparing registries and booting between them. Boring.

  • I was able to accomplish what I set out to do using this site (http://www.virtualbox.org/wiki/Migrate_Windows) from Virtualbox wiki. Basically in order to get windows7 to recognize the hardware, it has to be in the registry. I used IDEMerge to add the default values of a Virtualized hardware set. The only thing is that Windows has to be booted two-three times using the startup repair to switch between native and virtual modes.

  • tim

    Thanks for letting us know Wesley. Two or three startup repair boots would defeat the object for me, but I guess it is better than nothing!

    Tim