Home > Troubleshooting > Repairing Windows XP using the Recovery Console

Repairing Windows XP using the Recovery Console


NOTE:This solution is only for solving the errors and issues given below, if the computer is not infected by spyware and viruses. The commands given below may rebuild even some heavily infected computers, but there’s no such guarantee. If you doubt that your computer is infected, remove the spyware and viruses first, before trying this procedure.

Many people turn off their computers at night, all over the world, but some people, after turning them on, the next morning, get an error screen instead of the Starting Windows screen. The error can be any one of the following, in addition to others:

Windows could not start because the following file is missing or corrupt:

C:\WINDOWS\SYSTEM32\CONFIG\SYSTEM

You can attempt to repair this file by starting Windows Setup using the original Setup CD-ROM.

Select ‘R’ at the first screen to start repair.

Windows could not start because the below file is missing or corrupt:

C:\WINDOWS\System32\Ntoskrnl.exe

Windows could not start because the below file is missing or corrupt:

C:\WINDOWS\System32\HAL.dll 

NTLDR is missing.

Press any key to restart

 

Invalid boot.ini.

Press any key to restart

Now, your computer doesn't boot in the normal way, so you try booting it using the safe mode. But, you still get the same error message. If you are somewhat knowledgeable and know about the , you boot into the and try the FIXBOOT and FIXMBR commands but these too don't help. You want access to some critical data, but how do you access it when Windows won't boot even using the safe mode?

If you call a computer technician, he would most probably tell you that the only solution to these errors is to backup your data by connecting the hard disk to another computer and then reinstalling Windows from scratch. Then, installing and configuring your software programs and restoring your data back. A very cumbersome process and it can take many weeks or even months to configure all your Windows and software settings, the way they were previously. Apart from the time and trouble this would take, you also have to spend a hefty amount for his work.

So, how do you troubleshoot and repair the above errors yourself? Continue reading below.

First, boot into the Recovery Console, using the Windows XP installation CD, or if you have the Recovery Console installed on your hard disk and available as an option in the Windows boot menu, use that.

Most people would have just one Windows installation. However, if you have more than one, select the one that gives the above errors. Once you are in the Recovery Console, type the commands in sequence, given in step 7.

The BOOTCFG /Rebuild command fixes the following:

  • Windows Hardware Abstraction Layer (HAL)
  • Corrupt registry hives (\WINDOWS\SYSTEM32\CONFIG\xxxxxx)
  • Invalid BOOT.INI file
  • A corrupt NTOSKRNL.EXE
  • A missing NT Loader (NTLDR)
    The repair process is harmless and may or may not apply to other types of errors and blue screens of death (BSOD), but it’s not guaranteed and xpdrivers won’t be responsible for any harm, it may cause.
  1. After ensuring that the computer BIOS is set to boot from the CD drive first, boot your computer with your Windows XP installation CD in the CD drive. If you don’t know how to set the BIOS to boot the computer from the CD, view this page.

    The following YouTube videos would also be helpful:

    http://www.youtube.com/watch?v=qKaKj6uRLSM
    http://www.youtube.com/watch?v=VLaoajhiN_k
    http://www.youtube.com/watch?v=exU85jk9UyM

  2. After the computer boots and Windows XP Setup starts, do not select the option which says: "Press F2 to initiate the Automated System Recovery (ASR) tool." Let the Setup proceed till you see the following screen. At this screen, press the letter "R" on your keyboard, to start the Recovery Console.

    Recovery_Console_Welcome_to_Setup_Screen

  3. After pressing the letter R, the Windows XP Setup prompts you to select a valid Windows installation (this would mostly be number "1"). Select the installation number ("1" in most cases) and hit the Enter key. If you had set an administrator password during the initial Windows XP installation, type the password and then hit enter.
  4. If you don’t remember the administrator password, or don’t remember if you had set one or not, try pressing the enter key instead of typing any password. This could work in many cases. 

    But, what to do if the recovery console doesn’t accept a blank password and if you don’t remember the one you had set during installation? Click here to know more, how to recover or reset your Windows XP password with some free tools.

    Once, the Setup accepts the password, it greets you with the following screen, which tells you that the recovery console is ready to accept commands:

    Recovery_console_Admin_Login

  5. There are seven commands which you have to type one by one in sequence to repair any of the above mentioned errors. Type one command per line and hit the enter key after typing each. Remember to replace the drive letter (C: in this case), with the appropriate drive letter for your Windows installation. The commands are:
    • CD .. or CD \
    • ATTRIB –RSH C:\boot.ini
    • COPY C:\boot.ini C:\boot.bak
    • DEL C:\boot.ini
    • BOOTCFG /Rebuild
    • CHKDSK /R
    • FIXBOOT
  6. The first command, CD .. (or CD \) brings you out of the Windows directory, into the root directory, C:.

    Recovery_Console_CD..

  7. Once you’re at the C:\> prompt, you can start repairing XP. First of all, you have to change the attributes of the boot.ini file, which is hidden from normal view. BOOT.INI controls what operating systems the Windows boot process can see, how to load them, and where they’re located on your hard disk. Type the below command at the command prompt and press the enter key. to remove the system, hidden and read-only attributes of boot.ini:

    ATTRIB -RSH C:\boot.ini

  8. After removing the attributes with the above command, make a backup of boot.ini, using the ‘copy’ command. Then, delete the original boot.ini, using the ‘del’ command, as shown below.

    Recovery_Console_del_boot.ini

  9. The BOOTCFG / REBUILD is the most important of all the commands. It searches for existing Windows XP installations, rebuilds essential Windows’ components, recompiles the BOOT.INI file and corrects many common Windows’ errors.

    There are two important steps in this command:

    • You must use the /FASTDETECT as an option to the BOOTCFG command, when the command asks for an OS Load Option.
    • If you have a CPU with the Intel’s XD or AMD’s NX buffer overflow protection, you must also use /NOEXECUTE=OPTIN as an OS Load Option, as shown below. Do not put NOEXECUTE as an OS Load Option if your CPU doesn’t have the Intel’s XD or AMD’s NX buffer overflow protection.
    • For the identifier, you can type "Microsoft Windows XP Home Edition", if you have Windows XP Home Edition, for example.Recovery_Console_bootcfg_command
  10. This command checks and fixes any physical errors on the partition containing Windows XP. This is just a simple command, type it at the C:\> prompt:

    CHKDSK /R

    The command can take some time to complete, especially if there are some errors, as it has to check the whole partition. If you don’t learn or understand how to use any other Recovery Console commands, learn this one for sure. In many cases, this single command has fixed computers which wouldn’t boot into Windows. After the command finishes, move on to the last step.

    Recovery_Console_chkdsk_command Recovery_Console_chkdsk_report

  11. This is also a simple command. Just type FIXBOOT at the C:\> prompt. This command writes a new boot sector to the hard drive. Press "Y" when the command asks if you want to write a new boot sector to partition C:, and press the Enter key to confirm.

    Recovery_Console_fixboot_command

  12. The procedure is complete and you can type the command, EXIT, followed by pressing the Enter key, to reboot the computer. If you are lucky, the computer should boot into Windows XP as if nothing had happened. If you were successful in booting into Windows XP, you saved yourself a lot of headache, frustration, data loss and paying big bucks to a computer technician.

  1. No comments yet.
  1. No trackbacks yet.