HOWTO: Fix a Corrupted HAL.DLL file

Operating Systems
Windows, Linux, Solaris, Red Hat, etc.....32 bit or 64 bit.
If its an OS, its here.

HOWTO: Fix a Corrupted HAL.DLL file

Postby Sovereign » Sun Oct 01, 2006 1:42 pm

Final Update: August 23, 2009 - This thread is almost completely irrelevant for Windows Vista and Windows 7. The repair tools offered on Microsoft's Operating System disks make guides like this unnecessary. If you run across a similar error in Vista or 7, and believe I am mistaken, please post here. I apologize for not saying this sooner, but I am no longer offering active support on this thread; it is now offered as a guide only, "as-is," with no warranties and no support (from me).

Partial Update: January 24, 2009 - Had a friend whose hard drive (Vista Ultimate x64) got partitioned wrong due to my own stupidity. It looked like this:
Code: Select all
[---Unallocated---][---WINDOWS---][---Unallocated---]
It should have looked like this:
Code: Select all
[---WINDOWS---][---UNALLOCATED---]
The point of this is to create a separate partition for user-data so that a destructive restore (i.e. Windows Complete PC Backup) would not touch the user's files. Due to my own error, the partitions ended up wrong. Using GParted (a free Linux-based partitioning tool--get the LiveCD here) I was able to forcibly move the entire Windows installation so that the partitions were the way I wanted. Vista would not boot afterward (similar to the rearrangement of partitions in this thread). However, Vista's built-in "Repair Your Computer" running off the Vista install disk fixed the problem.

I'm of the belief that problems with hard-drive partitions are obsolete with Vista (at least as relates to HAL.DLL) and 7, since the automated repair offered on the installation disk seems to be able to take care of the problem.

UPDATE: March 26, 2007 - This thread applies to Windows XP only! I do not know how Windows Vista's boot loader and HAL.DLL files work, so please do not ask me or use this guide to repair Windows Vista powered PCs! If someone would like to add onto this thread about fixing corrupt Vista HAL.DLLs, please post a reply 8) (I would imagine the process is similar to Windows XP, but I do not know that for certain so I will not make that claim.)

This is from my own personal experience (that I just had), it's something I couldn't find anywhere and figured out myself. I offer this "AS IS" with no warranties or guarantees, express or implied. You use this advice at your own risk and accept sole responsibility for anything resulting from your use of this information.

Whew! Now that the boring stuff is over, on to fixing the problem.

You boot your PC, perhaps because you upgraded something or upgraded to Windows XP. You get an error:
Windows XP Hates You wrote: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.


I tried the following methods to fix this problem. None of them worked.
1. Just restart, Windows can be dumb sometimes.
2. CHKDSK /F /R (the file could have been damaged due to a sudden power-off, but I doubt this could happen. This is just what any power user reflexively does when it looks like data could be damaged).
3. Boot into Safe Mode (or any of the other options that you can get with F8 like Last Known Good)
4. Edit the BOOT.INI file (this fix assumes BOOT.INI is corrupt, when it is not, HAL.DLL is actually damaged.) This is what was suggested by Topher a few posts down. I actually read that article, having found it in a Google search about corrupt HAL.DLLs, and used the rebuild command to no effect.
5. Use the Repair Option in Windows XP. It has been mentioned that my steps did not go "far enough" but I used an OEM copy of XP that had in the past been used to "Repair" my own machine. It simply did not find any valid Windows installations, fixed BOOT.INI files notwithstanding.
6. Expanding HAL.DLL from the XP installation disc or copying HAL.DLL from another computer. The HAL.DL_ file would not expand, even though I had used BartPE to delete the original HAL.DLL. From my understanding of HAL.DLL, it is dynamically generated from a base template file (the one on the XP CD) upon installation. Therefore, unless the hardware in your machine is very similar to the one of the machine you are trying to repair, chances of copying and pasting a HAL.DLL and having it work are slim to none. (If this is wrong and you can in fact point me to a case where this worked, please tell me as 3+ hours of Google searches seemed to vindicate the idea that HAL.DLL cannot be dragged and dropped.)

