Software // Enterprise Applications
Commentary
4/13/2006
01:53 PM
Fred Langa
Fred Langa
Commentary
Connect Directly
RSS
E-Mail
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.

Previous
1 of 3
Next
Comment  | 
Print  | 
More Insights
Comments
Oldest First  |  Newest 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.
Building A Mobile Business Mindset
Building A Mobile Business Mindset
Among 688 respondents, 46% have deployed mobile apps, with an additional 24% planning to in the next year. Soon all apps will look like mobile apps and it's past time for those with no plans to get cracking.
Register for InformationWeek Newsletters
White Papers
Current Issue
InformationWeek Tech Digest - July 22, 2014
Sophisticated attacks demand real-time risk management and continuous monitoring. Here's how federal agencies are meeting that challenge.
Flash Poll
Video
Slideshows
Twitter Feed
InformationWeek Radio
Archived InformationWeek Radio
A UBM Tech Radio episode on the changing economics of Flash storage used in data tiering -- sponsored by Dell.
Live Streaming Video
Everything You've Been Told About Mobility Is Wrong
Attend this video symposium with Sean Wisdom, Global Director of Mobility Solutions, and learn about how you can harness powerful new products to mobilize your business potential.