rss

Tuesday, August 11, 2009

Recovery Console in Windows XP

This section describes the functionality and limitations of the Windows Recovery Console. The Windows Recovery Console is designed to help you recover when your Windows-based computer does not start properly or does not start at all.

When you use the Windows Recovery Console, you can obtain limited access to NTFS, FAT, and FAT32 volumes without starting the Windows graphical interface. In the Windows Recovery Console you can:

Use, copy, rename or replace operating system files and folders, Enable or disable services or devices from starting when you next start your computer, Repair the file system boot sector or the Master Boot Record (MBR), Create and format partitions on drives.

Note that only an administrator can obtain access to the Windows Recovery Console so that unauthorized users cannot use any NTFS volume. More Information.

To install the Recovery Console as a Startup Option

With Windows running, insert the Setup CD into your CD-ROM drive. Start/Run/X:i386\winnt32.exe /cmdcons. Follow the instructions on the screen.

Notes:

To run the Recovery Console, restart your computer and select the Recovery Console option from the list of available operating systems.

You must be logged on as an administrator or a member of the Administrators group in order to complete this procedure. If your computer is connected to a network, network policy settings may also prevent you from completing this procedure.

To see the commands available on the Recovery Console, type help at the at the console prompt.

To start the computer and use the Recovery Console

From the Setup CD-ROM

Insert the Setup compact disc (CD) and restart the computer. If prompted, select any options required to boot from the CD.
When the text-based part of Setup begins, follow the prompts; choose the repair or recover option by pressing R. If you have a dual-boot or multiple-boot system, choose the installation that you need to access from the Recovery Console. When prompted, type the Administrator password. At the system prompt, type Recovery Console commands; type help for a list of commands, or help commandname for help on a specific command.

To exit the Recovery Console and restart the computer, type exit.

If you have already installed the Recovery Console

During Startup, select Recovery Console from the startup options menu. If you have a dual-boot or multiple-boot system, choose the installation that you need to access from the Recovery Console. When prompted, type the Administrator password. At the system prompt, type Recovery Console commands; type help for a list of commands, or help commandname for help on a specific command. To exit the Recovery Console and restart the computer, type exit.

Important Note: Because the Recovery Console is quite powerful, it is recommended for use only by advanced users or administrators.

To Delete the Recovery Console

Open My Computer.
Double-click the hard drive on which you installed the Recovery Console.
On the Tools menu, click Folder Options.
Click the View tab.
Click Show hidden files and folders, clear the Hide protected operating system files check box, and then click OK.
At the root directory, delete the \Cmdcons folder.
At the root directory, delete the file Cmldr.
At the root directory, right-click the Boot.ini file and then click Properties.
Clear the Read-only check box, and then click OK.
Open Boot.ini in Notepad, and remove the entry for the Recovery Console. It will look similar to this:
C:\cmdcons\bootsect.dat="Microsoft Windows Recovery Console" /cmdcons

Save the file and close it.

Modifying the Boot.ini file incorrectly may prevent your computer from restarting. Be sure to delete only the entry for the Recovery Console. Notes:

To open My Computer, double-click the My Computer icon on the desktop.
It is recommended that you change the attribute for the Boot.ini file back to read-only after you complete this procedure. You may also want to hide your system files again.


The commands available when using the Recovery Console are:
Attrib CD Chdir
Chkdsk Cls Copy
Del Delete Dir
Disable Diskpart Enable
Exit Expand Fixboot
Fixmbr Format Help
Listsvc Logon Map
MD Mkdir More
Rd Ren Rename
Rmdir Type Systemroot

Attrib: Changes the attributes of a file or directory.
Batch: Executes the commands specified in the text file.
ChDir (Cd): Displays the name of the current directory or changes the current directory.
Chkdsk: Checks a disk and displays a status report.
Cls: Clears the screen.
Copy: Copies a single file to another location.
Delete (Del): Deletes one or more files.
Dir: Displays a list of files and subdirectories in a directory.
Disable: Disables a system service or a device driver.
Diskpart: Manages partitions on your hard drives.
Enable: Starts or enables a system service or a device driver.
Exit: Exits the Recovery Console and restarts your computer.
Expand: Extracts a file from a compressed file.
Fixboot: Writes a new partition boot sector onto the system partition.
Fixmbr: Repairs the master boot record of the partition boot sector.
Format: Formats a disk.
Help: Displays a list of the commands you can use in the Recovery Console.
Listsvc: Lists the services and drivers available on the computer.
Logon: Logs on to a Windows 2000 installation.
Map: Displays the drive letter mappings.
Mkdir (Md): Creates a directory.
More: Displays a text file.
Rename (Ren): Renames a single file.
Rmdir (Rd): Deletes a directory.
Set: Displays and sets environment variables.
Systemroot: Sets the current directory to the systemroot directory of the system you are currently logged on to.
Type: Displays a text file.

This list can be obtained in the Console by typing "help" without the quotes.

A Discussion About the Bootcfg Command and Its Uses

The bootcfg command is a Microsoft Windows XP Recovery Console command that manipulates the Boot.ini file. This command has a function that can scan your hard disks for Microsoft Windows NT, Microsoft Windows 2000, and Windows XP installations, and then add them to an existing Boot.ini file or rebuild a new Boot.ini file, if one does not exist. The bootcfg command enables additional Boot.ini file parameters to be added to existing or new entries.

To use the bootcfg command, start the Recovery Console with the Windows XP CD-ROM, and then click Recovery Console. Or, install the Recovery Console locally, and then select the command from the Boot menu. More Information.

How to Boot Windows Preinstall Environment from a Hard Disk

This section describes how to configure the Windows Preinstall Environment (WinPE) to boot from a hard disk.

NOTE: More than likely the supported methods to boot WinPE (by means of a CD-ROM or from a Remote Installation Services (RIS) server) are the most commonly used methods. The method that is described in this article is provided for
informational purposes. More Information.

Access Floppy Drive from Recovery Console

To enable write access to floppies from within the R.C., click Start, Programs, Administrative Tools, Local Security Policy. Under Local Policy, Security Options, double-click "Recovery Console: Allow floppy copy and access to all drives and all folders." Select Enabled, then click OK.

Note: The following steps may also be necessary:

"After you enable the security policy, it must be applied (possibly across the domain) before becoming the effective policy on the local computer. This is necessary before the set command is truly enabled and available for use during a Recovery Console session. You can run the following command to force a refresh of the local computer's policy after performing the policy change listed above: secedit /refreshpolicy machine_policy

After the local policy is refreshed and the enabled Recovery Console security policy is in effect, you should be able to start Recovery Console and use the set command to enable any of the four environment options."

In the Recovery Console, you must then type: set AllowRemovableMedia = TRUE

Accessing Other Folders in Recovery Console

This security policy will also access to files and folders other than the defaults (normally access is restricted to \winnt and \cmdcons). To enable access to other folders, simply boot to the Recovery Console command prompt and type: set AllowAllPaths = true

You will then be able to access other files and folders on your computer. Please keep in mind that this is a potential security problem, and that you should be careful to restrict physical access to computers that are configured in this way.

0 comments:


Post a Comment