This page introduces several methods for using the `chkdsk` command to repair bad sectors on your hard drive, external hard drive, USB stick, SD card, and more, on Windows computers.
Below is a table that shows the differences between logical bad sector damage and physical bad sector damage.
Logical Bad Sector | Physical Bad Sector | Errors & Symptoms | |
---|---|---|---|
Data Recovery | Yes (Software) | Yes (Service Only) | The HDD/USB/SD may show 0 bytes, exhibit bad sectors, fail to format, experience read/write errors, be unrecognized, or prompt for formatting. |
Bad Sector Repair with Tools/CHKDSK | Yes | No | |
Risk of Data Loss | Yes | Yes |
Note: Repairing bad sectors may result in potential data damage. We highly recommend recovering data from damaged storage media using a free tool like iCare Recovery Free before attempting any repairs. Logical damage can often be fixed simply by reformatting, while physical damage cannot be repaired by any methods.
IM-Magic Partition Resizer is a versatile free tool that not only helps with resizing partitions but also includes a valuable "Check Partition" feature for repairing bad sectors. This feature can be particularly useful for dealing with damaged or corrupted SD cards. By using this tool, you can diagnose and fix issues that might be causing your SD card to become unreadable or inaccessible. Follow the steps below to utilize this feature and restore your SD card's functionality.
Guide: How to Repair a Damaged SD Card Using the "Check Partition" Feature in Partition Resizer
Using the "Check Partition" feature in Partition Resizer helps identify and resolve issues such as bad sectors and corrupted partitions on your SD card. This process can help restore functionality and prevent further data loss. Ensure that you backup any important data before performing repairs.
Here are the steps to use `chkdsk /f` to fix bad blocks on Windows computers:
Repair bad blocks with the command chkdsk h: /f. Replace h with the drive letter of the storage media you want to repair.
Note: The example image shows the combined command chkdsk h: /f from steps 4 and 5.
This advanced `chkdsk` command includes both the `/f` and `/r` parameters for a more thorough repair. Follow these steps for repairing bad blocks on a hard disk, USB stick, or SD card:
chkdsk /f /r i: (Replace i: with the drive letter of your storage device)
This command includes the `/x` parameter, which forces the drive to be unmounted before the repair starts. Follow these steps to use this command for repairing bad blocks:
Example command: chkdsk g: /f /r /x to repair your G drive.
The /f parameter tells CHKDSK to fix any errors found.
The /r parameter locates bad sectors and recovers readable information.
The /x parameter forces the drive to be unmounted before starting the process.
Here is a detailed description of the parameters you can use with CHKDSK:
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: Fixes errors on the disk.
/V (on FAT/FAT32): Displays the full path and name of each file on the disk. On NTFS, displays any purge messages.
/R: Finds bad sectors and recovers readable information (implies /F).
/L:size (NTFS only): Changes the log file size to the specified number of KB. Displays the current size if no size is specified.
/X: Forces the volume to unmount if necessary. All open handles to the volume are invalidated (implies /F).
/I (NTFS only): Performs a less intensive check of index entries.
/C (NTFS only): Skips circular folder structure checking.
The /I and /C parameters reduce the time required to run CHKDSK by skipping certain checks.
Diskpart can help fix logical errors on your storage media. Unlike quick format, which skips checking for bad blocks, Diskpart can perform a more thorough format.
format fs=fat32
Use format fs=fat32 to format your drive with the FAT32 file system.
format fs=ntfs
Use format fs=ntfs to format your drive with the NTFS file system.
Also read: How to use Diskpart to format a drive
Here are some errors you might encounter while using CHKDSK to repair your storage media:
If you see the error message 'The type of the file system is RAW. CHKDSK is not available for RAW drives,' it typically means that your device has a damaged file system or logical errors.
Read the solution here: Why CHKDSK is Not Available for RAW Drives
This error often occurs with the C drive when attempting to repair bad blocks on the system volume currently running the OS.
The message will instruct you to type Y in the command prompt to schedule the check for the next system restart.
Related Articles