So, you're just about to format right? There is a way around this, that I discovered after accidentally damaging a friend's hard drive with PartitionMagic (that app is the DEVIL do not use it to "merge" partitions that were created in the factory before Windows was installed, it crashed two friend's computers and I got stuck fixing them).

You need a CD of Windows XP. I do not believe it matters which Service Pack or whatnot. Any will do. You are going to reinstall Windows (regardless of version, you can install Windows XP next to another installation of Windows XP, it's dual-booting the same OS) to regenerate HAL.DLL.

Now, follow these steps.
1. Boot from the CD and start the installer
2. Choose to install onto the already formatted partition with the unbootable Windows, but opt to leave the existing filesystem and any other OSes alone. Choosing this will require you to create another folder for Windows to avoid writing over the existing installation (that it somehow sees now but not when the Repair "Scanning for previous installations of Windows" is run, argh!) I usually call the new folder "WINXP."
3. Install Windows as you would normally, you'll need a Product Key but you can actually use your personal key on someone else's computer with no danger to you losing it or being accused of piracy, I'll explain this later.
4. Boot the NEW Windows XP install. Do not "Activate" or "register," you're going to be deleting this copy of Windows from the machine if all goes well.
5. Edit the BOOT.INI on the hard drive from the original installation of Windows with the corrupted HAL if you messed it up like I did and had four OS entries in it, none of which worked. This usually happens when you try to use the method outlined in the InformationWeek article repeatedly and it does not work.
6. Go to C:\WINXP\system32\hal.dll (where "WINXP" is the folder you installed the second copy of Windows XP) and copy it from the new Windows to C:\WINDOWS\system32\hal.dll (or wherever you installed Windows XP originally, I use "WINDOWS" but some people use strange folder names for their XP) and overwrite any file there. The new hal.dll is uncorrupt and newly regenerated. The file is specific to each machine's hardware configuration and we needed to rebuild it. The installer did that for us with the new installation.
7. Try rebooting your computer to see if you can get into your OLD Windows installation. If you can, congratulations!
8. DELETE the "WINXP" folder (or wherever you put your new Windows install).

Now PayPal me some money for all this effort...
j/k! If anyone runs into this situation, they will know how to deal with it.

But it didn't work! I still can't boot! What should I do?
First of all, breathe. Did you choose the right OS to boot from (chances are if you didn't edit BOOT.INI you still have a pointer from your install of Windows that you used to regenerate hal.dll and then deleted once you thought you were finished. Try a different OS choice and if it boots, go to the System control panel, Advanced, Startup and Recovery, click the "Edit" button so you can mess around with BOOT.INI.

Sample BOOT.INI for XP Pro
Microsoft wrote:[boot loader]
timeout=10
default=multi(0)disk(0)rdisk(0)partition(1)\WINDOWS
[operating systems]
multi(0)disk(0)rdisk(0)partition(1)\WINDOWS="Microsoft Windows XP Professional" /NOEXECUTE=OPTIN /FASTDETECT


NOEXECUTE is for Data Execution Protection, and this setting means only core Windows apps will be DEPped.

If you have any questions, just ask them here.

Version 1.2
- Added "This is not for Vista and I don't know so don't ask" clarification
Version 1.1
- Cleaned up start of thread, made it cleaner. Added clarification throughout.
- Addressed Topher's points, I wasn't clear and he misunderstood that the methods he suggested were tried by me in this process and did not work.
- Version 1.0
Original post
Last edited by Sovereign on Sun Aug 23, 2009 9:50 am, edited 12 times in total.
Play
Q6600 @ 3.2GHz :: 8GB DDR2-800 :: eVGA 9800GX2 :: 7900GTX (secondary) :: abit IP35 Pro :: 150GB Raptor 10k RPM :: 2x750GB WD Caviar :: 120GB WD :: X-Fi XtremeMusic :: NEC 4551A :: BenQ DVD Combodrive (52x32x52) :: Dual 22" Acer AL2216W :: Thermaltake Armor Black :: Logitech Z5500 5.1

Work
Core 2 Duo @ 2.53GHz :: 4GB DDR3 @ 1067MHz :: 3670 :: Intel PM45 Chipset :: 500GB 5400RPM SATA :: Integrated Audio :: BD-ROM/DVD Burner :: 16" 1920x1080 RGBLED
Sovereign
Legit Extremist
Legit Extremist
 
Posts: 1045
Joined: Sun May 08, 2005 5:28 pm

Postby DMB2000uk » Sun Oct 01, 2006 2:33 pm

Nice one, shame you couldnt have done this about 6months ago before I had to do a system reformat on a PC!

Will bear this handy tip in mind for the future!

Dan
Image (<- Clickable)
User avatar
DMB2000uk
Site Admin
Site Admin
 
Posts: 7067
Joined: Mon Jul 18, 2005 5:36 pm
Location: UK

Postby Topher » Mon Oct 02, 2006 5:59 pm

I have a couple of other suggestions also.

You didn't mention booting to the "Last known good configuration" menu option which is a failsafe "rollback" for when installing driver changes that no longer allow your computer to boot. It can be accessed from the "F8" menu.

If that doesn't work, you could always get a copy of the HAL.DLL from a good working install of XP from another computer, then boot to a Bart-PE CD and then overwrite your corrupted HAL.DLL with the good one.

the Repair option is not there!

The reason it wasn't there is because it's buried down in the installer and doesn't appear up front when you boot the CD. To get to the "Repair" option you have to select to install XP as if you were installing a fresh new copy. Shortly into the install process, Windows will find your current install and give you the option to "Repair" it. This would also fix your problem. You were "almost" at that step in your instructions when you told it to install into a different location. If you chose the currently installed folder, it should at that point given you the option to "repair" or overwrite your existing settings. I've been down this road before and became frustrated when I could not find the repair option. After finally giving up, instead of just wiping the drive and starting fresh, I thought I'd take a shortcut and just install Windows over my existing install, that lo-and-behold, that's where I found the "Repair" option. Go figure.....
User avatar
Topher
Legit Extremist
Legit Extremist
 
Posts: 299
Joined: Sun May 01, 2005 11:29 am
Location: Temple of the Rat

Postby dicecca112 » Mon Oct 02, 2006 6:50 pm

polish this up a little my friend and you could have a sticky on your hands. I personally have gone through this, and banged my head trying to fix it. usually I just pop out the old XP slipstream and reinstall, but this could have saved me
Image
User avatar
dicecca112
Site Admin
Site Admin
 
Posts: 5012
Joined: Mon Mar 01, 2004 10:40 am
Location: Wakefield, MA

Postby Topher » Thu Oct 05, 2006 6:10 pm

Read this great article, could have saved you some time:

http://www.informationweek.com/story/sh ... =185301251
User avatar
Topher
Legit Extremist
Legit Extremist
 
Posts: 299
Joined: Sun May 01, 2005 11:29 am
Location: Temple of the Rat

Postby Sovereign » Sat Nov 04, 2006 9:00 pm

Thread cleaned...sticky please? :)

I was bored, had another OS related question and noticed that Topher et. al had replied to this thread. I decided that it wasn't clear enough, after reading it about a month after the problem was fixed.
Play
Q6600 @ 3.2GHz :: 8GB DDR2-800 :: eVGA 9800GX2 :: 7900GTX (secondary) :: abit IP35 Pro :: 150GB Raptor 10k RPM :: 2x750GB WD Caviar :: 120GB WD :: X-Fi XtremeMusic :: NEC 4551A :: BenQ DVD Combodrive (52x32x52) :: Dual 22" Acer AL2216W :: Thermaltake Armor Black :: Logitech Z5500 5.1

Work
Core 2 Duo @ 2.53GHz :: 4GB DDR3 @ 1067MHz :: 3670 :: Intel PM45 Chipset :: 500GB 5400RPM SATA :: Integrated Audio :: BD-ROM/DVD Burner :: 16" 1920x1080 RGBLED
Sovereign
Legit Extremist
Legit Extremist
 
Posts: 1045
Joined: Sun May 08, 2005 5:28 pm

Postby dgood » Wed Jan 10, 2007 9:06 pm

I vote for sticky, how many votes you need? lol this problem has screwed me two times already on more than one comp and I had to reformat both time cuz I couldn't copy from cd into C: using console in XP CD didn't think of that last part of fix boot.
Image
User avatar
dgood
Legit Extremist
Legit Extremist
 
Posts: 1187
Joined: Mon Nov 21, 2005 8:54 pm
Location: Lynnwood, WA

THANK YOU SO MUCH

Postby cbrehm » Sun Feb 18, 2007 2:30 pm

So my friend is out of town and I wasn't suppose to use her laptop. I thought it was something I had done, but with the help I was given by this forum I am so off scott free..AWSOME!!!!!!!!And the funny thing is...I know nothing about computers....Thank you so much for all the information and less needed drama...MUAH.
cbrehm
Legit Little One
Legit Little One
 
Posts: 2
Joined: Sun Feb 18, 2007 1:44 pm

Way To Go !!!!!!!

Postby DataTech » Fri Feb 23, 2007 12:55 pm

Hats off thanks for your time, It really worked great for me.
DataTech
Legit Little One
Legit Little One
 
Posts: 1
Joined: Fri Feb 23, 2007 12:44 pm

Postby wildlaser » Tue Apr 24, 2007 11:46 pm

LOL, HAL!

What are you doing DAve?

Are you trying to deactivate me?


Space Odysessy anyone?
User avatar
wildlaser
Legit Aficionado
Legit Aficionado
 
Posts: 59
Joined: Fri Mar 09, 2007 8:20 pm

Postby sultanch » Mon May 07, 2007 11:35 pm

hey all, I see that you all seem to know much more than me about computers. I was wondering how you can fix this hal.dll file problem if you cant get into the setup. I have tried to go through safe mode, normal windows etc.
There was some problem with the computer and it would not start up after showing the blue DELL screen. So i decided to reinstall the windows and when I did it started to give me that error. I have read some the way that was posted above and also the article to which the link was above in one of the posts. BUt all those things work only if you can get into the setup of XP. As soon as I hit f12 on the startup DELL screen and hit start by CD/DVD it just gives me that hal.dll file error and I cant do anything about it. If anyone can help me with this, I would reallly apppreciate it. thanks in advance.

Sultan
sultanch
Legit Little One
Legit Little One
 
Posts: 1
Joined: Mon May 07, 2007 11:27 pm
Location: Oakville

Postby JohntechUPi » Sun Jun 10, 2007 1:52 am

You should run http://www.memest.org on your system to make sure there is not some other problem, and then it’s not a bad idea to run the Disk Utilities from the HDD maker to check the HDD as well, and then try to correct the problem. But normally for me if that happens and it has happened many times in my testing, I will normally just delete the partition on the HDD and or use the Disk Utilities and write zeros to it and then reinstall; in the worst case. But I usually keep a Drive image of my drives on critical systems and just re-image the boot drive.
For me I keep all my Data on another drive and then just reinstall the O.S. on the C-Drive when needed it’s faster and I don’t loose my data since drives are so cheep. Not to mention Windows seems to always bog down after a few months and reloading improves performance with the latest updates not done in a updated fasion.
One-liner about business
Producing a system from a specification is like walking on water; it's easier if it's frozen.
User avatar
JohntechUPi
Legit Aficionado
Legit Aficionado
 
Posts: 93
Joined: Wed May 23, 2007 12:24 pm
Location: California USA /Manila Philippines

Re: HOWTO: Fix a Corrupted HAL.DLL file

Postby michalidD » Thu Aug 02, 2007 9:51 am

hello sovereighn,

Can you please explain more what needs to be done when you say in the original email "Edit the BOOT.INI " ?
What needs to change in this file?

Thanks
M
michalidD
Legit Little One
Legit Little One
 
Posts: 1
Joined: Thu Aug 02, 2007 9:45 am

Re: HOWTO: Fix a Corrupted HAL.DLL file

Postby Tech_Greek » Thu Aug 09, 2007 9:32 pm

Easy fix.

1) Pull the HD out of the 'hal.dll' corrupted HD and hook it into a computer with the SAME OS (OEM, Retail, Home, Pro, etc)
2) Find the hal.dll on your current WORKING computer with same OS
3) Copy it to the secondary HD that has the corrupted hal.dll in the same locationh and plug it back in.

