Chkdsk commands are used for various troubleshooting purposes like checking a hard drive for errors, repair drive or recover data from the drive and many other vital functions. Chkdsk is also used to mark any malfunctioning sectors on the hard drive as “bad” and also recovers any undamaged information. CHKDSK utility can be run from the Command Prompt, the Windows Shell or the Windows Recovery Console.
Note: In some occasions, Recovery Console may be your best bet if your computer refuses to boot in the windows. In that case, follow the instructions on this article XP Recovery Console, and also refer to the list of complete Windows XP Recovery Console Commands.
Chkdsk commands can also be accessed from Command Prompt.
Chkdsk Commands Syntax:
chkdsk [drive:] [/p] [/r]
drive: – The drive letter of the partition in your hard drive where you want to run the chkdsk.
/p - This parameter is used to perform vigorous check on the hard disk and after check, it tries fixing the issues
/r - This option initiates chkdsk to discover bad sectors and also recover any intact information.
Note: When using /r, running another /p option is not required as it does both in one test.
Chkdsk Commands Samples:
In the above command, the chkdsk will simple output the status of the disk drive as there are no other option used with it.
chkdsk c: /r
In this particular example, the chkdsk command is being used to execute a vigorous check of the hard drive. It checks and fixes any error it founds.
Chkdsk Commands Availability:
The chkdsk commands are available from inside the Recovery Console in Windows XP and Windows 2000.
How to run chkdsk
- Click Start > Run, or hold “window key” and press R.
- A “Run” window will pop up, enter “cmd” in the text box and click OK.
- You might get a message asking to confirm this action, just acknowledge the message.
- Now a command prompt window will appear. By default, it start in C: drive. If you want to run chkdsk in D drive, then type in D:
- Now type in the following commands and press Enter
Note: The complete list of switches and their description is list below. If you didn’t specify any switch, then chkdsk will run but no errors will be fixed.
- If the disk specified above is currently being used by Windows, then you be asked to if you want to run it automatically upon next restart. Enter N for no, and Y for yes.
- Once the process is complete, type exit to close the command prompt. If you scheduled the chkdsk on nest startup, then restart your computer and it will run automatically.
List of chkdsk switches:
/F – Fixes errors on the hard disk.
/V – On FAT/FAT32: Outputs the full name and path of each file on your hard disk. On NTFS file system, Outputs cleanup messages.
/R – Detect bad sectors and recover undamaged information
/L – size: Works only on NFTS. Changes the log file size to user-specified number of KB (Kilobytes). If size is not specified by user, it shows current size of the disk.
/X – If volume is currently in use, it will dismount it before running tests.
/I – On NTFS only: Executes a less intense check of index entries.
/C – On NTFS only: Omits cycle check inside the folder structure.
/B – On NTFS only: Evaluates the bad clusters again on the volume.
/I or /C – Both have identical purpose: decreases time required to run the Chkdsk utility by omitting some checks of the volume.