Using The Recovery Console

A very good tutorial from Mr.Intel_Gigacore
A very wonderfull tutorial..

Few of us, like me will attempt to make a fresh installation if something fails and doesn’t bother about entering the recovery console itself. Please keep in mind its one of the most useful tool to recover from the error without any data loss! Whenever u get a errode]r message stating you to fix it in Recovery Console, please don’t neglect it… Go for it… its easy and faster than install the OS again.
The Recovery Console Provides access to your system’s files systems on your HDD (FAT, FAT32 and NTFS). With this level of access, we system admin can access files and dir’s. More importantly, the admin has the capability to start and stop services and therefore repair the system.

Starting the Recovery Console (RC)

The Recovery Console can be accessed from the Windows XP Professional installation CD-ROM or from your Windows XP Professional Setup floppy disks. It can also be installed to the local hard disk by typing the following command at a command prompt:

Code:
D:I386WINNT32.EXE /cmdcons

In this prompt, D: represents the CD-ROM drive where the Windows XP Pro installation CD-ROM is located.

Quote:
Note: You cannot install RC on a mirrored disk. You need to break the mirror and install it.

To start the Recovery Console using the installation disk, follow these steps:
1. Boot the computer from the Windows XP Professional installation CD-ROM or from the Windows XP Pro Setup floppy disks. At the Setup Notifi¬cation screen, press Enter.
2. On the Welcome To Setup screen, press R to repair a Windows installation.
3. Select the Windows XP Professional installation you want to repair, and press Enter.
4. Enter the password for the local administrator account.

To start the Recovery Console that was installed to the local hard disk, take these steps:
1. Boot the computer. At the Operating System selection screen, select Microsoft Windows Recovery Console.

2. Select the Windows XP Professional installation you want to repair, and press Enter.
3. Enter the password for the local administrator account.

Using the Recovery Console
The Recovery Console is a command-line interface. Most of the commands are derived from MS-DOS commands, so, if you are familiar with MS-DOS, you can figure out what a command does. If you are not sure what a command does, help can be obtained by typing the command followed by /?.Table 14.1 lists the commands supported by the Recovery Console.

Recovery Console commands.

Attrib - Changes attributes on one file or directory
Batch - Executes commands specified in a text file
Bootcfg - Boots configuration and recovery
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 - Exits the Recovery Console and restarts the 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
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 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
Net Use Maps a network share to a drive letter
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%[/code]

By default, the Recovery Console only permits access to the following directories:
> %systemroot%
> Root directory of local disks
> cmdcons and any subdirectories
> Directories on floppy disks and CD-ROMs

Access can be gained to other directories by changing the local Group Policy settings as described in the following steps:
1. Select Start | Run, and enter "MMC"
2. Click the Console drop-down menu, and select Add/Remove Snap-In.
3. Click Add.
4. From the list of snap-ins, select Group Policy, and click Add.
5. The Select Group Policy Object dialog box will be displayed. Verify that Local Computer is listed, and click Finish.
6. Click Close on the Add Stand-Alone Snap-In dialog box.
7. Click OK to close the Add/Remove Snap-In dialog box.
8. Double-click Local Computer Policy.
9. Double-click Computer Configuration.
10. Double-click Windows Settings.
11. Double-click Security Settings.
12. Double-click Local Policies.
13. Select Security Options.
14. Double-click Recovery Console: Allow floppy copy and access to all drives and all folders.
15. The Local Security Policy Setting dialog box will be displayed. Select Enabled, and click OK.

The set command is disabled by default. Once this access has been granted via Group Policy, the set command is enabled. The following set command can provide several functions:
Set [variable - value]
In the preceding command line, variable can be the following:
> AllowWildCards—Enables wild-card support for some commands, such as copy.
> AllowAllPaths—Provides access to all files and folders on the system.
> AllRemovableMedia—Allows files to be copied to removable media, such as floppies.
> NoCopyPrompt—Causes the confirmation prompt during overwrites to be disabled.

Recovering the Boot Configuration by Using the Recovery Console
Problems with the boot configuration found in the Boot.ini file can be remedied by using the Recovery Console. The boot configuration can be recovered by using the BOOTCFG command, which contains several parameters to assist you in recovering from a boot configuration failure. The Table below lists and describes the BOOTCFG parameters.

Quote:
Warning: When using BOOTCFG /rebuild, always make a backup copy of your Boot.ini file. You can accomplish this from the Recovery Console by using the copy command.

Replacing the Registry by Using the Recovery Console
Problems with the Registry can be remedied by usin g the Recovery Console. Registry files can be replaced by using the copy command. Backup copies of the Registry files are kept in either the %systemroot%repair folder or the %systemroot%repairregback folder.

To replace the Registry using the Recovery Console, follow these steps:

1. Start the Recovery Console, and enter the local administrator password.

BOOTCFG parameters.

Quote:
Command Description
Bootcfg /add Adds a Windows OS to the boot list
Bootcfg /default Sets the default boot entry
Bootcfg /disableredirect Disables redirection of the boot loader
Bootcfg /list Lists all current entries for the boot list
Bootcfg /rebuild Searches through all Windows installations and prompts for which to add
Bootcfg /redirect [PortBaudRate] [useBiosSettlngs] Enables the redirection of the boot loader to the specified location
Bootcfg /scan
Scans all disks for all Windows installations and displays the results

2. You will start in the %systemroot% directory (for example, C:WINDOWS). Enter the following commands:

Code:
cd repairregback
copy filename C:WIND0WSSYSTEM32C0NFIG

Here, filename is the name of the Registry file to be copied.You should rename the current Registry files before replacing them. In case a problem occurs, this gives you the opportunity to return to the systems original condition.

Quote:
Warning: Files located in %systemroot%repairregback represent the Registry state the last time that the System State was backed up. Any changes made to the Registry files since then will be lost.
ThanX Mr.Intel_Gigacore for such wonderfull peace