Three Steps
Desktop: Gateway GT5014 || Windows 7 x64 || Pentium D 2.8 || 4GB DDR2 6400 Ram || GeForce 9500 GT ||
Laptop: HP DV6119us || Windows 7 x64 || AMD Athlon 64x2 || 2GB DDR2 Ram ||
User avatar
Tech_Greek
Legit Extremist
Legit Extremist
 
Posts: 258
Joined: Tue Jan 02, 2007 2:35 pm
Location: Shreveport, LA

Re: HOWTO: Fix a Corrupted HAL.DLL file

Postby DMB2000uk » Fri Aug 10, 2007 7:41 am

Tech_Greek wrote:Easy fix.

1) Pull the HD out of the 'hal.dll' corrupted HD and hook it into a computer with the SAME OS (OEM, Retail, Home, Pro, etc)
2) Find the hal.dll on your current WORKING computer with same OS
3) Copy it to the secondary HD that has the corrupted hal.dll in the same locationh and plug it back in.

Three Steps


Though if you don't have access to another PC like that, then this guide is your best option :P

Dan
Image (<- Clickable)
User avatar
DMB2000uk
Site Admin
Site Admin
 
Posts: 7067
Joined: Mon Jul 18, 2005 5:36 pm
Location: UK

Re: HOWTO: Fix a Corrupted HAL.DLL file

