If I know that a hard disk has bad sectors, how can I "mark" them so that Windows 7 doesn't write to them when I copy files and stuff?


According to Microsoft, running a regular (or full) format (as opposed to a "quick" format) on a partition will mark all bad sectors within the partition (emphasis mine):

When you choose to run a regular format on a volume, files are removed from the volume that you are formatting and the hard disk is scanned for bad sectors. The scan for bad sectors is responsible for the majority of the time that it takes to format a volume. source

In Vista and later, this is accomplished by writing zeros to the entire partition.

Running a full format on a disk is as simple as right-clicking on the disk, selecting Format, and unchecking the quick format box:

format checkbox

Note that a full format takes a lot more time than a quick format. The time scales with the size of the disk (i.e. big disks will take more time to format than small ones).

  • This is what I ended up doing on a hard drive with bad sectors - the linux equivilent would be mkfs -c. If its got bad sectors, it may be sign of other nasty things happening, so, be careful and don't keep anything critical and not backed up on it
    – Journeyman Geek
    Oct 6 '13 at 13:40
  • k i`m going to try this after i finish copying existing stuff on another hdd. I think it has bad sectors bc I didn't use the hdd for a long time, and I kept the hdd out of the original case
    – puffy
    Oct 6 '13 at 13:42

This is done automatically by the OS and NTFS. To check this now, just run CHKDSK. Any bad sectors are marked and are not used. CHKDSK /R will try to recover the bad sector.

One (of several!) ways to get there: open Windows Explorer; right click on the drive and select Properties from the context menu; select Tools tab; select Check Now. This runs on the next reboot because it can't make changes to files that are in use.

Note: You must be logged in on an administrator account to check your disk at this level. You may also get a UAC prompt.

If you want to run CHKDSK directly:

  1. Click on Windows Start button; type comma in the search box; select Command Prompt from the list to open a Command Prompt window (or right click on it; select Run as administrator from the context menu; etc.)
  2. Type CHKDSK /? to get a list of options (upper or lowercase doesn't matter).
  3. Type CHKDSK C: /F /R to check your C: drive for errors and automatically repair them.
  4. Restart so scan runs.

I assume you're referring to a standard rotating hdd with NTFS format (though FAT isn't really different for this answer). Solid state drives handle this problem internally.

A few bad sectors (typically size of 4k but even 64k if optimized for storing large files) on a 50 GB, 500 GB, or 2 TB disk is not worth worrying about (and if the drive is only a few GB, maybe it is time to replace it).

I suppose if you really want to fiddle, you could partition around the bad tracks that contain the bad sectors (so the read/write heads don't pass so directly over them) but if your time is worth a more than $1/day or you're that worried, consider buying a new disk. I think I've seen some software that semi-automates this but I have a hard time coming up with a scenario where I would want to do this. (I look forward to seeing good stories in the comments though!)

From Command Prompt

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

  volume          Specifies the drive letter (followed by a colon),
                  mount point, or volume name.
  filename        FAT/FAT32 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.
                  On NTFS: Displays cleanup messages if any.
  /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
  /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
  /B              NTFS only: Re-evaluates bad clusters on the volume
                  (implies /R)

The /I or /C switch reduces the amount of time required to run Chkdsk by
skipping certain checks of the volume. 
  • 1
    Note that the /R parameter implies (or includes, if you prefer) the /F parameter. Thus, while including /F with /R won't do any harm, it is redundant to do so. Feb 2 '19 at 19:49

If you didn't dropped drive and you have just 1-2 have bad sectors:

1) Scan with HDtune then find bad sectors lba (ex : 10000000)

2) Download HDDreg.iso , write to USB Flash drive (or CD) and boot from it > select your disk > select option 3 ( regenerate all sectors in range ) > write lba and start operation .

3) Then rescan with HDtune : If didn't fixed , format drive with windows, but don't thick "Quick format" checkbox (When it formats , it will hide sector).

4) If still didn't fixed,try this - install hard disk sentinel > select disk > open surface scan > select "reinitailize disk surface" and start test. It will remap bad sector to spare area . "Reallocated sectors" SMART attiribute will improve

Not the answer you're looking for? Browse other questions tagged or ask your own question.