What to do if Windows XP won’t boot and you don’t have an XP installation CD and you don’t want to use the Recovery CD provided by the PC’s manufacturer
If your brand-name PC comes with a Recovery CD instead of a Windows XP installation CD, you won’t be able to use features that require the Windows XP CD, such as the repair installation. However, if using a Recovery CD restores the PC to the state it was in when it left the factory, you may not want to use it if doing so destroys all of the data files and programs you’ve installed since you started using it. You’ll be glad to know that there are ways of recovering the system if if won’t boot and you don’t have an installation CD. The following information addresses this problem.
WINDOWS XP WON’T BOOT
Find out how to get Windows up and running if you don’t want to use the System Recovery option and you don’t have the Windows XP CD to hand.
Q. When I switch on my PC, I get the DOS message: “Invalid Boot.ini file booting from C:\ Windows. Windows could not start because the following file is missing or corrupt: windows\System32\Hal.dll. Please reinstall a copy of the above file.”
I have rebooted and attempted to use the F10 System Recovery option, but do not want to select the entire System Recovery option as I understand this will wipe my hard disk and take me back to the factory installation. I have found many potentially useful guides on sorting out the Boot.ini file, but they say I need the Windows XP CD, which I don’t have.
A. Even though you have received invalid Boot.ini and missing Hal.dll errors, this does not necessarily mean the Hal.dll file is corrupted or missing. It may just mean the loader is unable to find it. This can occur if the Boot.ini file is missing or invalid, if Windows XP is not installed in the location specified in the Boot.ini file, if the Ntoskrnl.exe file is missing or damaged, or if there has been a hardware failure such as a bad sector on the hard disk.
If your PC has a floppy drive, you can create a boot floppy that may bypass the corrupted file. On another working Windows XP system, open My Computer, right-click on the floppy drive icon and choose Format. Accept the default Options. Once formatting is complete, copy the Boot.ini, ntldr and ntdetect.com files from the root directory of the hard disk to the floppy. Select the options to view hidden and system files, as described below.
Verify that the Boot.ini file contains the correct lines. It is a text file so can be viewed in Notepad. If you place the floppy disk into the non-booting computer and power up the PC, it will start booting from the floppy drive. After it reads the Boot.ini file you have placed on the floppy, it will switch to booting from the Windows folder of the specified hard disk. This may not work, but is a fairly quick fix to try and it also confirms that this Boot.ini file is OK. If the PC doesn’t boot from the floppy disk, check your BIOS to ensure that the floppy drive is the first in the list of bootable devices.
Hard disk damage is a common cause of this type of error. If you have access to another desktop computer, you should move your hard disk [drive] to that system and back up all your data. Run Chkdsk with the Thorough option enabled to scan the drive for errors. Once you have ruled out any hard disk errors or corruption of the file system that may prevent the loader finding the Windows\System32 folder, you can look for other problems.
Using Windows Explorer, check in Tools, Folder Options that you have ‘Show hidden files and folders’ enabled and verify that you have files Boot.ini, ntldr and ntdetect.com in the root directory of your boot drive, which will usually be drive C:. Boot.ini should contain the following lines, or similar:
(1)\WINDOWS=”XP Home” /fastdetect
These lines will be correct if Windows is located in the Windows folder of the first partition on the PC’s only hard disk. The text after the equals sign can contain anything and will be displayed if you have more than one operating system listed. The default= entry should be the same as the first part of the line under [operating sytemsJ – in this case:
If your computer has a recovery partition, the main Windows partition might be the second partition. However, most manufacturers deliberately make the recovery partition the second entry in the partition table to avoid this complication. For more complex situations, we suggest using the BootCFG tool or recovery console to create the proper entry as below.
WRONG FILE LOCATIONS
If the root directory contains the Boot.ini, ntldr and ntdetect.com files, check the name of the folder where the operating system is stored. This is usually called Windows, but some manufacturers name it WinNT, which is also the default location for Windows 2000.
It could be that a power surge occurred when writing to the hard disk. This could cause nonsense values to have been written to part of the Windows folder directory index. This prevents access to files and folders beyond that point in the directory. Chkdsk corrects this but may place any inaccessible files and folders it finds in a new folder. You need to move these recovered files to their original locations, if you can figure out where they go.
The NT loader expects to find a folder called System32 inside the operating system’s folder. This will usually be called C\Windows\System32 and will contain lots of files. The most important files are Ntoskrnl.exe and Hal.dll (HAL stands for Hardware Abstraction Layer). Hal.dll is modified for your system when Windows is first installed and relates specifically to your system hardware. If Hal.dll is missing, look for a copy in the DLLCache folder. If it’s not there, and assuming your system disk is drive C, try to extract the copy in your recovery partition with the command:
expand d:\i386\hal.dl_ c:\windows\ system32\hal.dll
[Where D: is the recovery partition, which may have a different letter on your PC. You enter the command at the command prompt, which you can bring up by entering cmd in the Start -> Run box.]
Provided you have at least [Windows XP] Service Pack 1 installed, there may be a copy of Hal.dll in the C\ Windows\ServicePackFiles\i386 folder. This won’t be customised for your system, but it should enable you to boot.
The Recovery Console has some useful tools to repair problems, although it provides a stark, DOS-style command prompt and so is probably something only advanced users will want to use. If you can borrow a Windows CD, you can boot from it to run Recovery Console by pressing R at the first boot prompt. Alternatively, some manufacturers – including Compaq – have added Recovery Console to the options on their Recovery menu, which is reached by pressing F10 or F12 at startup.
If neither of the above is available and you have a floppy drive, you can download a set of Windows XP Setup floppy disks from Microsoft and run the Recovery Console from them. Search for ‘XP Setup disks’ at http://www.microsoft.com/downloads. Once the Recovery Console is running, select the Windows installation you want and type the administrator password when prompted. This won’t be your usual password; it was created when Windows was first installed. If you didn’t set an administrator password, just press Enter. When you get to the command prompt, type:
Fixboot [press the Enter key]
bootcfg /rebuild [press the Enter key]
This will search for the location of Windows. If it gives a correct location, add it to the list of available operating systems. When asked for Load Identifier, type in a description, which can be anything you want. The OS Load option should be set to /fastdetect.
When you restart the PC, you should see a boot options menu. One of the options will be the settings that didn’t work before. You’ll also see the one you just created. After Windows XP has successfully loaded, the Boot.ini can be edited to remove the incorrect entry.
For advanced instructions on editing Boot.ini for WinXP, you might still be able to find it on the web.