Using the Recovery Console
The Recovery Console is a text-mode command interpreter that is separate from the Windows 2000 command prompt and allows the system administrator to gain access to the hard disk of a computer running Windows 2000, regardless of the file format used, for basic troubleshooting and system maintenance. Since starting Windows 2000 is not a prerequisite for using the Recovery Console, it can help you recover when your Windows 2000–based computer does not start properly or at all. The Recovery Console allows you to obtain limited access to NTFS, file allocation table (FAT) (FAT16 and FAT32) volumes without starting the graphical interface. The Recovery Console allows administrators and Microsoft Product Support Services technicians to start and stop services, and repair the system in a very granular way. It can also be used to repair the master boot record (MBR) and boot sector and to format volumes. The Recovery Console prevents unauthorized access to volumes by requiring the user to enter the system administrator password.
Note
If you are using software mirroring or if you are running the Recovery Console using a Remote Install Server, see the Microsoft Knowledge Base link on the Web Resources page at http://windows.microsoft.com/windows2000/reskit/webresources .
Starting the Recovery Console
To start the Recovery Console, start the computer from the Windows 2000 Setup CD or the Windows 2000 Setup floppy disks. If you do not have Setup floppy disks and your computer cannot start from the Windows 2000 Setup CD, use another Windows 2000–based computer to create the Setup floppy disks. For more information about creating the Windows 2000 Setup floppy disks, see "Planning a Reliable Configuration" in this book or Windows 2000 Server Help.
If the Recovery Console was installed on the local hard disk, it can also be accessed from the Windows 2000 startup menu. However, if the MBR or the system volume boot sector has been damaged, you need to start the computer using either the Windows 2000 Setup floppy disks or the Windows 2000 Setup CD to access the Recovery Console.
To add the Recovery Console to existing installations of Windows 2000, on the Start menu, click Run , and then type:
F:\I386\Winnt32.exe /cmdcons
where F is the CD-ROM drive letter.
This installation requires approximately 7 megabytes (MB) of disk space on your system partition.
Important
You cannot preinstall the Recovery Console on a computer that contains a mirrored volume First break the mirror, then install the Recovery Console. After the Recovery Console is installed, you can re-establish the mirrored volume. For more information, see the Microsoft Knowledge Base link on the Web Resources page at http://windows.microsoft.com/windows2000/reskit/webresources .
Start the computer and enter Windows 2000 Setup. Press ENTER at the "Setup Notification" screen. Press R to repair a Windows 2000 installation, and then press C to use the Recovery Console.
When the Recovery Console is started, the following information is displayed:
Microsoft Windows 2000(TM) Recovery Console.
The Recovery Console provides system repair and recovery functionality.
Type EXIT to quit the Recovery Console and restart the computer.
1: C:\WINNT
Which Windows 2000 installation would you like to log onto
(To cancel, press ENTER)?
Important
If there is more than one installation of Windows 2000 or Microsoft® Windows NT® 4.0 or earlier, they are also shown in the Recovery Console startup menu.
Mirrored volumes appear twice in the Recovery Console startup menu, but each entry has the same drive letter so they are actually the same drive.
Changes made in the Recovery Console to mirrored volumes are mirrored.
To access the disk by using the Recovery Console, press the number key representing the Windows 2000 installation that you want to repair, and then press ENTER. The Recovery Console then prompts you for the administrator password. If you press ENTER without typing a number, the Recovery Console exits and restarts the computer.
Note
To use the Recovery Console, you must know the password for the local Administrator account. If you do not have the correct password, Recovery Console does not allow access to the computer. If an incorrect password is entered three times, the Recovery Console quits and restarts the computer. However, you can use either the Group Policy snap-in or the Security Configuration and Analysis snap-in to specify automatic administrative logon.
Once the password has been validated, you have full access to the Recovery Console, but limited access to the hard disk. You can only access the following folders on your computer:
-
%SystemRoot%. If you have multiple Windows installations, this is on the partition that contains Boot.ini and other Windows files required to start the system.
-
%Windir% and subfolders of the Windows 2000 installation that you are currently logged on to.
-
%SystemRoot%\Cmdcons and its subfolders.
Note
With the set command enabled, you can copy files to removable media and access all paths on the system. The set command is an optional Recovery Console command that can be enabled by either the Group Policy snap-in or the Security Configuration and Analysis snap-in. For more information about the set command, see "Supported Commands" later in this chapter.
The Recovery Console prevents access to other folders such as Program Files or Documents and Settings, as well as to folders containing other installations of Windows 2000. However, you can use the logon command to access an alternate installation. Alternatively, you can gain access to other installation folders by restarting the Recovery Console, choosing the number representing that installation, and then entering the administrator password for that installation.
You cannot copy a file from the local hard disk to a floppy disk, but you can copy a file from a floppy disk or a CD-ROM to any hard disk, and from a hard disk to another hard disk. However, with the set command enabled, you can copy files to a floppy disk. The Recovery Console displays an "Access is denied" error message when it detects invalid commands.
Important
The set command makes use of Recovery Console environment variables to enable, among other options, disk write access to floppy disks. To enable the user to modify the restricted default Recovery Console environment variables, a policy setting must be made. For more information about enabling the set command in Recovery Console, see the procedure later in this section.
The Recovery Console buffers previously entered commands and makes them available to the user with the up and down arrow keys. To edit a previously entered command, use backspace to move the cursor to the point of the edit and retype the remainder of the command. At any point, you can quit the Recovery Console and restart the computer by typing exit at the command prompt.
Important
The Recovery Console might not map disk volumes with the same drive letters that they have in Windows 2000. If you are having trouble copying files from one location to another, use the map command from the Recovery Console to make sure that the drive mappings for both the source and the target locations are correct.
Several of the Recovery Console commands are not fully functional to users who have converted to dynamic disks. For more information about dynamic disks, see the chapter "Disk Concepts and Troubleshooting" in this book.
Supported Commands
Table 13.1 lists the commands that are supported by the Recovery Console. You can use the help command to list the commands supported by the Recovery Console.
Note
The switch /? works with every Recovery Console command to display a help screen offering a description of the command, its syntax, definitions of its parameters, and other useful information.
Table 13.1 Available Recovery Console Commands
|
Command |
Explanation |
|---|---|
|
attrib |
Changes attributes on one file or directory.
|
|
batch |
Executes commands specified in a text file.
|
|
cd/chdir |
Displays the name of the current directory, or switches to a new directory.
|
|
chkdsk |
Checks a disk and displays a status report,
|
|
cls |
Clears the screen. |
|
copy |
Copies a single file to another location.
|
|
del/delete |
Deletes one file.
|
|
dir |
Displays a list of files and subdirectories in a directory.
|
|
disable |
Disables a Windows system service or driver.
|
|
diskpart |
Manages the partitions on your hard disk volumes.
|
|
enable |
Enables a Windows system service or driver.
|
|
exit |
Quits the Recovery Console and restarts your computer. |
|
expand |
Expands a compressed file.
|
|
fixboot |
Writes a new boot sector onto the system partition.
|
|
fixmbr |
Repairs the master boot code of the boot partition.
|
|
format |
Formats a disk for use with Windows 2000.
|
|
help |
Displays information about commands supported by the Recovery Console.
|
|
listsvc |
Lists all available services and drivers on the computer. |
|
logon |
Lists the detected installations of Windows 2000, and requests the local administrator password for those installations. |
|
map |
Lists the drive letter to physical device mappings that are currently active.
|
|
md/mkdir |
Creates a directory.
|
|
more/type |
Displays a text file to the screen.
|
|
rd/rmdir |
Removes (deletes) a directory.
|
|
ren/rename |
Renames a single file.
|
|
set |
Displays and sets Recovery Console environment variables.
|
|
systemroot |
Sets the current directory to %SystemRoot%. |
Often it is useful to enable the set command to make full use of the Recovery Console. To do this, a local policy must be enabled.
To enable full functionality of the set command using Group Policy
Note
If Group Policy has already been added to your MMC, skip to step 8.
-
From the Start , click Run , and then type
mmc -
Press ENTER .
-
In the Console1 dialog box, click Console , select Add/Remove Snap-in , and then click Add .
-
Select Group Policy, and then click Add .
-
In the Select Group Policy Object list box, choose Local Computer , and then click Finish .
-
In the Add Standalone Snap-in dialog box, click Close .
-
In the Add/Remove Snap-in dialog box, click OK .
-
Expand Local Computer Policy , Computer Configuration , W indows Settings , Security Settings , and then Local Policies . Click Security Options .
-
Double-click the policy Recovery Console: Allow floppy copy and access to all drives and folders .
-
In the Local Security Policy Setting dialog box, select Enabled , and then click OK .
To enable full functionality of the set command using the Security Configuration and Analysis snap-in
Note
If Security Configuration and Analysis snap-in has already been added to your MMC, skip to step 7.
-
From the Start , click Run , and then type
mmc -
Press ENTER.
-
In the Console1 dialog box, click Console , select Add/Remove Snap-in , and then click Add
-
Select Security Configuration and Analysis , click Add , and then click Close . In the Add/Remove Snap-in dialog box, click OK.
-
In the Console1 dialog box, double click Security Configuration and Analysis . Follow the instruction to either open an existing database or create a new database.
-
In the Console1 dialog box, follow the instructions to configure your computer and analyze your computer security settings.
-
In the Security Configuration and Analysis snap-in, double click Security Configuration and Analysis .
-
Expand Local Policies, and then click Security Options .
-
Double-click the policy Recovery Console: Allow floppy copy and access to all drives and folders .
-
In the Analyzed Security Policy Setting dialog box, select Enabled , and then click OK .
Note
You can also use the Group Policy snap-in and the Security Configuration and Analysis snap-in to select the policy Recovery Console: Allow automatic administrative logon.
Replacing the Registry Using the Recovery Console
If you are having problems with the registry, you can use the copy command to replace individual registry files by copying them from either the %sSystemRoot%\Repair folder or the %SystemRoot%\Repair\RegBack folder.
Important
If you copied the files from %SystemRoot%\Repair\RegBack, your registry settings reflect those that were in effect when you selected the System State option during Backup operations.
If you copied the files from %SystemRoot%\Repair, your registry settings reflect those that were in effect when you installed Windows 2000.
Recreating Boot.ini Using the Recovery Console
You can use the Emergency Repair Process to replace a missing or corrupted Boot.ini file. Alternatively, you can use the map command to determine the location of the disks. With this information, you can create a Boot.ini file on another computer, and then use a floppy disk to transfer the Boot.ini file to the original computer.

