Windows XP Pro Boot Up Problems: hal.dll, then ntoskrnl.exe, then repair installation not available, then mouse/keyboard don't work...!

Posted on 2008-10-28
Medium Priority
Last Modified: 2013-12-09
Wow, I've never seen anything like this.  A lot has happened here, and I'm going to try my best to walk everyone through what I've already done.  In short, my computer was working perfectly fine one evening, and then the next time I turned it on it suddenly seemed to have corrupt file issues.  Here's the deal:

I last used my computer successfully just a little after midnight on 10/16/08.  Nothing usual occured during this usage that I can remember, and I don't recall any issues with it shutting down.  It MIGHT have done a Windows update, but I don't remember that specifically either.  Just the same, the next time I turned it on, it didn't even make it to the Windows XP splash-screen.  Instead, I got this error message:

"Windows could not start because the following file is missing or corrupt: C:\windows\system32\hal.dll.  Please re-install a copy of the above file."

Naturally, I jumped on our other computer and started searching the net for this issue.  I came across this site: http://pcsupport.about.com/od/findbyerrormessage/a/missinghaldll.htm, and proceeded to go through the steps.  It definitely wasn't a one-time fluke, and the BIOS boot sequence was fine.  I could not boot into Safe Mode because the computer wouldn't get far enough to give me that option.  Ultimately, I did get go into the Recovery Console and ran all of the applicable commands (bootcfg /rebuild, fixboot, and chkdsk).  Eventually, I replaced the hal.dll file with the one on my Windows CD, and that got rid of this error.

After that, I received a similar error having to do with ntoskrnl.exe.  I took care of this in a similar manner, and I also recall fixing a boot.ini error along the way (probably through the Recover Console commands I used).

After doing all of this, the computer got to the point where the gray boxes gradually become a single bar across the screen from left to right (before you would typically see the splash-screen).  At that point, underneathe the unfinished bar/boxes, a different error message showed up:

"Windows XP could not start because the following file is missing or corrupt: \ WINDOWS\SYSTEM32\CONFIG\SYSTEM"

I went to a few sites that detailed several steps to take to fix this issue.  One was http://support.microsoft.com/kb/307545, but the one I followed primarily was http://webcast.broadcastnewsroom.com/articles/viewarticle.jsp?id=8658.  I performed all of the steps to backup the original startup files (system, software, sam, security, and default), delete the old ones, and copy over the files from the repair directory.  This was supposed to get me back into Windows so that I could do a system restore, but this never happened.  Instead, Windows continued to hang up and never got me any further.

Obviously, this was a real problem, as this particular issue wasn't covered in any of the instructions I found.  I tried restoring my backup files and got the same error as before.  I tried each repair startup file one at a time, and still no real difference.  At some point, I recall that the error might have shifted to \config\software instead of system, but it got me no further to a solution.

I did notice that replacing the system startup file made another minor and seemingly insignificant difference, which I'm only noting here in case one of you gurus see a pattern.  When using my original system file, the Recovery Console did not ask for an administration password.  When using the system file from the repair directory, it did.  Other than that, I got no further.  Windows startup would either lock on the gray bar or give an error message.

At that point, I wanted to do a repair installation using my Windows CD.  So, I proceeded down that path, until I got to the screen where you should be able to press "R" to do a repair installation.  The option wasn't even there!  I found an EE solution on the matter (http://www.experts-exchange.com/OS/Microsoft_Operating_Systems/Windows/XP/Q_21880331.html) and copied over the ntldr and ntdetect.com files.  No effect.  This was using my original start files, so I switched back to the repair files and tried again.  The repair option appeared.  I felt very funny about trying to do a repair installation with the different startup files in place, but I had no choice.  As you could have guessed by now, I have STRONGLY been trying to avoid doing a full reinstallation.

The repair installation continued and seemed to be going okay.  Then, at some point, a window popped up asking for a file.  Suddenly, I realized that my keyboard and mouse were not responding at all.  I checked the connections for both (which are PS/2).  They were fine, of course, as I had been using the keyboard in the Recovery Console and in selecting the Windows installation option with no problems up to this point.

