When Windows gets smashed

Sunday, August 13, 2006

Restoring Windows and re-activation

If you have to restore windows it might ask you to reactivate. If you are stuck in safe mode, or your internet connection is not direct (say it might be an ADSL modem rather than a router) then this is a pain.

To avoid this, back up the following two files somewhere safe then, after you restore you can simply re-apply the files and magically reactivate your XP :-

  • C:\WINDOWS\system32\wpa.bak
  • C:\WINDOWS\system32\wpa.dbl

Windows XP, NTFS and a crashed registry

\Windows\system32\config ..... is corrupt or missing
For the last few days I have been trying to get my PC from being essentially a small inefficient room heater to actually back to a useful tool for such things as posting blogs, or surfing the internet, or playing games, reading e-mail or all the many things you can do when the thing actually boots up into Windows XP.

But, what if the registry gets corrupted. If you receive a message such as "\windows\system32\config\system" is missing or corrupt you may have a mjor problem. The same situation for the following files:-
  • \windows\system32\config\system
  • \windows\system32\config\default
  • \windows\system32\config\sam
  • \windows\system32\config\security
  • \windows\system32\config\software
If these get broken you cannot reboot.

What you do is replace the \windows\system32\config files above with the "factory install" versions in \windows\repair. This enables you to boot up into something of a hybrid between a fresh install of XP and the working machine you had before Bill Gates massive single point of failure (the registry) came into action.

Microsoft has a knowledge base article on restoring your registry

Here is the rub, the first steps are instructing you to use a Bootable XP disk (it mentions a floppy but more on that later). I cannot boot from my XP install CD - it came from an MSDN distribution - yes Microsoft's expensive developer support programme - b&^%$&s.

I installed XP by booting to DOS with CD-rom support and starting the installation manually. At the time my drives were neatly partitioned for redundancy and ease of re-install (ha!) but as FAT. The DOS based setup can cope with FAT (and converts them to NTFS later) but for a reinstall it has no FAT to play with - so it moans about being unable to place its massive swap file anywhere and gives up. Hence I cannot get to the recovery console from my XP CD.
I am sure this could be overcome by having about 1.5Gb of FAT partition lying around for just such an ermgency, but what a waste of disk!

Non-bootable CD.
The solution is to boot from the XP installation floppies which MS is quite coy about the existence of, and really doesn't want to support going forward. But at least they can be downloaded from Microsoft's support center (sic).

NTFS4DOS - warning
I am sure this is a great tool, but the read only version is obviously useless for the task above, and the read/write private version simply does not work. It hangs when writing the files to the NTFS disk. It might be that it was running out of memory, but frankly even my desires to probe away at fixing problems can't face fiddling with decades old expanded memory managers and so on.
If, all you want is to copy some files from NTFS to a floppy, or a USB memory stick (more fun under dos) then go for it, but NTFS4DOS will not easily help you with this task.

Windows XP Recovery Console
If you boot from the above floppy boot set, then you can get to the recovery console and essentially follow the above instructions for recovering your registry.

You may well be asked by Windows to re-activate, in which case my next blog entry might save yuo time in the future.