Langa Letter: XP's Little-Known 'Rebuild' Command - InformationWeek
IoT
IoT
Software // Enterprise Applications
Commentary
4/13/2006
01:53 PM
Fred Langa
Fred Langa
Commentary
50%
50%

Langa Letter: XP's Little-Known 'Rebuild' Command

There's an easy fix for "Missing HAL.DLL," "Invalid Boot.Ini," and several other fatal startup errors, Fred Langa says.

It usually takes a lot to stop XP in its tracks. Even in those rare cases when the operating system is badly damaged, you'll usually at least have the option of booting into the "Last Known Good" configuration, or to Safe Mode. But sometimes, especially after major hardware failures or part swaps (e.g. moving the operating system to a new hard drive), or after problems with dual- or multi-booting software, you may encounter seemingly intractable errors such as "Missing or corrupt HAL.DLL," "Invalid Boot.Ini," or "Windows could not start..."

These problems can seem hard to get past. For example, the first time I got a "Cannot find \Windows\System32\hal.dll" error message, I thought I'd be clever and replace the missing file via a simple Copy command from the Recovery Console. I booted the PC, switched to the \Windows\System32 folder, and there it was: The HAL.DLL was already there. It wasn't missing at all. Why couldn't the operating system find it?

I tried copying a fresh version of the file to \Windows\System32. No dice. I tried renaming it all uppercase and then all lowercase. Nothing. I put a copy in the root directory. No effect. I tried everything I could think of, but nothing worked.

Then--doh!--I stopped thrashing and did what I should have done initially: I dug into the Microsoft Knowledge Base and learned about XP's built-in Rebuild command. It can often easily fix "Missing HAL" and similar problems in just a minute or two. If you know about this command and how to use it, you can potentially save yourself hours and hours of manually reinstalling or rebuilding a failed operating system.

The Rebuild command--technically a software "switch" used with XP's Bootcfg tool--automatically searches a hard drive for valid startup information and files, letting you choose the correct ones. This has the effect of removing and repairing any references to whatever invalid, missing, or corrupt startup information was preventing normal booting.

As is true of so many technical topics, this one actually takes far longer to describe than to implement, so please don't be put off by any seeming complexity in this discussion. Once you know the process, it's actually quite straightforward and takes only a minute or two to run to completion.

For example, if you already have some knowledge of the commands involved, many "Missing or corrupt HAL.DLL," "Invalid Boot.Ini," or "Windows could not start..." problems can be fixed with these five shortcut steps:

  • Boot from your XP Setup CD and enter the Recovery Console
  • Run "Attrib -H -R -S" on the C:\Boot.ini file
  • Delete the C:\Boot.ini file
  • Run "Bootcfg /Rebuild"
  • Run Fixboot

It really can be as simple as that!

But the first few times you try this repair, it makes sense to use the slightly longer but more certain "official" method, as outlined by Microsoft in a number of separate Knowledge Base articles. To save you time, we'll concatenate the instructions here.

We welcome your comments on this topic on our social media channels, or [contact us directly] with questions about the site.
Previous
1 of 3
Next
Comment  | 
Print  | 
More Insights
Comments
Newest First  |  Oldest First  |  Threaded View
Alex111
50%
50%
Alex111,
User Rank: Apprentice
11/12/2012 | 2:15:25 PM
re: Langa Letter: XP's Little-Known 'Rebuild' Command
Hi Fred.
What can I do when the computer will not give me the option to load the XP cd ( by pressing any key after switching on the PC ) and in the same time F2, F8 and ESC bottons do not work. TAB and DEK buttons bring; for few seconds only, the list of the computer's components.
I checked in various forums and hekp topics and have not yet found any good result.
Your advice is most welcome.
Commentary
The Staying Power of Legacy Systems
Mary E. Shacklett, Mary E. Shacklett,  4/15/2019
Commentary
Q&A: Red Hat's Robert Kratky Discusses Essentials of Docs
Joao-Pierre S. Ruth, Senior Writer,  4/15/2019
Commentary
How Cloud Shifts Security Balance of Power to the Good Guys
Guest Commentary, Guest Commentary,  4/11/2019
White Papers
Register for InformationWeek Newsletters
Video
Current Issue
A New World of IT Management in 2019
This IT Trend Report highlights how several years of developments in technology and business strategies have led to a subsequent wave of changes in the role of an IT organization, how CIOs and other IT leaders approach management, in addition to the jobs of many IT professionals up and down the org chart.
Slideshows
Flash Poll