This page will introduce several ways to use chkdsk cmd to repair bad blocks on your hard drive, external hard drive, usb stick, sd card etc. on Windows computers.
Here are the steps to use chkdsk /f to remove bad blocks on Windows computers.
Repair bad blocks with cmd chkdsk h: /f that you need to replace h with your own drive letter that you want to repair its bad blocks
Note: The example image shows the command chkdsk h: /f that combined the step 4 and step 5 into one command.
This is an advanced chkdsk command line based on chkdsk /f. You may use this one as well for a hard disk or usb stick or sd card bad blocks repairing with the following steps (almost the same as the previous steps).
chkdsk/f/r i: (when your drive shows drive letter i)
This is another advanced command line that can be used for repairing bad blocks on your storage media no matter it's an internal disk partition or some external storage devices. Here are the steps to do the repairing.
Another example: chkdsk g: /f /r /x when you want to repair your G drive on your computer.
The /f parameter tells CHKDSK to fix any errors it finds.
The /r parameter tells it to find bad sectors on the drive and restores readable information.
The /x parameter forces the drive to be unmounted before the process starts.
The detailed parameter description is as follows:
CHKDSK [volume[[path]filename]]] [/F] [/V] [/R] [/X] [/I] [/C] [/L[:size]]
volume specifies the drive (followed by a colon), mount point, or volume name.
filename FAT/FAT32 only: Specifies the file to check for fragmentation.
/F Fix errors on disk.
/V on FAT/FAT32: Displays the full path and name of each file on the disk.
On NTFS: If there is a purge message, display it.
/R Finds incorrect sectors and restores readable information (implies /F).
/L:size NTFS only: Change the log file size to the specified number of KB.
If no size is specified, the current size is displayed.
/X Forces the volume to unmount first if necessary.
All open handles to the volume are invalidated (implies /F).
/I NTFS only: Perform a less intensive check on index entries.
/C NTFS only: Skip circular checking of folder structure.
The /I and /C command line switches skip certain checks for volumes, reducing the time required to run Chkdsk.
Diskpart can also help fix logical errors on your storage media with its command line without quick format since quick format will start a formatting without checking bad blocks.
format fs=fat32
Format fs=fat32 is the diskpart command that you may use it to get your drive formatted to file system fat32.
format fs=ntfs
Format fs=ntfs is to format a drive with file system ntfs.
Also read: diskpart to format drive
Here are some possible errors that you may see when you use chkdsk for repairing your storage media.
When your storage media shows error in the command such as: 'The type of the file system is raw. Chkdsk is not available for raw drives.' it could report such message when your device has logical errors especially when its file system is damaged.
Read solution here: why chkdsk is not available for raw drives
It often happens to c drive when you want to repair the bad blocks on the system c volume which is currently running the OS.
As it instructed in the message that you may type Y in the cmd to give permission to the cmd and get the c drive checked next time when you run your computer.
Also read: how to remove bad sector in 5 ways
Question: how to check bad sector hdd cmd
If you want to check and repair bad sector on hdd using cmd, you may try chkdsk /f and get your hdd as target for the repairing since chkdsk is provided by Windows computer for checking and repairing bad sectors.
Question: Can chkdsk repair bad sectors?
Yes, chkdsk can detect and repair hard disk bad sectors with the following method:
Click "Start", "Run", enter CMD and press enter;
Open a command prompt window, Enter the following command in this window: for example, check and repair D partition: CHKDSK d: /f. Press enter to start CHKDSK disk inspection tool to scan D partition and get bad sectors repaired.
Related Articles