Postby Sovereign » Wed Aug 15, 2007 8:12 pm

Tech_Greek wrote:Easy fix.

1) Pull the HD out of the 'hal.dll' corrupted HD and hook it into a computer with the SAME OS (OEM, Retail, Home, Pro, etc)
2) Find the hal.dll on your current WORKING computer with same OS
3) Copy it to the secondary HD that has the corrupted hal.dll in the same locationh and plug it back in.

Three Steps


Sovereign wrote:6. Expanding HAL.DLL from the XP installation disc or copying HAL.DLL from another computer. The HAL.DL_ file would not expand, even though I had used BartPE to delete the original HAL.DLL. From my understanding of HAL.DLL, it is dynamically generated from a base template file (the one on the XP CD) upon installation. Therefore, unless the hardware in your machine is very similar to the one of the machine you are trying to repair, chances of copying and pasting a HAL.DLL and having it work are slim to none. (If this is wrong and you can in fact point me to a case where this worked, please tell me as 3+ hours of Google searches seemed to vindicate the idea that HAL.DLL cannot be dragged and dropped.)


:|
Play
Q6600 @ 3.2GHz :: 8GB DDR2-800 :: eVGA 9800GX2 :: 7900GTX (secondary) :: abit IP35 Pro :: 150GB Raptor 10k RPM :: 2x750GB WD Caviar :: 120GB WD :: X-Fi XtremeMusic :: NEC 4551A :: BenQ DVD Combodrive (52x32x52) :: Dual 22" Acer AL2216W :: Thermaltake Armor Black :: Logitech Z5500 5.1

