Windows XP includes many different utilities. One such utility, designed for more advanced users, is known as the Recovery Console. The Recovery Console is a useful tool for troubleshooting.
The Recovery Console is normally used when you are unable to recover your computer using Safe Mode and other startup options. For example, you can use it to access volumes that can not be accessed when you are in Safe Mode. It allows you to run basic commands to identify problem device drivers and files.
In this daily drill down I will provide an overview of the Windows XP Recovery Console, how it can be installed on your computer, and the different commands supported by the console.
Recovery Console overview
The Recovery Console is a fancy-yet-restricted command prompt which requires an administrative login for access. The Recovery Console is a useful utility for troubleshooting and recovering a system. When you use the Recovery Console, you can gain limited access to any volumes without starting the Windows Graphical interface. The utility provides you with the following capabilities:
- Use, copy, rename, or replace operating system files and folders
- Enable or disable services or devices from starting when you restart your computer
- Repair the file system boot sector or the Master Boot Record (MBR)
- Create and format partitions on drives
Once you start the Recovery Console, you will have access to a limited number of commands. These commands are described in Table A.
In order to use the Recovery Console to recover a system, you should be familiar with most if not all of the available commands. For example, you can use the Fixboot and the Fixmbr commands as additional last-ditch attempts at going home on time, but more often, the recovery console is used to reconfigure services using the Disable and Enable commands which may have been the source of the problem. Unfortunately, many commands like XCOPY will not work with the Recovery Console.
Aside from a limited number of available commands, the Recovery Console also has another limitation. The console will only allow you to use the root folder, the %SystemRoot% folder and any subfolders for the Windows installation you are logged on to, the Cmdcons folders, and removable media drives. However, as you will see later in the article, this limitation can be changed through the local security policy.
Installing the Recovery Console
The Recovery Console can be access in two ways. It is accessible by booting to the installation CD, or you can also place it in the Advanced Boot options (F8 during boot, which gives you options like safe mode, last known good, boot logging, etc), by running \i386\winnt32.exe\cmdcons from the installation CD.
The advantage of installing the Recovery Console is that you do not need your Windows XP CD to run the utility. The installation process is very simple. Keep in mind though that it does require 7 MB of free disk space.
- Insert your Windows XP CD. Close the setup screen if it appears.
- Click Start and select run.
- Type in the following command where x is the letter assigned to your CD-ROM drive as shown in Figure A: x:\i386\winnt32.exe /cmdcons.
- Click OK.
- Click Yes to confirm the installation of the Recovery Console.
- Click Esc if you do not want to connect to the Internet.
- Click OK.
- Restart your computer.
|The Recovery Console can be installed on your computer.|
Removing the Recovery Console is not as simple and it requires a little more attention. In order to do so, you need to delete the files that were added to your computer and edit the boot.ini file to remove the Recovery Console option from the boot menu. So if you want to remove the Recovery Console option from your computer, you should follow the steps that are listed below:
- Open the drive on which you installed the Recovery Console.
- Click Folder Options from the Tools menu.
- Select the View tab.
- Scroll through the available options and select Show hidden files and folders.
- Clear the box beside Hide protected operated system files as shown in Figure B.
- Click OK.
- Locate and delete the Cmdcons folder and the Cmldr file.
- Locate the Boot.ini file.
- Right click the file and select Properties.
- Clear the box beside Read-only and click OK.
- Open the Boot.ini file and delete the Recovery Console option.
- Close the Boot.ini file.
- Within the Control Panel, switch to Classic View.
- Open the Administrative Tools applet and double click Local Security Policy.
- Under Security Settings, expand Local Policies and click Security Options.
- In the Details pane, double click Recovery Console: Allow automatic administrative logon as shown in Figure C.
- Click Enabled.
- Click OK.
|Operating system files must be visible to delete the Recovery Console.|
Once the Recovery Console has been removed, you should repeat steps 1 through 6 as outlined above, this time to hide protected operating system files.
Starting the Recovery Console
As already mentioned, the Recovery Console can be started using two different methods. You can start the console using the Windows XP installation CD. Insert the CD into your CD-ROM drive. During the text-mode portion of setup, choose R when prompted to perform a repair or recovery. Alternatively, if you completed the steps to install the Recovery Console on your computer, restart your computer and press [F8] during startup. From the startup options menu, select Recovery Console.
After the Recovery Console has been started, you will receive the following message:
Microsoft Windows (R)
The Recovery Console
provides system repair and recovery functionality.
Type Exit to quit the
Recovery Console and restart the computer.
installation would you like to log on to (To cancel, press ENTER)?
If you have more than one operating system installed, at this time you must select the installation you require access to and type in the Administrator password when prompted. You can exit the Recovery Console at any time but typing exit at the system prompt and then pressing Enter to restart the computer.
Automatic Administrator logon
After the Recovery Console is started you are required to type in the Administrator password. Alternatively, you can configure an automatic administrator logon so you are no longer prompted for the password. You can configure this option through the local security policy.
|Configuring automatic logon for the Recovery Console|
The next time you open the Recovery Console, you will not be prompted for the Administrator password.
Allow access to all drives
Typically the Recovery Console gives you limited access to your computer. By default, you are only permitted to access specific drives and folders. However, you can change this by editing the local security policy.
Open the local security policy using the steps outlined in the previous section. From the list of security options, double click Recovery Console: Allow floppy copy and access to all drives and all folders as shown in Figure D. Click Enabled and then click OK.
|Configuring access to all drives and all folders|
Formatting a drive using the Recovery Console
One of the many things you can do with the Windows XP Recovery Console is format a disk. Once you have started the Recovery Console and provided the correct Administrator password, type the following command where x is the letter assigned to the drive you want to format:
Replace a driver using the Recovery Console
Incorrect or corrupt drivers can wreak havoc on your computer and cause Windows to not function correctly. If you are having problems with a driver, you can launch the Recovery Console to replace it.
Once you have a copy of the uncorrupted driver files (on a floppy or other media) and know where they are located, start the Recovery Console using one of the methods described earlier. From the system prompt type in the command shown below where:
- Source_path is the path to the replacement file
- Source_filename is the name of the replacement file
- Destination_path is the path to the file that you are replacing
- Destination_filename is the name of the file you are replacing
Copy [source_path] source_filename [destination_path] destination_filename
When you are prompted, press Y to overwrite the exiting file and then press Enter.