UGTS Document #2 - Last Modified: 8/29/2015 3:23 PM
How do I get to the Windows XP Recovery Console?

The Windows XP Recovery console gives you simplified version of the DOS command prompt which you can use to make basic system repairs to an install of Windows XP.

Before going into details, note that if you're running a virtual machine and just need to do file management operations, you shouldn't need to run the recovery console at all. Just mount the VHD file on the host machine, and make you changes directly using windows explorer. That being said, if this is a physical machine, or if you need to use some recovery console specific commands, such as fixboot, keep reading.

There are two ways to access the recovery console. You can either boot from the XP Setup disc to launch it, or you can pre-install it from the XP setup disc so that you have it as a startup option every time you start windows. Either way, you'll need to know the local Administrator account's password once you start the recovery console, or you won't be allowed into it.

If you haven't preinstalled the recovery console, insert the Windows XP Setup disc, and then boot from that disc, and press 'R' to repair windows using the recovery console:

As a faster way to get the recovery console which doesn't require you to have the XP setup disc, you can preinstall the recovery console by running from the XP setup disc on the command line:

D:\i386\winnt32 /cmdcons

Where D: is to be substituted with the drive letter where you've inserted the windows XP setup disc. Once you do this, a startup option for the Windows XP Recovery Console will be added, which can get you into the recovery console in 20 seconds as opposed to 2 minutes.

Once you are at the recovery console opening screen, do nothing and wait until the timer to select a keyboard mapping expires.

Next, if the recovery console can find one or more installs of Windows (from the boot.ini file), you'll be shown a list of Windows directories, such as:

1: C:\Windows
2: D:\Windows
3: E:\Windows

And you'll be asked 'Which Windows installation would you like to log into?', (press 1, 2, 3, etc... to select one of them, then press Enter, or press Enter by itself to cancel). Do not press Enter by itself, or the recovery console will exit and the computer will restart.

When deciding which windows install to use, it doesn't really make a difference except for commands which rely on the registry such as enabling and disabling services - any of the windows directories will work. You just need to know the local Administrator password for the one that you choose, because the recovery console will ask you that next, and if you get this wrong three times, you'll only be able to press Enter, and the system will restart.

If you started the recovery console from the XP setup disc, the drive letters listed will be C, D, E in strict alphabetic order according the order in which the drives are found by the system (and the same order that they are listed in diskmgmt.msc. If you started from a preinstalled copy of the recovery console, the drive letters will be the actual drive letters used if windows were to startup from the default copy of windows. Type a number to select a copy of windows, and then press Enter.

You will then be asked for the local administrator password. Enter this, and you'll then be in the recovery console, where you can run commands.

To exit the console and restart the computer, run the exit command.

Common useful commands at the recovery console:

fixmbr - fixes the MBR sector

fixboot C: - fixes the VBR sector for the given drive by letter

bootcfg /rebuild - rebuilds a new boot.ini file

attrib -rhs boot.ini - removes readonly, hidden, and system attributes from the boot.ini file, so that you can edit or delete it

del boot.ini - removes the boot.ini file so that the windows boot process can create a new one automatically at the next boot cd [path] - changes the current directory

dir - displays the files in the current directory more boot.ini - displays the contents of the boot.ini file

chkdsk C: /r - checks and repairs the given drive by letter listsvc - lists all the services and drivers for this install of windows (the one you are logged into)

enable [service] - enables the given service on the current copy of windows by name

disable [service] - disables the given service on the current copy of windows by name

Here is a full description from Microsoft of the commands available at the recovery console. Note in this description that the 'net use' command to map a network drive is not actually supported by the recovery console, and cannot be used, because the recovery console doesn't load any network stack drivers, and therefore can't access the network in any way.

And if you're wondering how to access files from USB drives or network shares from the recovery console, you can't - the minimal setup environment that the recovery console runs under does not support network or USB access. Instead, you'll have to burn a CD with the files, and insert that to get them, or put them on a hard drive which is attached.