Work
Core 2 Duo @ 2.53GHz :: 4GB DDR3 @ 1067MHz :: 3670 :: Intel PM45 Chipset :: 500GB 5400RPM SATA :: Integrated Audio :: BD-ROM/DVD Burner :: 16" 1920x1080 RGBLED
Sovereign
Legit Extremist
Legit Extremist
 
Posts: 1045
Joined: Sun May 08, 2005 5:28 pm

Re: HOWTO: Fix a Corrupted HAL.DLL file

Postby civilr » Mon Aug 20, 2007 2:03 pm

Sovereign wrote:6. Expanding HAL.DLL from the XP installation disc or copying HAL.DLL from another computer. The HAL.DL_ file would not expand, even though I had used BartPE to delete the original HAL.DLL. From my understanding of HAL.DLL, it is dynamically generated from a base template file (the one on the XP CD) upon installation. Therefore, unless the hardware in your machine is very similar to the one of the machine you are trying to repair, chances of copying and pasting a HAL.DLL and having it work are slim to none.


I just want to add that this is incorrect.

Sovereign wrote:(If this is wrong and you can in fact point me to a case where this worked, please tell me as 3+ hours of Google searches seemed to vindicate the idea that HAL.DLL cannot be dragged and dropped.)


I have done it before many times infact my machine now (C2D e6300, EVGA 680i, 2x36GB Raptor RAID, 8800 GTS) had problems two times with a corrupted hal.dll (my fault both times) and the first I wasted my time hooking the RAID config up into another machine (Athlon, some PoS mobo, 500GB HD, and an ATI Radeon 9200 SE) to copy the hal.dll from there, worked perfectly. I learned a valuable lesson the first time, I ended up running 2 Windows installs on my machine (2 partitions on my RAID setup, 1 just big enough for Windows itself and the other fills the rest of the space). The second time it happened I just booted my second Windows install and got a copy of hal.dll from dll-files.com.
civilr
Legit Little One
Legit Little One
 
