Wednesday, July 18, 2007

Error: Windows could not start because the following file is missing or corrupt: \system32\hal.dll
Security level: Public
___________________________________________________
This document applies to HP and Compaq Desktop PCs that come with Windows XP.
When Windows starts, the following error message appears:
"Windows could not start because the following file is missing or corrupt: \system32\hal.dll. Please re-install a copy of the above file."
Use the following steps to resolve this error:
Step 1: Opening a command prompt
This error prevents Windows XP from opening. This problem has to be addressed from a command prompt environment.
Use the following steps to open a command prompt environment:

Turn on the PC and press the F8 key repeatedly when the first screen appears.
The Windows advanced options menu appears.
Use the Up and Down Arrow and Enter keys to select Return to OS choices.
Select Microsoft Windows Recovery Console.

NOTE: If "Microsoft Windows XP Recovery Console" is not listed, restart the PC with a Windows XP CD, Recovery Console CD, or Recovery Tools CD in the top CD or DVD drive and open Microsoft Windows Recovery Console. If a Windows XP Setup screen appears when using Recovery Console CDs, press the R key to open the Recovery Console.

NOTE: If "Microsoft Windows XP Recovery Console" does not list and you do not have a CD with recovery console, try the following:
Turn on the PC, and press the F10 key repeatedly at the first screen.
At the Recovery screen, click Advanced Options.
Press the Alt + D keys at the same time to open a command prompt window and skip to step 5.
When the login prompt appears, press the number next to the windows version (minint or Windows) and type the logon password. Try pressing Enter if you do not know the password.
At the command prompt, type the following: diskpart
Press Enter, do one the following:
If a table of volume names appears, remember the drive letter next to the main drive volume name (usually D or H next to HP_PAVILION or PRESARIO) and press the Esc key.
If a diskpart prompt appears, type list volume, press Enter, remember the drive letter next to the main drive volume name (usually D or H next to HP_PAVILION or PRESARIO), type exit when done, and then press Enter.

NOTE: If the main drive volume name does not appear in the list, the PC needs to be recovered. For more information, refer to Performing a Full System Recovery in XP .

Step 2: Restoring boot.ini
Use the following steps to replace the boot.ini file with the backup boot.ini file:

Type the following at the command prompt: X: (where X is the drive letter).
At the prompt, type the following: ren boot.ini boot.in2
Press Enter
At the prompt, type the following: ren boot.bak boot.ini
Press Enter
At the prompt, type the following: exit
Press Enter
The system automatically restarts. If Windows XP does not open, continue to the next Step.

Step 3: Editing boot.ini
If the steps above fail to resolve the error, use the following steps:

NOTE: The following steps use the recovery partition on the hard drive. If the recovery partition has been removed, these steps will not work and you should recover the PC using recovery discs.

Turn on the PC. When the initial logo screen appears, press the F10 key repeatedly until a message about starting recovery appears.
At the Recovery screen, click Advanced Options and then press the Alt and D keys at the same time to go to a command prompt.
At the command Prompt, type the following: diskpart
Press Enter and type the following at the diskpart prompt: list volume
A table of drive volumes and names appears.
Note the drive letter next to the main drive volume name (usually D or H next to HP_PAVILION or PRESARIO).
Type the following at the diskpart prompt: Exit
Press Enter and type the drive letter followed by a colon (:) at the command prompt. For example, D:.
Press Enter and type the following at the command prompt: attrib -h -s -r boot.ini
Press Enter and type the following at the command prompt: boot.ini
The file opens for editing in Notepad. Edit the boot.ini file to read exactly as follows:
[boot loader]
timeout=0
default=multi(0)disk(0)rdisk(0)partition(2)\WINDOWS
[operating systems]
multi(0)disk(0)rdisk(0)partition(2)\WINDOWS="Microsoft Windows XP Home Edition" /fastdetect
C:\CMDCONS\BOOTSECT.DAT="Microsoft Windows Recovery Console" /cmdcons

NOTE: If your PC came with Windows XP Professional, edit the line referring to Home Edition under [operating systems] to read as follows: multi(0)disk(0)rdisk(0)partition(2)\WINDOWS="Microsoft Windows XP Professional" /fastdetect
Save and Exit from the menu.
Type the following at the command prompt: attrib +h +s +r boot.ini
Press Enter and type the following at the command prompt: Exit
Click Quit on the recovery screen to restart the computer.

No comments: