zomgistania

Main page | About | Articles | Previous Posts | Archives

Friday, July 28, 2006

Who said a format/reinstall is the only option?

I wonder how many times in the past I have reinstalled Windows 95, 98, and 98SE because something screwed things up. You probably have done that as well.

Many people kept on reinstalling Windows after MS launched 2000 and even XP, even though they had excellent recovery and repair tools and lost much files and data. Even for minor things like a new graphics card.


I have used Windows 2000 Professional for years. Never had to reinstall it or format the drive. The computer even went through a complete rebuild! Only the harddisk was swapped from the old, and it still kept going! Whoever said Windows isn't stable doesn't know crap about it.


When I switched to XP, I didn't know it would require me to install a patch, namely Service Pack 2, to support big disks like the 200 gig disk I have. It screwed up the partition table on the disk and there went my 200 gigs of data, including the installation of the Windows.

Back then, I used GetDataBack for NTFS to restore my important files. It was a pretty good tool, although some files got a bit corrupted.



Now the disk flattened the partition table. Again. I don't know why, but it happened.
This time I had more important files and didn't want to risk any corruption because it was honestly said pretty annoying.


The Ultimate tools for Windows system recovery

Starting from the Recovery Console on Windows' XP and 2000 disc. It lets you do basic operations in a DOS-like environment like copying and renaming files on the disk. It also lets you fix the boot sector and Master Boot Record (MBR) which is very useful in some situations.

The second tool for recovering a dead system is of course The Ultimate Boot CD. It has a big batch of useful tools ranging from disk formatting utilities to antivirus. There is a very useful tool on the disk called TestDisk which recovers lost partitions. In my case I had two partitions on the 200 gig disk and all I had to do to get them back was boot into UBCD, choose TestDisk, select the 200 gig disk as the target drive and it would do the rest on it's own, only asking me for confirmation or possible changes.


And now let's continue the story for a short moment: after recovering the partitions with TestDisk, I tried to boot back into Windows. Windows XP would start loading... then it would give me the sign in prompt. I thought that was it... until I noticed the keyboard and mouse didn't react to my input!


This time firing up the recovery console, I went into c:\windows\system32\config and backed up system from that dir. Then I copied over c:\windows\rescue\system to the config dir. Back to Windows again... thinking "Did Windows move to C... don't tell me it did.". You see, I had Windows on drive F! I knew it would cause me problems if it had moved to the letter C...


Back to windows again. The keyboard works, mouse didn't. Well, whatever, let's just sign in!
Waiting a while for the things to load... hey wait, why am I being logged out?
I was logged out automatically every time I tried to log in. No matter which user I tried. Same thing happened in Safe Mode as well.


I googled around a bit and found out this could be caused by a file called userinit.exe being looked for from the wrong place. hmm. C:\Windows\userinit.exe... F:\Windows\userinit.exe... See the problem?

and now comes in the third tool for ultimate system recovery!
The Ultimate Boot CD for Windows!

Creating this baby required some help from my buddy, thanks to him. It contains a Windows pre-install environment loaded with recovery and diagnostics tools.
A windows pre-install environment is a shell like Windows so it's pretty easy to use as well.

Now, to fix the partition letters to the correct order!
First I fire up regedit and explorer for the pre-install windows. I check which drive is which from explorer and go to HKEY_LOCAL_MACHINE\SYSTEM\MountedDevices and make a dump of that and open it in notepad.

After this, I opened the Remote Registry Editor on the desktop which lets me edit the registry on the actual windows installation on the harddisk.

I went again to the mounted devices hive in the registry and started looking how the \DosDevices\X: entries were labeled... I renamed them so the drive letters there would match the order they should be in Windows... \DosDevices\C: goes to \DosDevices\F: and so on. Pretty simple stuff.


Okay now I was done. Time to see what happens when I boot to windows!

and... it worked!



Anyway, all in all this took really really many hours to accomplish. Why? Because I didn't have the tools around. If I had had them, it wouldn't have taken very long to fix all this. So.. the next time you encounter a problem... think a bit before formatting, you might learn something in the process, even if you can't fix the problem!

Here are links to the tools I mentioned:
The Ultimate Boot CD
The Ultimate Boot CD for Windows

1 Comments:

  • This will certainly come in handy! Thank you very much.

    By Anonymous Anonymous, at 9:19 AM  

Post a Comment

<< Home