Restoring bad sectors using CHKDSK on Windows

The other day my hard drive was getting really bad, Usually I just rebuild the machine with an image stored on my NAS appliance however I thought I would actually repair the drive as it was ‘trashing’ alot! So I booted the PC and got check disk to repair the drive. – All is now working smoothly again.

 I just thought that I would share this with others on the net, I have been using this for years but thought some of you may benefit from this if your doing it for the first time. 

At the command prompt type CHKDSK without parameters to check the current disk.

Windows 2000 and Windows XP chkdsk syntax

Checks a disk and displays a status report.

CHKDSK [volume[[path]filename]]] [/F] [/V] [/R] [/X] [/I] [/C] [/L[:size]]

volume Specifies the drive letter (followed by a colon), mount point, or volume name.
filename  FAT only: Specifies the files to check for fragmentation.
/F Fixes errors on the disk.
/V On FAT/FAT32: Displays the full path and name of every file on the disk.
/R Locates bad sectors and recovers readable information (implies /F).
/L:size NTFS only: Changes the log file size to the specified number of kilobytes. If size is not specified, displays current size.
/X Forces the volume to dismount first if necessary. All opened handles to the volume would then be invalid (implies /F).
/I NTFS only: Performs a less vigorous check of index entries.
/C NTFS only: Skips checking of cycles within the folder structure.

The /I or /C switch reduces the amount of time required to run Chkdsk by skipping certain checks of the volume.

Microsoft Windows 2000 and Windows XP users who have NTFS should also consider using the CHKNTFS command.

Windows 2000 and Windows XP recovery console chkdsk syntax

Note: The below options are only available in the recovery console.

Checks a disk and displays a status report.

chkdsk [drive:] [/p] | [/r]

[drive:] Specifies the drive to check.
/p Check even if the drive is not flagged dirty, bad.
/r Locates bad sectors and recovers readable information (implies /p).

Chkdsk may be used without any parameters, in which case the current drive is checked with no switches. You can specify the listed switches.

Chkdsk requires the Autochk.exe file. Chkdsk automatically locates Autochk.exe in the startup (boot) directory. If it cannot be found in the startup directory, chkdsk attempts to locate the Windows 2000 Setup CD. If the installation CD cannot be found, chkdsk prompts for the location of Autochk.exe. 


chkdsk = Will display all information described above and also report any crossed linked files.
chkdsk /f = Will fix any crossed linked files; however, do not run this command while you are in Windows95 or Windows 3.x