Tuesday, 4 September 2012

Solution for Win XP 0xc0000218 {Registry File Failure} The registry cannot load the hive




So my 9 year old Dell Inspiron 510m laptop running Windows XP Service Pack 2 crashed last week with a Blue Screen of Death (BSOD) message.

Stop: 0xc0000218 {Registry File Failure} The registry cannot load the hive (file): \SystemRoot\System32\Config\System or its log or alternate. It is corrupt, absent, or not writable.

Rebooting in safe mode doesn’t work.

Rebooting after running Full Diagnostics doesn’t work, the laptop is always stuck with this failure.

The Microsoft link http://support.microsoft.com/kb/822705 is a good starting point but I tried many things to finally get it working, so actually this article is also a Solution (rather a Workaround) for the following other errors that you may face:

Windows XP not accepting the Administrator password in Recovery Console

Windows XP Setup stuck at License Agreement – F8 key not working

So the sequence of events, trials and failures are as follows – these may help you in the future.

 

Trial 1:  Run the Recovery Console from the Windows Setup CD to fix the system

If you have the setup CD, then rather than formatting the whole drive, you could attempt a recovery using the setup. In this way, you will still be left with your settings and files intact.

Now when you try this, you see a screen as below asking for the Administrator password.














But you don’t remember your Admin password – or like me you swear you never set an Admin password at all – so you leave it blank and press <Enter>.

You get a message saying the password is invalid. This goes on for 3 attempts and then you have to exit the recovery.

Some links state that Dell laptops are preloaded with sysprep which requires you to set a password on first usage, but it’s been so long I don’t remember doing that.

I also tried rebooting with F2 into the BIOS and scrolling to the page on which quite clearly it says

Administrator Password: DISABLED

So I ENABLE it and try setting one of those, save the settings and try the recovery again. And again. And again.

It still doesn’t work.

 

Trial 2: Attempt to recover the admin password as part of a Repair of Windows from the Installation CD.

This link http://en.kioskea.net/faq/4716-xp-recovery-console-admin-password-forgotten mentions a technique by which you can run the Setup and then choose Repair and then get access to User Accounts in the Control Panel.

So only one problem in this approach – while trying the Setup you reach this step.

When you get to the Welcome to Setup screen, press ENTER to Setup Windows now

The Licensing Agreement will come next - Press F8 to accept it

But when I try to press F8, nothing happens. It just stays there. All other keys work such as PageUp, PageDn and Esc to quit.

So the things to try at this point are use Function key Fn + F8 together. Doesn’t work.

Try all other F keys from F1 to F12, with and without Fn key. None of them work.

For good measure, try Fn + 8 rather than F8. Nope.

Try almost all other keys on the keyboard (except Esc).  Try all of them with Shift, Ctrl or Alt. Try all of them with NumLock on and off.

After all of these fail – try plugging in an external USB keyboard. Many sites says the PS/2 keyboard works, but of course this laptop does not have the PS/2 connector port.

Try BIOS options to change the F8 key, didn’t see any such options.

 

Trial 3: Recover the data from the hard disk first and overwrite the corrupted Hive files. [SOLUTION]

 

At this point, I got myself an IDE adapter casing with a USB cable. I removed the Hard drive from the laptop and was able to copy over all my data onto another PC.


Manual Recovery of Windows registry, c:\windows\system32\config\system - software, or corrupt hive file or hal.dll errors with no CD.

 

Now that I had the original hard disk connected as an external hard drive (connected as G:\) , I went into an earlier System Restore point using the cmd prompt.

From the snapshots available on the disk, back up and then copy the software, system, sam, security and default files over as per the Microsoft list at http://support.microsoft.com/kb/307545   
Note: G:\ is the original laptop hard drive now connected via USB

copy _registry_machine_software g:\windows\system32\config\software

copy _REGISTRY_USER_.DEFAULT g:\windows\system32\config\default

copy _REGISTRY_MACHINE_SECURITY g:\windows\system32\config\security

copy _REGISTRY_MACHINE_SYSTEM g:\windows\system32\config\system

copy _REGISTRY_MACHINE_SAM g:\windows\system32\config\sam

Once all the copies were done, I fitted the drive back into the laptop and it booted up normally.

 

How to connect Raspberry Pi Pico to a external temperature sensor(DHT11 or DHT22)

How to connect Raspberry Pi to DHT 11 / DHT 22   Connect your DHT11 sensor to the Pico accordingly -   Left pin (Signal) - GPIO Pin 22 (or a...