|Home │ RC Part I │ RC Part III │ Repair Windows XP │|
|Recovery Console Commands at a glance:
Recovery Console in Windows XP (Part II)
Topics on this page:
(in part III: format and map commands )
In part I of this article you were shown how to go to the Recovery Console. In this part some of the available commands are shown, especially those useful for repairing system files, disc and the boot sector. I won't cover the simple commands dating from MS-DOS such as attrib, copy, cd, cls, del, dir, exit, md and ren.
The Microsoft KB article 314058 lists the commands with some explanation and I've quoted from it in some places where it differs from or helps to clarify the onscreen help information. If the KB is unavailable for any reason you'll find much the same here. In it you will find details of those command I've not covered here.
They include bootcfg, fixboot and fixmbr and would be very useful if the boot sector, boot.ini or the master boot record is damaged or overwritten by another operating system. If your system cannot boot, check hardware (especially hard disc errors, RAM and mainboard) and also scan for virus in DOS or with a anti-virus CD.
If you have installed Linux on another partition and LILO or GRUB is corrupt you may see LI... during booting and nothing happens even if you press any key on the keyboard. In that case you need to boot with a Linux boot disc and repair LILO or GRUB. If you use the following commands for Windows you would not be able to boot into Linux afterwards.
You should also make a bootable floppy (KB 314079) when your Windows XP is stable and bootable. This floppy can boot all the way to the desktop and is not an MS-DOS startup floppy disc that you can make in Windows Explorer (the MS-DOS disc is taken from Windows ME boot floppy).
This can detect your computer's boot configuration, modify the boot.ini (the boot list file which forms the basis of the multi-boot menu) and redirect the boot loader to another location (fig. 1).
Fig. 1. Bootcfg options.
Fixboot repairs the boot sector (fig. 2). There are no switches. Normally it would be: fixboot c: unless the first system partition is not c or you wish to write the boot sector elsewhere (not recommended in normal circumstances). You should enable boot sector write protection in the BIOS if your mainboard has this feature.
Quote from KB:
Fig. 2. Fixboot syntax.
Fixmbr repairs the master boot record (MBR). Microsoft does not recommend its use to repair boot sector viruses. Quote from KB article:
Fig. 3. Fixmbr syntax.
This is similar to the chkdsk command in the command prompt and requires autochk.exe. It would be useful if you suspect hard disc error and cannot run chkdsk otherwise. There is no /F switch (as in chkdsk in cmd) but you can use the /R switch to recover data from bad sectors (fig. 4). (There is no scandisk in Windows XP.)
Fig. 4. Chkdsk options.
This replaces the well known fdisk in previous versions of Windows. Type diskpart and press ENTER. A list showing used and unused space follows (fig. 5, your list may be different). You can follow the instructions to create a partition (if there is unpartitioned space on the hard disc) or delete existing partitions. The command options are (quote from KB article):
Note that Windows XP limits FAT32 partition to 32GB by design; if you wish to partition a drive greater than this, either use NTFS, or use fdisk from a Windows ME boot floppy to do it. Your mainboard BIOS also needs to support large drives. For drives greater than 137GB you need Windows XP SP1/1a for 48bit logical block addressing (LBA) support.
Fig. 5. Diskpart list.
Go to TOP
Go to Part 3.
KB 314058 Description of the Windows XP Recovery Console
Copyright © 2003-2004 by Kilian. All my articles including graphics are provided "as is" without warranties of any kind. I hereby disclaim all warranties with regard to the information provided. In no event shall I be liable for any damage of any kind whatsoever resulting from the information. The articles are provided in good faith and after some degree of verification but they may contain technical or typographical errors. Links to other web resources may be changed at any time and are beyond the control of the author. Articles may be added, removed, edited or improved at any time. No support is provided by the author.
This is not an official support page for any products mentioned. All the products mentioned are trademarks of their companies.
Created 27 Feb 2004; last updated 2 Jul 2004