Flustered as ever, I started looking for alternate solutions.  I found another EE solution that involved copying over startup files from within the recovery folders themselves (http://www.experts-exchange.com/OS/Microsoft_Operating_Systems/Windows/XP/Q_22000853.html).  That sounded like a great idea to me, so I went back to the Recovery Console and started digging in.  I found lots of those RP folders, each representing a different restore point.  I noticed that the most recent one was dated 10/16/08 12:04am and recalled that this was pretty much around the last time I used the computer like normal.  So, I went a folder or two back and restored those files, knowing that I had booted up with no problems on those days.

I attempted to start into Windows and, for the first time, I saw the splash-screen!  My hopes were up at this point, but I quickly noted how slowly the system was running.  Eventually, as I recall, I got as far as seeing a black screen with my mouse cursor in the middle...and that was it.  I left it there for a good long while, and still nothing.  The mouse wouldn't move, and the keyboard would not respond (Num Lock light would not go off, for instance).

I did more Internet searches and found a page that pointed to the mouse and keyboard drivers (http://forums.techguy.org/windows-nt-2000-xp/696794-repair-install-xp-no-mouse.html).  At the bottom of the forum, someone lists out the PS/2 keyboard and mouse drivers: windows\drivers\i8042prt.sys, kbdclass.sys, and mouclass.sys.

At this point, it dawned on me that I had an old, still working hard drive that I had replaced several months back just because the drive was over 5 years old and I wanted to be safe.  I had a contact from an IT company mirror the old drive onto my new, larger one so that all of the programs and configurations would be there (and yes, it worked just fine after a bit of tweaking and continued as such for months).  My point: the old drive was still perfectly configured for the hardware on this computer, so I booted up on this drive, got into Windows with no problems at all, and copied over those keyboard and mouse driver files to my newer, problem drive (which I had connected as a slave and was listing all files/folders just fine under Windows).

I made a couple of interesting observations.  For one, the files on the newer drive were OLDER than the files on my old drive (something like 2001 vs. 2004).  Curious, I looked at the properties for the windows\system32\drivers folders on both drives and saw that my old drive had about 2 or 3 MORE files in there than my newer drive.

After this, I switched the drives back and tried again.  STILL the keyboard and mouse didn't work!  I tried to go back into the repair installation (again, this is now working with old startup files from a time when the computer started normally), and still had the problem where it would ask for a file and the keyboard/mouse would not respond.

For the heck of it, I tried to boot into Windows again normally and noticed that I was getting boot options, because the installation had been interrupted, and the system was equating this to an incomplete startup of Windows.  I tried going into Safe Mode and noticed that the system was hanging up at a file called alim1541.sys.  I went back into my old drive and copied this file over.  Safe Mode got passed this file and into the black screen with just the cursor and the words "Safe Mode" in every corner.  A dialog box came up stating that installation could not continue in Safe Mode and that the computer needed to be restarted normally.  Well, the keyboard/mouse STILL weren't working, so I reset the thing and let it start like normal.  Now it wants to go right back into its repair installation, but it always gets to the point where it asks for a file (globalroot\device\cdrom\i386).  Still, I can't do anything because of the keyboard/mouse situation.

This is where I'm at -- totally stumped!  Before mucking this up any more, I figured I would at least check with the experts here.  My next thought has been to go back into my old drive and copy EVERYTHING from the drivers folder that was either newer or simply nonexistent to the newer drive, because of my previous observation about the files there.  I have a feeling, though, that there could be issues beyond this one folder.  So, I'm also considering copying the startup files from my old drive to see if that has an effect.  But, first, it's time to get some other opinions.

There you go, guys.  This is a tricky one.  Do I have any leg to stand on?  Have I totally screwed this thing up by running repair installations that couldn't finish?  I really hope someone can help me on this one.

Thanks in advance to everyone...even just for reading this far!
Question by:ctnovelist
  • 10
  • 6
  • 2
LVL 35

Expert Comment

ID: 22828466
Are there any files/data on the new HD that are not on the old HD and that you do not want to lose? Back them up to CD/DVD/USB using the old HD.

Then, I'd say, your best bet is to clone the old HD again yourself.

For cloning, you can use the following free software:
DriveImage XML: http://www.runtime.org/driveimage-xml.htm
SelfImage: selfimage.excelcia.org / http://www.majorgeeks.com/SelfImage_d5588.html
CloneZilla: http://www.clonezilla.org/

or the following commercial solutions:
Acronis True Image Home: http://www.acronis.com/homecomputing/products/trueimage/
Norton Ghost: http://www.symantec.com/norton/ghost

Check these out carefully, see whether they have a good enough documentation about the cloning process, then make your decision.

If you wish to be guided through the cloning process by people who have first hand experience with using the respective programme, make a new thread about it in the System Backup zone.

Good luck.

Kudos on your most explicit description. I enjoyed reading it. Experience with much shorter texts proves, however, that most experts try to grasp a problem from a quick glance, avoiding in-depth studies.
This will result in suggestions that you have already ruled out, which requires a reply in which you repeat yourself. Thus, paradoxically, your thoroughness will most likely pay out in doubling you work ;)

Author Comment

ID: 22828592
Thanks for your response.

The major files themselves wouldn't be a huge deal, but there are programs on the newer drive that I wouldn't want to lose.  It seems that a Windows reinstallation would be better than actually recloning the drive, though, wouldn't it?  Keep in mind that my old drive is from several months ago, so I could only guess what I've done since then.
LVL 35

Expert Comment

ID: 22828901
Not necessarily.
When cloning, you will only lose the last several months, and have a properly working system rightaway. When reinstalling (and reformatting, as it is usually done), you will lose the last several years and need to start from scratch with an unconfigured system.

But you might always try and install without formatting. This way, your data will remain intact, and if you do it right, you won't even have to reinstall the programmes.

Here's how I should do it:
From you old HD, access the new, rename the /windows folder to /winold, the /documents and settings folder to /oldsettings. Then start the installation. Don't format, and when you are asked whether you want to install over the old version or into a new folder, select the new folder (c:\windows).

Then install Windows and all necessary drivers.
Afterwards, boot from the old drive, select your old user folder (the one with your normal login name) in /oldsettings and copy the most important data over to your new user folder in /documents and settings; lets say following folders:
Application Data
Local Settings
(make sure you do NOT copy the NTUSER.DAT!)
Also make sure that all folders you replace are backed up somewhere, not simply overwritten.

Test boot your new system. It should have a familiar look and feel now.

In a second step, try to also replace the SOFTWARE hive of the new registry by the one on your old drive. Backup the hive you are going to replace to a save location, don't back it up in the folder where it resides!

Test boot again.
If no error messages or BSODs occur, you are set for the final step:

From your desktop and startmenu, start your preferred applications. Whenever a missing file or library is complained about, simply look for it in the /winold folder and copy it over to a corresponding location underneath the /windows folder.
The same applies when you receive errors about unregistered libraries or controls. Copy them over, then type "regsvr32 filename_and_path" in a run box or a command prompt.

This way, most, if not all of your apps could be made functional without reinstalling.

There is no guarantee that this will work, but it is worth a try and it will certainly not take longer than an ordinary "reformat".

Good luck.
Reclaim your office - Try the MB 660 headset now!

High level of background noise often makes it difficult for employees to concentrate fully on their jobs – or to communicate clearly on calls. The MB 660 headset helps you create a disruption free workspace.  

LVL 35

Expert Comment

ID: 22828927
Forgot to say:

Before you consider re-installing without a format, boot from your old hard drive, update your virus definitions and run a check on the new drive.
If no malware is found, run more checks with the following free programs:
Malwarebyte's Antimalware: http://www.malwarebytes.org/mbam.php
Superantispyware: http://www.superantispyware.com

Also, run an extensive checkdisk test on the new drive, maybe even downloading the Ultimate Boot CD (http://www.ultimatebootcd.com) and using the applicable hard disk diagnostics tool on your new drive, just to make sure it's no hardware failure.

Author Comment

ID: 22846855
Okay, sounds like a pretty good plan.

One question before I do all of this: Will a simple reinstall of Windows actually wipe out any of my files?  I mean, I'm sure it will wipe out some settings, and I will probably have to reinstall SP2 and all of the updates, but would I lose any of the other files (Documents and Settings folder and otherwise)?


Author Comment

ID: 22847294
I also have a question about your instructions specifically.  You mentioned trying to replace the SOFTWARE hive of the new registry with the old one.  Well, first, I have installed some programs (including a new NOD32 virus scanner) on the new drive that aren't on the old one.  Second, how do you replace the "software hive"?  Are you talking about the windows\system32\config\software stuff?

Expert Comment

ID: 22847319
I've seen very similar symptoms to the ones you describe, and in most of the cases, it ended up being a sick hard drive.  I would  purchase a new drive, make an image of your old (previous) drive, then mount your sick drive in an external enclosure to get whatever docs or other data files you can before the drive fails completely.

Author Comment

ID: 22847381
Is there any good way to check the drive for such errors?

Expert Comment

ID: 22847432
I've used Seatools from Seagate....which is free...most of the manufacturers have some kind of downloadable diagnostic tools. Bad sectors often mean that the drive is on the way out.  Dome  of the OEms have drive diagnostic tools as well, I've used tools from both Dell  and Gateway while supporting end users' PCs

Author Comment

ID: 22847467
Okay, thanks.  I've been copying over files from the newer drive to the old one for a little while now without any problems.  So, there don't appear to be any serious issues with it, but I know that doesn't reveal everything.  Both drives are Western Digital, so I will see what I can find from their site to check the newer drive for sector problems before continuing with any large reinstall efforts.  I'll keep you guys informed!
LVL 35

Expert Comment

ID: 22847726
As to your questions:

Data loss? That's difficult to answer. An installation of XP may generally affect all files stored in c:\, c:\windows, c:\documents and settings, and c:\program files\common files\microsoft shared. Whatever you have stored outside of this backbone is totally safe, unless you reformat.

Microsoft claim that when performing such an "in-place installation" (http://support.microsoft.com/kb/q315341) you may only lose data and settings stored in the 'Shared Documents' and 'All Users' folders (http://support.microsoft.com/kb/312369), but, frankly speaking, I don't trust them. When it comes to data conservation, I prefer to make one precaution too many rather than learn by painful experience.

Also: If you don't rename those folders as I suggested, Windows will reuse them, which drastically increases the chance of inheriting the error from the old install!
Renaming is by far the easiest way, but you could always back them up to the old drive, of course, then delete them.

Yes. The SOFTWARE hive is the file "c:\windows\system32\config\SOFTWARE" that you have already copied to and fro a couple of times.
Copying it over from the old hard drive will make sure you have all programmes and settings in the state that they were in before changing hard drives.
Recently installed programmes will either have to be manipulated into functioning as I described above, or reinstalled. A workaround might be to copy the SOFTWARE hive of the new drive from /winold over to the new installation, but I do not recommend that because it stems from a corrupted system, and we do not know where the error was.
But feel free to try it out, if you like. As long as you make backup copies of the files replaced, you may always roll back your changes.

Hard disk corruption is indeed an option here.
That's why I suggested you download the Ultimate Boot Disk, which contains hard drive diagnostic software from all major manufacturers. There may be newer software on the website of hard drive's manufacturer, but that will have to be put on bootable media before usable.

Author Comment

ID: 22855496
I downloaded Western Digital's LifeGuard Diagnostics program and am now checking the boot sectors of the suspect drive.  Fortunately,  I was able to do this by booting into Windows on the old drive (with the newer one as the slave) and running the program to check the D drive from there.  It looks like this process is going to take MANY hours (250GB drive).  Plus, I am leaving tomorrow morning on a business trip and won't be back until Wednesday afternoon.  So, just as a heads up, you probably won't see me reply to this again until the last half of next week.  Don't get concerned--I'll be back.

Thanks to everyone so far, and I'll let you know what becomes of this.

Author Comment

ID: 22915177
Hey everyone - I'm back from my trip and delving into this fun situation again.

Right now, I have more of an interesting observation than a significant update.  Before trying to copy the SOFTWARE hive of the old drive, I attempted to use the one from the "winold" folder (backup of Windows folder on the newer drive).  Upon startup into Windows, an error came up:

"A problem is preventing Windows from accurately checking the license for this computer.  Error code 0x80070002."

This made me think of Windows updates, because of their more recent license checking updates.  I wonder if this would work if I get my new installation up-to-date and then try again.  Before I do that, though, I will probably try the SOFTWARE hive from my old drive just to see what happens.  I'll keep you guys posted.

LVL 35

Expert Comment

ID: 22916366
Welcome back.

A newly installed Windows will of course have to be activated again. Since you have not formatted anything, you still have two working installations that you could use to simply copy over the activation info. You will find it in the files WPA.dbl and WPA.bak in the \system32 folder of either your old drive or your \winold folder.
Read this if you need to know more:

As I pointed out before, restoring the SYSTEM hive from your new disk must be considered "experimental". There is no absolue guarantee it will work well with the fresh system.

Author Comment

ID: 22918189
I tried what you suggested with the WPA files from both previous installations, but there was no effect.  The computer will come up in Safe Mode but NOT in Safe Mode with Networking, so something between there apparently makes the difference.

I have also tried Microsoft's solution to this (http://support.microsoft.com/kb/310794), but there are no Cryptography registry folders and no S-1-5-20 folder.  All drive letters seemed okay to me.

I also just tried to follow the steps at another site (http://www.anetforums.com/posts.aspx?ThreadIndex=24964) with no change after completing the first solution.  The second solution can't be implemented because Safe Mode with Networking gives the same error and I thus have no access to the internet for activation.

The idea behind trying to use the SOFTWARE hive from the previous installation (on the newer drive) is, of course, to try and keep all of my most recent programs working (such as NOD32 antivirus and any others I've installed this year).  In your last post, you also mentioned the SYSTEM hive.  Was that a typo or did you mean to imply that I should also restore this in addition to the SOFTWARE hive?

My next thought towards trying to preserve the most recent SOFTWARE hive is to take my fresh installation through a repair installation using the XP Pro CD.  if that doesn't work, then I'll have to try the hive from the old drive to see what happens.  What do you see any potential issues going through this exercise?

LVL 35

Assisted Solution

torimar earned 1200 total points
ID: 22918412
"SYSTEM" hive was indeed a typo, sorry.  

Honestly, I think you are going too far here in trying to preserve your most recent software installations. What you have already tried, and what you are going to do now, will take hours whereas reinstalling NOD and maybe 2 or 3 more programmes will take a couple of minutes. Is that worth it?

As far as I know, a regular Windows "Repair installation" does not do much more than restore the registry hives which were backed up during the initial installation of a system (look at the contents of the c:\windows\repair folder: that's what a Repair installation is going to restore). In your case this means that the SOFTWARE hive you are trying to make usable will be overwritten anyhow.

But go ahead and try if you like. Computers are always a source of surprise.

Accepted Solution

ctnovelist earned 0 total points
ID: 22918992
Well, I went through the repair installation anyway just for kicks.  Interestingly enough, it DID preserve the SOFTWARE hive, but there were errors EVERYWHERE.  Windows was generally unstable, and IE6 froze just trying to come to this website.  Plus, none of my programs worked anyway.  I then copied in the SOFTWARE hive from my old drive and ended up with the Windows Product Activation error that I had received with the other hive, and that was enough for me.

As of now, I have decided to give up on the "new" drive and go back to using my old one as the main bootup drive.  Everything still works great (just without the newer stuff), and the drive never gave me reason to doubt its integrity.  The only reason I had switched in the first place was because this drive is a good 6 years old.  It's proven itself, however (as I had also ran the WD disk checking software on it), and I am now going to use the "new" drive as a backup and auxiliary storage device.  Now I just need to do some file cleanup and program reinstallation.

I am going to leave this question open for a couple of days for any further comments and in case something else comes up...or I just change my mind about using the old drive (not likely).  Thanks for everything and take care!

Author Comment

ID: 22973205
Administrator/moderator, what's the best way to handle this one points-wise?  There were some good ideas here, but none of them actually FIXED the problem or accomplished what I was trying to do.  I certainly would like to give some kudos to torimar for sticking with me and trying his best to help.  However, I don't want anyone searching this forum later to see something accepted as a solution that didn't actually fix the problem.


Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

If you have done a reformat of your hard drive and proceeded to do a successful Windows XP installation, you may notice that a choice between two operating systems when you start up the machine. Here is how to get rid of this: Click Start Clic…
The article will include the best Data Recovery Tools along with their Features, Capabilities, and their Download Links. Hope you’ll enjoy it and will choose the one as required by you.
Two types of users will appreciate AOMEI Backupper Pro: 1 - Those with PCIe drives (and haven't found cloning software that works on them). 2 - Those who want a fast clone of their boot drive (no re-boots needed) and it can clone your drive wh…
Finding and deleting duplicate (picture) files can be a time consuming task. My wife and I, our three kids and their families all share one dilemma: Managing our pictures. Between desktops, laptops, phones, tablets, and cameras; over the last decade…
Suggested Courses

569 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question