6.3 Windows Recovery Console


6.3 Windows Recovery Console

The Windows Recovery Console (WRC) is a tool included with Windows XP, used to repair the operating system when it won't start, as well as perform some other tasks not otherwise possible from within Windows. For those accustomed to being able to boot into DOS to effect repairs in some earlier versions of Windows, the WRC is the Windows XP equivalent.

The WRC allows you to do the following:

  • Repair a Windows XP installation, including the filesystem boot sector, the Master Boot Record (MBR), and the Boot Manager configuration

  • Copy, rename, delete, or replace operating system files that otherwise cannot be modified while Windows is running

  • Enable or disable services or devices

  • Create and format hard drive partitions

To get into the WRC, you'll need to boot up off the Windows XP CD. After Setup loads all its drivers, press R to start the Windows Recovery Console.

You can also install the Recovery Console to your hard disk so that it can be started without the CD. This option, which will add it to the Boot Manager menu, is useful if you find that you need the Recovery Console frequently or you're unable to boot off the CD. To install the WRC, insert your Windows CD, go to Start Run, and type d: \i386\winnt32.exe /cmdcons , where d: is the drive letter of your CD drive.

Regardless of how the WRC is started, you'll be greeted with a rather unfriendly warning message, followed by the following prompt:

 Which Windows installation would you like to logon to (enter to abort)? 

Choose whatever number corresponds to the Windows installation you wish to repair (usually 1 ), and log in using your Administrator password. If you've forgotten your Administrator password (set when Windows XP was installed), WRC won't let you in. You'll have three tries before WRC reboots your system. If this is the case, and Windows won't start, you may have to reinstall Windows XP.

Once you've logged in, the WRC looks and feels like the Windows XP command prompt described at the beginning of this chapter, but it's not exactly the same. You can execute most of the standard DOS commands (albeit in a more limited fashion), but you won't be able to launch DOS or Windows programs.

6.3.1 Recovery Console Commands

The following DOS commands, documented earlier in this chapter, can be used in the Windows Recovery Console: attrib , cd , cls , copy , del , dir , exit , md , more , ren , rd , set , and type . In addition, you'll be able to use the Chkdsk, DiskPart, and Format utilities discussed in Chapter 3. The following are the special commands that are available in the Windows Recovery Console:

Command

Description

batch filename [outputfile]

Executes a batch file, something that can't be accomplished in the WRC by typing the filename alone, as in the real command prompt.

bootcfg /command

Starts the Boot Manager configuration and recovery tool. This tool is used to view, edit, and rebuild the boot.ini file, which contains a list of all installed operating systems on a multiple-boot system. Command can be any of the following:

add

Adds a new entry to the boot.ini file.

copy

Creates a backup of the boot.ini configuration file.

default

Sets the default boot entry.

disableredirect

Disables redirection instigated by the redirect command.

list

Displays the entries currently specified in boot.ini .

rebuild

Lists all the Windows installations and selectively rebuilds the boot menu. Tip: Use bootcfg /copy before using rebuild.

redirect [port baudrate useBiosSettings]

Enables redirection of the boot loader output to the specified serial port and baudrate, or use useBiosSettings to use the default COM port settings in the system BIOS.

scan

Scans your hard disk for all Windows installations and displays a list of the results, independent of the contents of boot.ini .

disable [service device_driver]

Disables a system service or a device driver for the next time Windows starts. See enable, below, for details.

enable service device_driver [startup_type]

Starts or enables a system service or a device driver for the next time Windows starts. Use the listsvc command to list the names of all available services and device drivers. The startup_type option can be SERVICE_BOOT_START, SERVICE_SYSTEM_START, SERVICE_AUTO_START, or SERVICE_DEMAND_START.

fixboot [drive]

Writes a new partition boot sector onto the specified drive letter. In most cases, you can omit drive to use the current partition. Use this command to fix the partition boot sector if it has been damaged, typically by a virus or the installation of another operating system.

fixmbr [device]

Repairs the master boot record of the specified disk. Use the map command to display the entries for device. In most cases, you can omit device to use the default boot device, upon which your primary operating system is installed. Use this if the boot record has been damaged, typically by a virus or the installation of another operating system.

listsvc

Lists the services and drivers available on the computer, for use with the enable and disable commands discussed above.

logon

Logs on to another Windows XP/2000 installation ( assuming you have more than one) without having to reboot and reenter the Recovery Console.

map

Displays drive letter mappings for use with the fixmbr command.

systemroot

Changes the current directory (like the cd command) to the "systemroot" directory (usually c:\windows ).

6.3.2 Lifting Recovery Console Restrictions

By default, the attrib , copy , del , dir , and ren commands don't support wildcards ( * and ? ) in the Windows Recovery Console. While this is a safety feature intended to prevent unintentional damage to the system, it can be a frustrating limitation. To lift this restriction, type:

 set AllowWildcards = true 

TIP

figs/frog_climbingxp_tip.gif

When typing any of the set commands, you must include spaces before and after each of the equals signs. Otherwise, you'll receive a "syntax error" message.

Another restriction is one placed on the cd command, wherein your access is restricted to certain directories unless you type:

 set AllowAllPaths = true 

To enable access to the floppy drive, type:

 set AllowRemovableMedia = true 

Finally, to turn off the prompt that appears when you try to replace a file with the copy command, type

 set NoCopyPrompt = true 

Unfortunately , these are only temporary settings and are lost as soon as the system is restarted.

You may encounter an error in which the set command is currently disabled; unfortunately, this can only be fixed by returning to Windows and following this procedure: Start the Local Security Settings editor ( secpol.msc ) and navigate to \Security Settings\Local Policies\Security Options in the tree. Double-click the "Recovery Console: Allow floppy copy and access to all drives and all folders" entry, select Enabled OK.



Windows XP Pocket Reference
Windows XP Pocket Reference
ISBN: 0596004257
EAN: 2147483647
Year: 2001
Pages: 154
Authors: David A. Karp

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net