Jump to content

Bad sector: Difference between revisions

From Wikipedia, the free encyclopedia
Content deleted Content added
Brxvee (talk | contribs)
mNo edit summary
Tags: Visual edit Mobile edit Mobile web edit
Hnobley (talk | contribs)
Add manipulation methods section
Line 20: Line 20:
|archivedate=2007-07-30
|archivedate=2007-07-30
}}</ref>
}}</ref>

===Manipulation methods===
The [[Windows]] program [[ATATool]] can be used to create deliberate bad sectors by manipulating the sector [[Error correction code]] (ECC) data. This can be used to verify bad sector support in disk utilities and forensic tools. For instance, to make sector 10 bad:
ATATOOL /BADECC:10 \\.\PhysicalDrive1


==See also==
==See also==

Revision as of 09:22, 21 September 2022

A bad sector in computing is a disk sector on a disk storage unit that is permanently damaged. Upon taking damage, all information stored on that sector is lost. When a bad sector is found and marked, the operating system like Windows or Linux will skip it in the future.

Details

A bad sector is the result of mechanical damage, most commonly caused by a head crash, manufacturing flaw(s), wear-and-tear, physical shock, sudden power outages, or dust intrusion.[1] Bad sectors are a threat to information security in the sense of data remanence. Very often physical damages can interfere with parts of many different files.

Operating system

Bad sectors may be detected by the operating system or the disk controller. Most file systems contain provisions for sectors to be marked as bad, so that the operating system avoids them in the future. Disk diagnostic utilities, such as CHKDSK (Microsoft Windows), Disk Utility (on macOS), or badblocks (on Linux) can actively look for bad sectors upon user request.

Disk controller

When a sector is found to be bad or unstable by the firmware of a disk controller, the disk controller remaps the logical sector to a different physical sector. Typically, automatic remapping of sectors only happens when a sector is written to. In the normal operation of a hard drive, the detection and remapping of bad sectors should take place in a manner transparent to the rest of the system and in advance before data is lost. There are two types of remapping by disk hardware: P-LIST (mapping during factory production tests) and G-LIST (mapping during consumer usage by disk microcode).[2] Utilities can read the Self-Monitoring, Analysis, and Reporting Technology (SMART) information to tell how many sectors have been reallocated, and how many spare sectors the drive may still have.[3] Because reads and writes from G-list sectors are automatically redirected (remapped) to spare sectors, it slows down drive access even if data in drive is defragmented. Once the G-list is filled up, the storage unit must be replaced.[4][5]

Manipulation methods

The Windows program ATATool can be used to create deliberate bad sectors by manipulating the sector Error correction code (ECC) data. This can be used to verify bad sector support in disk utilities and forensic tools. For instance, to make sector 10 bad:

ATATOOL /BADECC:10 \\.\PhysicalDrive1

See also

  • Spiradisc - a copy protection scheme writing sectors on spiraling paths on the disk rather than in concentric circles.
  • Sector slipping – a method of avoiding bad sectors
  • ARccOS Protection – bad sector protection on DVDs, used by Sony.
  • Head crash - a more serious form of damage to the hard disk platter

References

  1. ^ Chris Hoffman (2017-07-05). "Bad Sectors Explained: Why Hard Drives Get Bad Sectors and What You Can Do About It". How-To Geek.
  2. ^ "Bad Sector Remapping". mjm.co.uk.
  3. ^ Monitoring Hard Disks with SMART.Linux Journal, 2004.
  4. ^ "Encyclopedia". PCMag.com. Ziff Davis.
  5. ^ Stephens, Curtis E, ed. (December 11, 2006), Information technology - AT Attachment 8 - ATA/ATAPI Command Set (ATA8-ACS), working draft revision 3f (PDF), ANSI INCITS, pp. 198–213, 327–344, archived from the original (PDF) on 2007-07-30