Posts: 1
Joined: Mon Aug 20, 2007 1:53 pm

Re: HOWTO: Fix a Corrupted HAL.DLL file

Postby Exxpert » Sun Nov 18, 2007 3:56 pm

Got a corrupted hal.dll in my XP and found this excellent instruction from Sovereign but it did not work for me :(

First of all, breathe. Did you choose the right OS to boot from (chances are if you didn't edit BOOT.INI you still have a pointer from your install of Windows that you used to regenerate hal.dll and then deleted once you thought you were finished. Try a different OS choice and if it boots, go to the System control panel, Advanced, Startup and Recovery, click the "Edit" button so you can mess around with BOOT.INI.


Yes, I chose the right OS.

Installed another copy of XP into different partition. Tried to explore the corrupted XP partition with my new copy of XP and it said that the drive is not formatted. Same was noted by PartitionMagic too. Maybe I have a worse problem than just a corrupted hal.dll :shock:

Anyway, this is really strange. I have a Windows 98SE bootable partition and it explores the corrupted XP partition fine :rolleyes: So I could copy new hal.dll only via Windows 98SE. BTW the so called regenerated hal.dll file has date of 2003-03-31. Does not look very regenerated to me...
Exxpert
Legit Little One
Legit Little One
 
Posts: 1
Joined: Sun Nov 18, 2007 3:38 pm

Re: HOWTO: Fix a Corrupted HAL.DLL file

Postby juvenile386 » Mon Dec 17, 2007 2:57 am

5. Edit the BOOT.INI on the hard drive from the original installation of Windows with the corrupted HAL if you messed it up like I did and had four OS entries in it, none of which worked. This usually happens when you try to use the method outlined in the InformationWeek article repeatedly and it does not work.


excuse my english...

this step is quite unclear to me....
how do i edit the boot.ini? where do i start? and what should I do?
what if it's missing?
i lost the boot.ini because i tried the bootcfg /rebuild method which involves deleting the boot.ini.... the problem is that i can't rebuild the boot.ini because of some something...
and that's why i'm following your method...
which leads me back to my first question...

what if it's (boot.ini)missing?
juvenile386
Legit Little One
Legit Little One
 
Posts: 1
Joined: Mon Dec 17, 2007 2:50 am

Re: HOWTO: Fix a Corrupted HAL.DLL file

Postby CrashMaster » Fri Feb 08, 2008 2:48 pm

I would have solved the HAL.dll error in a different way though.First downloading a proper non-corrupt version from the http://www.DLL-Files.com & then booting into a command prompt & copying the good file to replace the bad file.I did it earlier & it works. :)
CrashMaster
Legit User
Legit User
 
Posts: 6
Joined: Fri Feb 08, 2008 1:35 pm

Next

Return to Operating Systems

Who is online

Users browsing this forum: No registered users and 0 guests