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

InformationWeek is part of the Informa Tech Division of Informa PLC

This site is operated by a business or businesses owned by Informa PLC and all copyright resides with them.Informa PLC's registered office is 5 Howick Place, London SW1P 1WG. Registered in England and Wales. Number 8860726.

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.

Enter The Recovery Console
The safest, surest way to resolve problems such as "Missing or corrupt HAL.DLL," "Invalid Boot.Ini," or "Windows could not start..." is to boot the PC from an XP Setup CD and use the pristine, uncorrupted files and tools there to effect repairs. The one catch is that if your setup CD is significantly older than your current Windows version, you may have file compatibility problems. For example, you can hit snags if you use an original or SP1 XP Setup CD to try to repair an XP SP2 installation. You'll get a message to the effect that the version you're trying to upgrade is newer than the version on the CD.

The solution here is to use a "slipstreamed" setup CD, which adds the newer files to your original setup CD. This kind of updated setup CD can be used on just about any XP installation. It's a good idea to have an up-to-date, slipstreamed setup CD available in any case, as it simplifies all future installs and CD-based repairs.

Once you have a startup CD with the same version of system files as the PC you're working on, configure your PC to boot from CD if it isn't already set up that way. (You may need to enter the BIOS setup tool to configure the PC to boot from the CD.)

Start your PC with the XP Setup CD in the drive. When you see the "Press any key to boot from CD..." prompt, do so and let the CD-based boot process begin.

When the Recovery Console option is offered ("Press R to start the Recovery Console"), do so. You may be asked which Windows installation to enter, in which case type the number of the Windows installation you wish to work on (usually "1").

When prompted, enter the Administrator's password for that Windows installation.

At the command prompt, type "Bootcfg /Rebuild" (without the quotes) and hit enter. Windows will then scan the hard drive, looking for valid Windows installs and startup information.

The exact verbiage will depend on your setup, but after a few moments you'll see a prompt that says something like:

Total Identified Windows Installs: 1
[1] C:\Windows
Add Installation To Boot List?

Assuming the information you see is correct, enter "Y" for yes, and Bootcfg will start the process of rebuilding the boot list to include the indicated Windows installation. Along the way, it will repair most "Missing or corrupt HAL.DLL," "Invalid Boot.Ini," "Windows could not start...," and similar errors.

After a moment, you'll be asked to "Enter Load Identifier." This is the name of the operating system that will appear in boot menus. For consistency with the standard nomenclature used by Microsoft, enter "Microsoft Windows XP Professional" or "Microsoft Windows XP Home Edition" without the quotes and hit enter.

Next you'll be asked to "Enter OS Load Options." For normal installations, enter "/Fastdetect" (without the quotes) and hit enter.

In most cases, that's all it will take. You can type "Exit" to leave the Recovery Console and reboot the PC, which should then start normally.

But if you wish, or in cases where you suspect a problem with the boot sectors on the hard drive (as with problems in a dual- or multi-boot system that's become unstable, or where a third-party boot manager may have run amok), you can run Fixboot from the command line (without any parameters) prior to exiting the Recovery Console. This will write a new partition boot sector to the default drive, undoing any changes caused by dual-, multi-, or third-party boot processes. (You can reactivate those alternate boot methods later if you wish, but running Fixboot now simplifies the boot process and removes nonessential boot variables, which in turn helps ensure that the repaired XP installation will have the best chance of successful booting.)

After running Fixboot, type "Exit" to leave the Recovery Console and reboot the PC, which should then start normally.

We welcome your comments on this topic on our social media channels, or [contact us directly] with questions about the site.
Previous
2 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
Get Your Enterprise Ready for 5G
Mary E. Shacklett, Mary E. Shacklett,  1/14/2020
Commentary
Modern App Dev: An Enterprise Guide
Cathleen Gagne, Managing Editor, InformationWeek,  1/5/2020
Slideshows
9 Ways to Improve IT and Operational Efficiencies in 2020
Cynthia Harvey, Freelance Journalist, InformationWeek,  1/2/2020
White Papers
Register for InformationWeek Newsletters
Video
Current Issue
The Cloud Gets Ready for the 20's
This IT Trend Report explores how cloud computing is being shaped for the next phase in its maturation. It will help enterprise IT decision makers and business leaders understand some of the key trends reflected emerging cloud concepts and technologies, and in enterprise cloud usage patterns. Get it today!
Slideshows
Flash Poll