Wednesday, May 25, 2011

Deception: An error's best friend

I recently had the misfortune of having to work on a friend's computer.  The problem was that it wouldn't boot up.  It was returning the following error message:
Windows could not start because the following file is missing or corrupt.
<Windows root>\system32\hal.dll.
Please re-install a copy of the above file.
Looked easy enough to solve.  I just needed to copy over a copy of hal.dll from a windows install disk to the computer's system32 directory.  For somebody like me, not a problem.  I popped in my handy Linux Mint live CD in one drive, the Windows XP installation disk in the other, and booted into linux.  Inspection revealed that hal.dll did in fact exist on the computer's hard drive, but its size did not match the one on the CD.  Just in case, I backed up the local hal.dll before copying over the one from the disk.  After that, I removed the discs and rebooted into Windows.

No dice.  Exact same error message.  That makes no sense.  I did EXACTLY what it told me to do.  So I decided to google.  After a while, I came up with this.  Apparently, there were three options: the Master Boot Record got corrupted or went bad (not it), hal.dll got corrupted or lost (not it), or hal.dll and ntoskrnl.exe are mismatched.  Bingo!  That had to be it.  So I repeated the same process as before, but instead copied over ntoskrnl.exe, making a backup of the original.

Exact. Same. ERROR MESSAGE!  Yeah, this was starting to piss me off.  To take my mind off of the frustration, I decided to do something completely different: dust out the computer. I took it outside and, using an old hair dryer, blew the vast majority of the dust out.  It wasn't as effective as compressed air cans, but it did well enough.  The processor's heat sink was no longer covered with a solid layer of dust.  Did I mention that this computer was 7 years old and never got opened up once?

After taking it back inside and plugging everything in, I decided to see if somehow dusting it fixed the problem, since I was completely out of ideas.  It didn't, but something happened.  For about 1/60th of a second, different text was being displayed.  I didn't have enough time to read all of it, but I caught out of it BOOT.INI.  That had to be it.  Something must have changed boot.ini in such a way that it caused windows to report the wrong error message.

Turns out that I was right.  Following the instructions, I regenerated boot.ini through the recovery console and restarted, booting from the drive.  NO ERROR MESSAGE!  Yay.  Wait, what does "autochk.exe not found" mean?  Hopefully it's nothi-it is.  The computer just blue-screened.  Here's the error:
stop: c000021a
The Session Manager Initialization system process terminated unexpectedly with a status of 0xc000003a (0x00000000 0x00000000).

The system has been shut down.
Doing research found that the most likely cause was a client service malfunctioning.  The solution was to boot into safe mode and disable said services.  But I couldn't do such things because the computer can't boot at all without blue-screening.  So I was screwed.  There was nothing that could be done to save the computer.  Unless...

I still had the original hal.dll and ntoskrnl.exe files backed up!  Since those files weren't the issue to begin with, maybe, just maybe, by restoring the originals, the computer will boot up.  So I used my Linux Mint live CD, restored the originals, and voila! IT WORKED!  It successfully booted up.  The computer was completely restored to how it was before the error.

I wasn't ready to call it a day just then.  I still had more work to do.  The computer was still running very slowly; my netbook could do circles around it.  After disabling a number of suspicious processes and services, I downloaded Spybot Search & Destroy to get rid of all the spyware and adware that could be on it.  I also replaced Norton, the worst anti-virus software I've ever had the misfortune to use, with Avast, by far the best free anti-virus. I also installed a lovely little Firefox extension known as Adblock Plus and set it to use the EasyPrivacy+EasyList subscription.

As far as I know, the computer is not only working, but is also running better than ever before.  The combination of eliminating a massive amount of spyware and unnecessary services as well as dumping Norton and dusting out the computer made a world of difference.  I hope that if you're somehow reading this, considering that all of maybe two people regularly read this blog, you'll have learned something about Windows: that it's so screwed up at its core that it can't even give you the right error messages, so you really should just use Linux instead.  Of course, that could be a bit difficult, so if anybody is interested, I'll be more than willing to type up a tutorial for somebody with minimal computing ability to get a Linux desktop fully up and running.  You'll be surprised at how easy it is.  So, if you're interested, leave a comment below.

No comments:

Post a Comment

Copyright Notice:

All text (unless otherwise attributed) is copyright (C) 2011-2014 Joel "iLag" Hammond and licensed under the CC BY-SA 3.0 License.
Creative Commons License