Recipe 19.9. Using the Recovery Console During Boot Failures


Problem

Your Windows XP computer fails to boot and displays some error messages. You need a way to get it back to life.

Solution

If switching to Safe Mode does not help you solve your startup problem, the next-best solution is to use the Recovery Console. There are two ways to invoke Recovery Console: either boot up Windows XP using the installation CD and choose the option to repair a Windows XP installation, or install the Recovery Console as a boot-up option. The former approach is more common, as users generally do not prepare for disasters. For the latter approach, insert your Windows XP installation disk and issue the following command:

> D:\i386\winnt32.exe /cmdcons

where D is the CD-ROM drive letter. This will install the Recovery Console as another item in the boot-selection menu that is displayed when you boot up your computer.

Once the Recovery Console is invoked, you will see a command-line interface prompting you to select the Windows installation to repair. You would also need to supply the administrator password. Some of the most common tasks you might want to accomplish are listed in the rest of this section.

The following commands copy files from the installation CD to the root directory on the hard drive:

> copy d:\i386\ntldr c:\ > copy d:\i386\ntdetect.com c:\

The following command will write a new boot sector on your disk:

> fixboot c:

The following command will write a new master boot record on your hard disk:

> fixmbr

To get a list of services installed on your system, you can use the following command:

> listsvc

To start, for instance, the WMI service (just to use an example; you wouldn't necessarily act on this service) at boot time:

> enable Wmi SERVICE_BOOT_START

To disable that same service:

> disable Wmi

You can see a list of all available commands by typing Help at the prompt.

Discussion

The Recovery Console is a text-based operating system extension that allows you direct access to the disk on which Windows XP is installed, and similar access to key configuration files and data. It also provides a convenient way around DOS's inability to read NTFS-formatted drives, which is an issue any administrator with trouble-shooting experience has come up against.

To use the Recovery Console, you must first set it up. If you are using a working system, it's prudent to go ahead and set the console up; that way, if it fails, using the console is as simple a procedure as selecting it from the startup menu at first boot. To do so, run winnt32 /cmdcons off the installation CD from within Windows. Setup will copy files and modify your boot configuration file to list the Recovery Console as a startup option.

Table 19-2 lists all available commands for the Recovery Console.

Table 19-2. Selected commands for the Recovery Console

Command name

Function

DISABLE

Prevents a service, named in the argument syntax of this command, from starting up upon a normal boot.

DISKPART

Executes a disk partitioning utility much like that used in the initial text-based phase of Setup.

ENABLE

Explicitly instructs a service named in the argument syntax of this command to start upon a normal boot.

FIXBOOT

Like the old fdisk /mbr command from DOS days, this will restore boot sector information and make the drive contained in the argument syntax the default drive for booting.

FIXMBR

This command is like fixboot, but it will only touch the master boot record of the drive; it won't alter default boot drives or create BOOT.INI files.

HELP

Lists all commands available in the Recovery Console.

LISTSVC

For use with the disable and enable commands, this lists all available services that can be started and stopped.

LOGON

Logs you out of an existing console and lets you select another installation on which to perform recovery functions.

SYSTEMROOT

Goes to the default Windows directory without grappling with unwieldy CD (change directory) commands.


See Also

MS KB 296251, "Recovery Console That You Create from a Sysprep Image Does Not Work," and MS KB 258585, "Recovery Console Prompts for Administrator Password Even If Administrator Account Has Been Renamed"

Also, BartPE, from http://www.nu2.nu, is a free tool that lets you create a GUI OS with useful system tools. The OS is Windows PE, which Microsoft uses for their installation environment. It takes a little time to set it up, but it's a lot of help when a system crashes.



Windows XP Cookbook
Windows XP Cookbook (Cookbooks)
ISBN: 0596007256
EAN: 2147483647
Year: 2006
Pages: 408

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