CMD Chkdsk to Repair Bad Sectors (4 CMD Methods)

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 to Repair Bad Sectors Free

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.

Download Free for Windows 11-7

Guide: How to Repair a Damaged SD Card Using the "Check Partition" Feature in Partition Resizer

Partition Resizer Tool
  1. Step 1: Download the free Partition Resizer tool and install it on your Windows PC. Connect your SD card to your PC using a compatible card reader.
  2. Step 2: Launch the Partition Resizer software. Locate your SD card in the list of available drives. Right-click on the SD card and select "Check Partition" from the context menu to start the repair process.
  3. Step 3: The software will display a confirmation dialog with repair options. Review the settings and click 'OK' to commence the repair. The tool will automatically scan and fix any issues found on the SD card.

Repair Bad Sectors

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.

#2 Chkdsk /f

Here are the steps to use `chkdsk /f` to fix bad blocks on Windows computers:

Remove Bad Sector using the Chkdsk CommandRepair bad blocks with the command chkdsk h: /f. Replace h with the drive letter of the storage media you want to repair.

  • Insert the external storage (such as a USB disk or thumb drive) into your PC. For SD or microSD cards, use a memory card reader to connect it and ensure it's recognized by Windows.
  • Open This PC (Windows 10) or My Computer (Windows XP/7) and note the drive letter assigned to your storage device. For example, if your USB stick appears as drive H, remember this letter.
  • Run Command Prompt with administrative privileges (Ensure you have administrative rights. If using a non-admin account, switch to a computer where you have admin access). To do this, search for CMD in the Start menu, right-click, and select "Run as administrator."
  • Type H: and press Enter in the Command Prompt window (Replace H with the appropriate drive letter for your device, e.g., E: for a USB stick).
  • Type chkdsk /f and press Enter.

Note: The example image shows the combined command chkdsk h: /f from steps 4 and 5.

#3 Chkdsk /f /r

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)

Remove Bad Sector from USB drive using the Chkdsk Command

  • Insert the external drive into your PC if it's a removable device (USB drive, external HDD, SD card, etc.).
  • Open This PC to identify the drive letter of your device.
  • Open Command Prompt.
  • Type i: and press Enter (Replace i with your device's drive letter).
  • Type chkdsk /f /r and press Enter.

#4 Chkdsk /f /r /x

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:

  • Insert the external storage media into your PC.
  • Open This PC and note the drive letter assigned to your device, for example, drive H.
  • Open Command Prompt.
  • Type H: and press Enter (Replace H with the appropriate drive letter).
  • Type chkdsk /f /r /x and press Enter. Alternatively, you can combine steps 4 and 5 into a single command: chkdsk h: /f /r /x and press Enter. (The following image uses drive letter i as an example.)Remove Bad Sector from USB drive using the Chkdsk Command

Example command: chkdsk g: /f /r /x to repair your G drive.

Remove Bad Sector from USB drive using the Chkdsk Command

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.

Chkdsk Parameters

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.

#5 Diskpart CMD to Check Bad Blocks

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.

Some Related Errors

Here are some errors you might encounter while using CHKDSK to repair your storage media:

#1 CHKDSK is Not Available for RAW Drives

CHKDSK is Not Available for RAW Drives

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.

#2 CHKDSK Cannot Run Because the Volume is in Use

CHKDSK Cannot Run Because the Volume is in Use

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