Disk Formatting
   HOME

TheInfoList



OR:

Disk formatting is the process of preparing a
data storage device Data storage is the recording (storing) of information (data) in a storage medium. Handwriting, phonographic recording, magnetic tape, and optical discs are all examples of storage media. Biological molecules such as RNA and DNA are conside ...
such as a
hard disk drive A hard disk drive (HDD), hard disk, hard drive, or fixed disk is an electro-mechanical data storage device that stores and retrieves digital data using magnetic storage with one or more rigid rapidly rotating platters coated with magnet ...
,
solid-state drive A solid-state drive (SSD) is a solid-state storage device that uses integrated circuit assemblies to store data persistently, typically using flash memory, and functioning as secondary storage in the hierarchy of computer storage. It is ...
,
floppy disk A floppy disk or floppy diskette (casually referred to as a floppy, or a diskette) is an obsolescent type of disk storage composed of a thin and flexible disk of a magnetic storage medium in a square or nearly square plastic enclosure lined w ...
,
memory card A memory card is an electronic data storage device used for storing digital information, typically using flash memory. These are commonly used in digital portable electronic devices. They allow adding memory to such devices using a card in a so ...
or
USB flash drive A USB flash drive (also called a thumb drive) is a data storage device that includes flash memory with an integrated USB interface. It is typically removable, rewritable and much smaller than an optical disc. Most weigh less than . Since firs ...
for initial use. In some cases, the formatting operation may also create one or more new
file system In computing, file system or filesystem (often abbreviated to fs) is a method and data structure that the operating system uses to control how data is stored and retrieved. Without a file system, data placed in a storage medium would be one larg ...
s. The first part of the formatting process that performs basic medium preparation is often referred to as "low-level formatting". Partitioning is the common term for the second part of the process, dividing the device into several sub-devices and, in some cases, writing information to the device allowing an
operating system An operating system (OS) is system software that manages computer hardware, software resources, and provides common services for computer programs. Time-sharing operating systems schedule tasks for efficient use of the system and may also in ...
to be booted from it. The third part of the process, usually termed "high-level formatting" most often refers to the process of generating a new file system. In some operating systems all or parts of these three processes can be combined or repeated at different levels and the term "format" is understood to mean an operation in which a new disk medium is fully prepared to store files. Some formatting utilities allow distinguishing between a quick format, which does not erase all existing data and a long option that does erase all existing data. As a general rule, formatting a disk by default leaves most if not all existing data on the disk medium; some or most of which might be recoverable with privilegedE.g., AMASPZAP in MVS or special tools. Special tools can remove user data by a single overwrite of all files and free space.


History

A
block Block or blocked may refer to: Arts, entertainment and media Broadcasting * Block programming, the result of a programming strategy in broadcasting * W242BX, a radio station licensed to Greenville, South Carolina, United States known as ''96.3 ...
, a contiguous number of
byte The byte is a unit of digital information that most commonly consists of eight bits. Historically, the byte was the number of bits used to encode a single character of text in a computer and for this reason it is the smallest addressable unit ...
s, is the minimum unit of storage that is read from and written to a disk by a disk driver. The earliest disk drives had fixed block sizes (e.g. the
IBM 350 IBM manufactured magnetic disk storage devices from 1956 to 2003, when it sold its hard disk drive business to Hitachi. Both the hard disk drive (HDD) and floppy disk drive (FDD) were invented by IBM and as such IBM's employees were responsible ...
disk storage unit (of the late 1950s) block size was 100 six-bit characters) but starting with the
1301 Year 1301 ( MCCCI) was a common year starting on Sunday (link will display the full calendar) of the Julian calendar. Events By place Europe * January 14 – With the death of King Andrew III (the Venetian) (probably poisoned), ...
IBM marketed subsystems that featured variable block sizes: a particular track could have blocks of different sizes. The disk subsystems and other
Direct access storage device A direct-access storage device (DASD) (pronounced ) is a secondary storage device in which "each physical record has a discrete location and a unique address". The term was coined by IBM to describe devices that allowed random access to data, t ...
s on the
IBM System/360 The IBM System/360 (S/360) is a family of mainframe computer systems that was announced by IBM on April 7, 1964, and delivered between 1965 and 1978. It was the first family of computers designed to cover both commercial and scientific applica ...
expanded this concept in the form of
Count Key Data Count key data (CKD) is a direct-access storage device (DASD) data recording format introduced in 1964, by IBM with its IBM System/360 and still being emulated on IBM mainframes. It is a self-defining format with each data record represented by a ...
(CKD) and later Extended Count Key Data (ECKD); however the use of variable block size in HDDs fell out of use in the 1990s; one of the last HDDs to support variable block size was the IBM 3390 Model 9, announced May 1993. Modern hard disk drives, such as Serial attached SCSI (SAS)"The LBAs on a logical unit shall begin with zero and shall be contiguous up to the last logical block on the logical unit"., Information technology â€” Serial Attached SCSI - 2 (SAS-2), INCITS 457 Draft 2, May 8, 2009, chapter 4.1 Direct-access block device type model overview. and
Serial ATA SATA (Serial AT Attachment) is a computer bus interface that connects host bus adapters to mass storage devices such as hard disk drives, optical drives, and solid-state drives. Serial ATA succeeded the earlier Parallel ATA (PATA) standard t ...
(SATA) drives, appear at their
interface Interface or interfacing may refer to: Academic journals * ''Interface'' (journal), by the Electrochemical Society * '' Interface, Journal of Applied Linguistics'', now merged with ''ITL International Journal of Applied Linguistics'' * '' Int ...
s as a contiguous set of fixed-size blocks; for many years 512 bytes long but beginning in 2009 and accelerating through 2011, all major hard disk drive manufacturers began releasing hard disk drive platforms using the
Advanced Format Advanced Format (AF) is any disk sector format used to store data on magnetic disks in hard disk drives (HDDs) that exceeds 512, 520, or 528 bytes per sector, such as the 4096, 4112, 4160, and 4224-byte (4  KB) sectors of an Advanced Format ...
of 4096 byte logical blocks.
Floppy disk A floppy disk or floppy diskette (casually referred to as a floppy, or a diskette) is an obsolescent type of disk storage composed of a thin and flexible disk of a magnetic storage medium in a square or nearly square plastic enclosure lined w ...
s generally only used fixed block sizes but these sizes were a function of the host's OS and its interaction with its
controller Controller may refer to: Occupations * Controller or financial controller, or in government accounting comptroller, a senior accounting position * Controller, someone who performs agent handling in espionage * Air traffic controller, a person ...
so that a particular type of media (e.g., 5¼-inch DSDD) would have different block sizes depending upon the host OS and controller.
Optical disc In computing and optical disc recording technologies, an optical disc (OD) is a flat, usually circular disc that encodes binary data (bits) in the form of pits and lands on a special material, often aluminum, on one of its flat surfaces. ...
s generally only use fixed block sizes.


Disk formatting process

Formatting a disk for use by an operating system and its applications typically involves three different processes.Each process may involve multiple steps, and steps of different processes may be interleaved. # Low-level formatting (i.e., closest to the hardware) marks the surfaces of the disks with markers indicating the start of a recording block (typically today called sector markers) and other information like block CRC to be used later, in normal operations, by the
disk controller {{unreferenced, date=May 2010 The disk controller is the controller circuit which enables the CPU to communicate with a hard disk, floppy disk or other kind of disk drive. It also provides an interface between the disk drive and the bus conne ...
to read or write data. This is intended to be the permanent foundation of the disk, and is often completed at the factory. # Partitioning divides a disk into one or more regions, writing data structures to the disk to indicate the beginning and end of the regions. This level of formatting often includes checking for defective tracks or defective sectors. # High-level formatting creates the
file system In computing, file system or filesystem (often abbreviated to fs) is a method and data structure that the operating system uses to control how data is stored and retrieved. Without a file system, data placed in a storage medium would be one larg ...
format within a disk partition or a
logical volume In computer storage, logical volume management or LVM provides a method of allocating space on mass-storage devices that is more flexible than conventional partitioning schemes to store volumes. In particular, a volume manager can concatenate ...
. This formatting includes the data structures used by the OS to identify the logical drive or partition's contents. This may occur during operating system installation, or when adding a new disk. Disk and distributed file system may specify an optional boot block, and/or various volume and directory information for the operating system.


Low-level formatting of floppy disks

The low-level format of floppy disks (and early hard disks) is performed by the disk drive's controller. For a standard 1.44 MB floppy disk, low-level formatting normally writes 18
sector Sector may refer to: Places * Sector, West Virginia, U.S. Geometry * Circular sector, the portion of a disc enclosed by two radii and a circular arc * Hyperbolic sector, a region enclosed by two radii and a hyperbolic arc * Spherical sector, a p ...
s of 512
byte The byte is a unit of digital information that most commonly consists of eight bits. Historically, the byte was the number of bits used to encode a single character of text in a computer and for this reason it is the smallest addressable unit ...
s to each of 160 tracks (80 on each side) of the floppy disk, providing 1,474,560 bytes of storage on the disk. Physical sectors are actually larger than 512 bytes, as in addition to the 512 byte data field they include a sector identifier field, CRC bytes (in some cases error correction bytes) and gaps between the fields. These additional bytes are not normally included in the quoted figure for overall storage capacity of the disk. Different low-level formats can be used on the same
media Media may refer to: Communication * Media (communication), tools used to deliver information or data ** Advertising media, various media, content, buying and placement for advertising ** Broadcast media, communications delivered over mass el ...
; for example, large records can be used to cut down on inter-record gap size. Several
freeware Freeware is software, most often proprietary, that is distributed at no monetary cost to the end user. There is no agreed-upon set of rights, license, or EULA that defines ''freeware'' unambiguously; every publisher defines its own rules for the f ...
,
shareware Shareware is a type of proprietary software that is initially shared by the owner for trial use at little or no cost. Often the software has limited functionality or incomplete documentation until the user sends payment to the software developer ...
and
free software Free software or libre software is computer software distributed under terms that allow users to run the software for any purpose as well as to study, change, and distribute it and any adapted versions. Free software is a matter of liberty, no ...
programs (e.g. GParted,
FDFORMAT Fdformat is the name of two unrelated programs: * A command-line tool for Linux that " low-level formats" a floppy disk. * A DOS tool written in Pascal by Christoph H. Hochstätter that allows users to format floppy disks to a higher than usu ...
, NFORMAT,
VGA-Copy VGA-Copy is an MS-DOS program to copy floppy disks. It is able to read defective floppy disks. Development VGA-Copy was created by the German software developer Thomas Mönkemeier. The main code was developed in Turbo Pascal; some low-level ...
and 2M) allowed considerably more control over formatting, allowing the formatting of high-density 3.5" disks with a capacity up to 2 MB. Techniques used include: * head/track sector skew (moving the sector numbering forward at side change and track stepping to reduce mechanical delay), * interleaving sectors (to boost throughput by organizing the sectors on the track), * increasing the number of sectors per track (while a normal 1.44 MB format uses 18 sectors per track, it is possible to increase this to a maximum of 21), and * increasing the number of tracks (most drives could tolerate extension to 82 tracks: though some could handle more, others could jam).
Linux Linux ( or ) is a family of open-source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991, by Linus Torvalds. Linux is typically packaged as a Linux distribution, which ...
supports a variety of sector sizes, and
DOS DOS is shorthand for the MS-DOS and IBM PC DOS family of operating systems. DOS may also refer to: Computing * Data over signalling (DoS), multiplexing data onto a signalling channel * Denial-of-service attack (DoS), an attack on a communicat ...
and
Windows Windows is a group of several proprietary graphical operating system families developed and marketed by Microsoft. Each family caters to a certain sector of the computing industry. For example, Windows NT for consumers, Windows Server for serv ...
support a large-record-size DMF-formatted floppy format.


Low-level formatting (LLF) of hard disks

Hard disk drives prior to the 1990s typically had a separate
disk controller {{unreferenced, date=May 2010 The disk controller is the controller circuit which enables the CPU to communicate with a hard disk, floppy disk or other kind of disk drive. It also provides an interface between the disk drive and the bus conne ...
that defined how data was encoded on the media. With the media, the drive and/or the controller possibly procured from separate vendors, users were often able to perform low-level formatting. Separate procurement also had the potential of incompatibility between the separate components such that the subsystem would not reliably store data.This problem became common in PCs where users used RLL controllers with MFM drives
"MFM drives should not be used on RLL controllers.".
/ref> User instigated low-level formatting (LLF) of hard disk drives was common for
minicomputer A minicomputer, or colloquially mini, is a class of smaller general purpose computers that developed in the mid-1960s and sold at a much lower price than mainframe and mid-size computers from IBM and its direct competitors. In a 1970 survey, ...
and
personal computer A personal computer (PC) is a multi-purpose microcomputer whose size, capabilities, and price make it feasible for individual use. Personal computers are intended to be operated directly by an end user, rather than by a computer expert or tec ...
systems until the 1990s. IBM and other mainframe system vendors typically supplied their hard disk drives (or media in the case of removable media HDDs) with a low-level format. Typically this involved subdividing each track on the disk into one or more blocks which would contain the user data and associated control information. Different computers used different block sizes and IBM notably used variable block sizes but the popularity of the IBM PC caused the industry to adopt a standard of 512 user data bytes per block by the middle 1980s. Depending upon the system, low-level formatting was generally done by an operating system utility. IBM compatible PCs used the BIOS, which is invoked using the MS-DOS debug program, to transfer control to a routine hidden at different addresses in different BIOSes.


Transition away from LLF

Starting in the late 1980s, driven by the volume of IBM compatible PCs, HDDs became routinely available pre-formatted with a compatible low-level format. At the same time, the industry moved from ''historical (dumb) bit serial interfaces'' to modern (intelligent) ''bit serial interfaces'' and ''word serial interfaces'' wherein the low-level format was performed at the factory. Accordingly, it is not possible for an end user to low-level format a modern hard disk drive.


Disk reinitialization

While it is generally impossible to perform a complete LLF on most ''modern'' hard drives (since the mid-1990s) outside the factory, the term "low-level format" is still used for what could be called the ''reinitialization'' of a hard drive to its ''factory configuration'' (and even these terms may be misunderstood). The present ambiguity in the term ''low-level format'' seems to be due to both inconsistent documentation on web sites and the belief by many users that any process below a high-level (file system) format must be called a ''low-level'' format. Since much of the low-level formatting process can today only be performed at the factory, various drive manufacturers describe reinitialization software as LLF utilities on their web sites. Since users generally have no way to determine the difference between a complete LLF and ''reinitialization'' (they simply observe running the software results in a hard disk that must be high-level formatted), both the misinformed user and ''mixed signals'' from various drive manufacturers have perpetuated this error. Note: whatever possible misuse of such terms may exist, many sites do make such ''reinitialization'' utilities available (possibly as bootable floppy diskette or CD image files), to both overwrite every byte ''and'' check for damaged sectors on the hard disk. Reinitialization should include identifying (and sparing out if possible) any sectors which cannot be written to and read back from the drive, correctly. The term has, however, been used by some to refer to only a portion of that process, in which every sector of the drive is written to; usually by writing a specific value to every addressable location on the disk. Traditionally, the physical sectors were initialized with a fill value of 0xF6 as per the INT 1Eh's
Disk Parameter Table Disk or disc may refer to: * Disk (mathematics), a geometric shape * Disk storage Music * Disc (band), an American experimental music band * ''Disk'' (album), a 1995 EP by Moby Other uses * Disk (functional analysis), a subset of a vector sp ...
(DPT) during format on IBM compatible machines. This value is also used on the
Atari Portfolio The Atari Portfolio (Atari PC Folio) is an IBM PC-compatible palmtop PC, released by Atari Corporation in June 1989. This makes it the world's first palmtop computer.
.
CP/M CP/M, originally standing for Control Program/Monitor and later Control Program for Microcomputers, is a mass-market operating system created in 1974 for Intel 8080/ 85-based microcomputers by Gary Kildall of Digital Research, Inc. Initial ...
8-inch floppies typically came pre-formatted with a value of 0xE5, and by way of
Digital Research Digital Research, Inc. (DR or DRI) was a company created by Gary Kildall to market and develop his CP/M operating system and related 8-bit, 16-bit and 32-bit systems like MP/M, Concurrent DOS, FlexOS, Multiuser DOS, DOS Plus, DR DOS and ...
this value was also used on
Atari ST The Atari ST is a line of personal computers from Atari Corporation and the successor to the Atari 8-bit family. The initial model, the Atari 520ST, had limited release in April–June 1985 and was widely available in July. It was the first pers ...
and some
Amstrad Amstrad was a British electronics company, founded in 1968 by Alan Sugar at the age of 21. The name is a contraction of Alan Michael Sugar Trading. It was first listed on the London Stock Exchange in April 1980. During the late 1980s, Amstrad ...
formatted floppies. Amstrad otherwise used 0xF4 as a fill value. Some modern formatters wipe hard disks with a value of 0x00 instead, sometimes also called ''zero-filling'', whereas a value of 0xFF is used on flash disks to reduce
wear Wear is the damaging, gradual removal or deformation of material at solid surfaces. Causes of wear can be mechanical (e.g., erosion) or chemical (e.g., corrosion). The study of wear and related processes is referred to as tribology. Wear in m ...
. The latter value is typically also the default value used on ROM disks (which cannot be reformatted). Some advanced formatting tools allow configuring the fill value. One popular method for performing only the zero-fill operation on a hard disk is by writing zero-value bytes to the drive using the Unix dd utility with the
/dev/zero is a special file in Unix-like operating systems that provides as many null characters (ASCII NUL, 0x00) as are read from it. One of the typical uses is to provide a character stream for initializing data storage. Function Read operations from ...
stream as the input file and the drive itself (or a specific partition) as the output file. This command may take many hours to complete, and can erase all files and file systems. Another method for
SCSI Small Computer System Interface (SCSI, ) is a set of standards for physically connecting and transferring data between computers and peripheral devices. The SCSI standards define commands, protocols, electrical, optical and logical interface ...
disks may be to use the sg_format command to issue a low-level SCSI Format Unit Command. Zero-filling a drive is not necessarily a secure method of erasing sensitive data, or of preparing a drive for use with an encrypted filesystem. Zero-filling voids the plausible deniability of the process.


Partitioning

Partitioning is the process of writing information into blocks of a storage device or medium to divide the device into several sub-devices, each of which is treated by the operating system as a separate device and, in some cases, to allow an operating system to be booted from the device. On
MS-DOS MS-DOS ( ; acronym for Microsoft Disk Operating System, also known as Microsoft DOS) is an operating system for x86-based personal computers mostly developed by Microsoft. Collectively, MS-DOS, its rebranding as IBM PC DOS, and a few ope ...
,
Microsoft Windows Windows is a group of several proprietary graphical operating system families developed and marketed by Microsoft. Each family caters to a certain sector of the computing industry. For example, Windows NT for consumers, Windows Server for serv ...
, and UNIX-based operating systems (such as
BSD The Berkeley Software Distribution or Berkeley Standard Distribution (BSD) is a discontinued operating system based on Research Unix, developed and distributed by the Computer Systems Research Group (CSRG) at the University of California, Berk ...
,
Linux Linux ( or ) is a family of open-source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991, by Linus Torvalds. Linux is typically packaged as a Linux distribution, which ...
and
Mac OS X macOS (; previously OS X and originally Mac OS X) is a Unix operating system developed and marketed by Apple Inc. since 2001. It is the primary operating system for Apple's Mac (computer), Mac computers. Within the market of ...
) this is normally done with a partition editor, such as
fdisk In computing, the fdisk command-line utility provides disk-partitioning functions, preparatory to defining file systems. fdisk features in the DOS, DR FlexOS, IBM OS/2, and Microsoft Windows operating systems, and in certain ports of FreeBS ...
,
GNU Parted GNU Parted (the name being the conjunction of the two words PARTition and EDitor) is a free partition editor, used for creating and deleting partitions. This is useful for creating space for new operating systems, reorganising hard disk usage, co ...
, or
Disk Utility A disk utility is a utility program that allows a user to perform various functions on a computer disk, such as disk partitioning and logical volume management, as well as multiple smaller tasks such as changing drive letters and other mount po ...
. These operating systems support multiple partitions. Floppy disks are not partitioned; however depending upon the OS they may require volume information in order to be accessed by the OS. Partition editors and ICKDSF today do not handle low-level functions for HDDs and optical disc drives such as writing timing marks, and they cannot reinitialize a modern disk that has been degaussed or otherwise lost the factory formatting. IBM operating systems derived from
CP-67 CP-67 was the ''control program'' portion of CP/CMS, a virtual machine operating system developed for the IBM System/360-67 by IBM's Cambridge Scientific Center. It was a reimplementation of their earlier research system CP-40, which ran on a on ...
, e.g.,
z/VM z/VM is the current version in IBM's VM family of virtual machine operating systems. z/VM was first released in October 2000 and remains in active use and development . It is directly based on technology and concepts dating back to the 1960s, wi ...
, maintain partitioning information for minidisks externally to the drive.


High-level formatting

High-level formatting is the process of setting up an empty file system on a disk partition or a
logical volume In computer storage, logical volume management or LVM provides a method of allocating space on mass-storage devices that is more flexible than conventional partitioning schemes to store volumes. In particular, a volume manager can concatenate ...
and for PCs, installing a boot sector. This is often a fast operation, and is sometimes referred to as ''quick formatting''. Formatting an entire logical drive or partition may optionally scanned for defects, which may take considerable time. In the case of floppy disks, both high- and low-level formatting are customarily performed in one pass by the disk formatting software. Eight-inch floppies typically came low-level formatted and were filled with a format filler value of 0xE5. Since the 1990s, most 5.25-inch and 3.5-inch floppies have been shipped pre-formatted from the factory as DOS
FAT12 File Allocation Table (FAT) is a file system developed for personal computers. Originally developed in 1977 for use on floppy disks, it was adapted for use on hard disks and other devices. It is often supported for compatibility reasons by ...
floppies. In current IBM mainframe operating systems derived from
OS/360 OS/360, officially known as IBM System/360 Operating System, is a discontinued batch processing operating system developed by IBM for their then-new System/360 mainframe computer, announced in 1964; it was influenced by the earlier IBSYS/IBJOB ...
and DOS/360, such as
z/OS z/OS is a 64-bit operating system for IBM z/Architecture mainframes, introduced by IBM in October 2000. It derives from and is the successor to OS/390, which in turn was preceded by a string of MVS versions.Starting with the earliest: * O ...
and
z/VSE VSEn (''Virtual Storage Extended'') is an operating system for IBM mainframe computers, the latest one in the DOS/360 lineage, which originated in 1965. DOS/VSE was introduced in 1979 as a successor to DOS/VS; in turn, DOS/VSE was succeeded by ...
, formatting of drives is done by the INIT command of the
ICKDSF This article discusses support programs included in or available for OS/360 and successors. IBM categorizes some of these programs as utilities and others as service aids; the boundaries are not always consistent or obvious. Many, but not all, of ...
utility. These OSs support only a single partition per device, called a volume. The ICKDSF functions include writing a Record 0 on every track, writing
IPL The Indian Premier League (IPL), also known as TATA IPL for sponsorship reasons, is a men's T20 franchise cricket league of India. It is annually contested by ten teams based out of seven Indian cities and three Indian states. The leagu ...
text, creating a volume label, creating a
Volume Table of Contents In the IBM System/360Including the successors S/370 through z/Architecture storage architecture, the Volume Table of Contents (VTOC), is a data structure that provides a way of locating the data sets that reside on a particular DASD volume. With ...
(VTOC) and, optionally, creating a VTOC index (VTOCIX); high level formatting may also e done as part of allocating a file, by a utility specific to a file system or, in some older access methods, on the fly as new data are written. In z/OS Unix System Services, there are three distinct levels of high-level formatting: *Initializing a volume with ICKDSF *Initializing a
VSAM Virtual Storage Access Method (VSAM) is an IBM DASD file storage access method, first used in the OS/VS1, OS/VS2 Release 1 (SVS) and Release 2 (MVS) operating systems, later used throughout the Multiple Virtual Storage (MVS) architecture and no ...
Linear Data Set (LDS) as part of allocating it on the volume with Access Method Services (IDCAMS) DEFINE *Initializing a
zFS ZFS (previously: Zettabyte File System) is a file system with volume management capabilities. It began as part of the Sun Microsystems Solaris operating system in 2001. Large parts of Solaris – including ZFS – were published under an ope ...
aggregate in the LDS using ioeagfmt. In IBM operating systems derived from
CP-67 CP-67 was the ''control program'' portion of CP/CMS, a virtual machine operating system developed for the IBM System/360-67 by IBM's Cambridge Scientific Center. It was a reimplementation of their earlier research system CP-40, which ran on a on ...
, formatting a volume initializes track 0 and a dummy VTOC. Guest operating systems are responsible for formatting minidisks; the CMS FORMAT command formats a
CMS file system The CMS file system is the native file system of IBM's Conversational Monitor System (CMS), a component of VM . It was the only file system for CMS until the introduction of the CMS Shared File System with VM/SP. Minidisks CP-67 and VM allow a ...
on a CMS minidisk.


Host protected area

The host protected area, sometimes referred to as hidden protected area, is an area of a
hard drive A hard disk drive (HDD), hard disk, hard drive, or fixed disk is an electro-mechanical data storage device that stores and retrieves digital data using magnetic storage with one or more rigid rapidly rotating platters coated with magnet ...
that is high-level formatted such that the area is not normally visible to its
operating system An operating system (OS) is system software that manages computer hardware, software resources, and provides common services for computer programs. Time-sharing operating systems schedule tasks for efficient use of the system and may also in ...
(OS).


Reformatting

Reformatting is a high-level formatting performed on a functioning disk drive to free the medium of its contents. Reformatting is unique to each operating system because what actually is done to existing data varies by OS. The most important aspect of the process is that it frees disk space for use by other data. To actually "erase" everything requires overwriting each block of data on the medium; something that is not done by many high-level formatting utilities. Reformatting often carries the implication that the operating system and all other software will be reinstalled after the format is complete. Rather than fixing an installation suffering from malfunction or security compromise, it may be necessary to simply reformat everything and start from scratch. Various colloquialisms exist for this process, such as "wipe and reload", "nuke and pave", "reimage", etc. However, reformatting a drive containing only user data does not require reinstallation of the OS.


Formatting


DOS, OS/2 and Windows

''format command'': Under
MS-DOS MS-DOS ( ; acronym for Microsoft Disk Operating System, also known as Microsoft DOS) is an operating system for x86-based personal computers mostly developed by Microsoft. Collectively, MS-DOS, its rebranding as IBM PC DOS, and a few ope ...
,
PC DOS PC or pc may refer to: Arts and entertainment * Player character or playable character, a fictional character controlled by a human player, usually in role-playing games or computer games * ''Port Charles'', an American daytime TV soap opera * ...
,
OS/2 OS/2 (Operating System/2) is a series of computer operating systems, initially created by Microsoft and IBM under the leadership of IBM software designer Ed Iacobucci. As a result of a feud between the two companies over how to position OS/2 ...
and
Microsoft Windows Windows is a group of several proprietary graphical operating system families developed and marketed by Microsoft. Each family caters to a certain sector of the computing industry. For example, Windows NT for consumers, Windows Server for serv ...
, disk formatting can be performed by the
format Format may refer to: Printing and visual media * Text formatting, the typesetting of text elements * Paper formats, or paper size standards * Newspaper format, the size of the paper page Computing * File format, particular way that informatio ...
command Command may refer to: Computing * Command (computing), a statement in a computer language * COMMAND.COM, the default operating system shell and command-line interpreter for DOS * Command key, a modifier key on Apple Macintosh computer keyboards * ...
. The format program usually asks for confirmation beforehand to prevent accidental removal of data, but some versions of DOS have an undocumented /AUTOTEST option; if used, the usual confirmation is skipped and the format begins right away. The WM/FormatC
macro virus In computing terminology, a macro virus is a virus that is written in a macro language: a programming language which is embedded inside a software application (e.g., word processors and spreadsheet applications). Some applications, such as Micr ...
uses this command to format drive C: as soon as a document is opened. ''Unconditional format'': There is also the /U parameter that performs an ''unconditional'' format which under most circumstances overwrites the entire partition, preventing the recovery of data through software. Note however that the /U switch only works reliably with floppy diskettes (see image to the right). Technically because unless /Q is used, floppies are always low level formatted in addition to high-level formatted. Under certain circumstances with hard drive partitions, however, the /U switch merely prevents the creation of unformat information in the partition to be formatted while otherwise leaving the partition's contents entirely intact (still on disk but marked deleted). In such cases, the user's data remain ripe for recovery with specialist tools such as EnCase or
disk editor A disk editor is a computer program that allows its user to read, edit, and write raw data (at character or hexadecimal, byte-levels) on disk drives (e.g., hard disks, USB flash disks or removable media such as a floppy disks); as such, they ...
s. Reliance upon /U for secure overwriting of hard drive partitions is therefore inadvisable, and purpose-built tools such as
DBAN Darik's Boot and Nuke, also known as DBAN , is a free and open-source project hosted on SourceForge. The program is designed to securely erase a hard disk until its data is permanently removed and no longer recoverable, which is achieved by o ...
should be considered instead. ''Overwriting'': In Windows Vista and upwards the non-quick format will overwrite as it goes. Not the case in Windows XP and below. ''OS/2'': Under OS/2, format will overwrite the entire partition or logical drive if the /L parameter is used, which specifies a ''long'' format. Doing so enhances the ability of
CHKDSK In computing, CHKDSK (short for "check disk") is a system tool and command in DOS, Digital Research FlexOS, IBM/Toshiba 4690 OS, IBM OS/2, Microsoft Windows and related operating systems. It verifies the file system integrity of a volume and ...
to recover files.


Unix-like operating systems

High-level formatting of disks on these systems is traditionally done using the
mkfs In computer operating systems, mkfs is a command used to format a block storage device with a specific file system. The command is part of Unix and Unix-like operating systems. In Unix, a block storage device must be formatted with a file syste ...
command. On Linux (and potentially other systems as well) mkfs is typically a wrapper around filesystem-specific commands which have the name mkfs''.fsname'', where ''fsname'' is the name of the filesystem with which to format the disk. Some filesystems which are not supported by certain implementations of mkfs have their own manipulation tools; for example
Ntfsprogs Ntfsprogs was a collection of free Unix utilities for managing the NTFS file system used by the Windows NT operating system (since version 3.1) on a hard disk partition. 'ntfsprogs' was the first stable method of writing to NTFS partitions in ...
provides a format utility for the
NTFS New Technology File System (NTFS) is a proprietary journaling file system developed by Microsoft. Starting with Windows NT 3.1, it is the default file system of the Windows NT family. It superseded File Allocation Table (FAT) as the preferred fil ...
filesystem. Some Unix and Unix-like operating systems have higher-level formatting tools, usually for the purpose of making disk formatting easier and/or allowing the user to partition the disk with the same tool. Examples include
GNU Parted GNU Parted (the name being the conjunction of the two words PARTition and EDitor) is a free partition editor, used for creating and deleting partitions. This is useful for creating space for new operating systems, reorganising hard disk usage, co ...
(and its various GUI frontends such as GParted and the
KDE Partition Manager KDE Partition Manager is a disk partitioning application originally written by Volker Lanz for the KDE Platform. It was first released for KDE SC 4.1 and is released independently of the central KDE release cycle. After the death of Volker Lan ...
) and the
Disk Utility A disk utility is a utility program that allows a user to perform various functions on a computer disk, such as disk partitioning and logical volume management, as well as multiple smaller tasks such as changing drive letters and other mount po ...
application on
Mac OS X macOS (; previously OS X and originally Mac OS X) is a Unix operating system developed and marketed by Apple Inc. since 2001. It is the primary operating system for Apple's Mac (computer), Mac computers. Within the market of ...
.


Recovery of data from a formatted disk

As in file deletion by the operating system, data on a disk are not fully erased during every high-level format. Instead, the area on the disk containing the data is merely marked as available, and retains the old data until it is overwritten. If the disk is formatted with a different file system than the one which previously existed on the partition, some data may be overwritten that wouldn't be if the same file system had been used. However, under some file systems (e.g., NTFS, but not FAT), the file indexes (such as $MFTs under NTFS, inodes under ext2/3, etc.) may not be written to the same exact locations. And if the partition size is increased, even FAT file systems will overwrite more data at the beginning of that new partition. From the perspective of preventing the recovery of sensitive data through recovery tools, the data must either be completely overwritten (every sector) with random data before the format, or the format program itself must perform this overwriting, as the
DOS DOS is shorthand for the MS-DOS and IBM PC DOS family of operating systems. DOS may also refer to: Computing * Data over signalling (DoS), multiplexing data onto a signalling channel * Denial-of-service attack (DoS), an attack on a communicat ...
FORMAT command did with floppy diskettes, filling every data sector with the format filler byte value (typically 0xF6). However, there are applications and tools, especially used in forensic information technology, that can recover data that has been conventionally erased. In order to avoid the recovery of sensitive data, governmental organization or big companies use information destruction methods like the
Gutmann method The Gutmann method is an algorithm for securely erasing the contents of computer hard disk drives, such as files. Devised by Peter Gutmann and Colin Plumb and presented in the paper ''Secure Deletion of Data from Magnetic and Solid-State Memory'' ...
. For average users there are also special applications that can perform complete data destruction by overwriting previous information. Although there are applications that perform multiple writes to assure data erasure, any single write over old data is generally all that is needed on modern hard disk drives. The ''ATA Secure Erase'' can be performed by disk utilities to quickly and thoroughly wipe drives. Created: 2011.02.21, updated: 2013.04.02.
Degaussing Degaussing is the process of decreasing or eliminating a remnant magnetic field. It is named after the gauss, a unit of magnetism, which in turn was named after Carl Friedrich Gauss. Due to magnetic hysteresis, it is generally not possible to red ...
is another option; however, this may render the drive unusable.


See also

*
Data erasure Data erasure (sometimes referred to as data clearing, data wiping, or data destruction) is a software-based method of overwriting the data that aims to completely destroy all electronic data residing on a hard disk drive or other digital media b ...
*
Data recovery In computing, data recovery is a process of retrieving deleted, inaccessible, lost, corrupted, damaged, or formatted data from secondary storage, removable media or files, when the data stored in them cannot be accessed in a usual way. The dat ...
*
Data remanence Data remanence is the residual representation of digital data that remains even after attempts have been made to remove or erase the data. This residue may result from data being left intact by a nominal file deletion operation, by reformatting o ...
*
Drive mapping Drive mapping is how Microsoft Windows associates a local drive letter (A through Z) with a shared storage area to another computer (often referred as a File Server) over a network. After a drive has been mapped, a software application on a clie ...
*
Comparison of file systems The following tables compare general and technical information for a number of file systems. General information Limits Metadata Features File capabilities Block capabilities Note that in addition to the below table, blo ...


Notes


References

{{reflist, refs= {{cite book , author-first1=Andrew , author-last1=Schulman , author-first2=Ralf D. , author-last2=Brown , author-link2=Ralf D. Brown , author-first3=David , author-last3=Maxey , author-first4=Raymond J. , author-last4=Michels , author-first5=Jim , author-last5=Kyle , title=Undocumented DOS: A programmer's guide to reserved MS-DOS functions and data structures - expanded to include MS-DOS 6, Novell DOS and Windows 3.1 , publisher= Addison Wesley , edition=2 , date=1994 , orig-year=November 1993 , isbn=0-201-63287-X , url=https://archive.org/details/undocumenteddosp00andr_0 (xviii+856+vi pages, 3.5"-floppy) Errata

https://web.archive.org/web/20190417212906/https://www.pcjs.org/pubs/pc/programming/Undocumented_DOS/#errata-2nd-edition]


External links


Windows NT Workstation Resource Kit, Chapter 17 - Disk and File System Basics
section "Formatting Hard Disks and Floppy Disks"

by Peter Gutmann
''Differences between a Quick format and a regular format during a "clean" installation of Windows XP''
from Microsoft Help and Support
support.microsoft.com — How to Use the Fdisk Tool and the Format Tool to Partition or Repartition a Hard Disk

''Help: I Got Hacked. Now What Do I Do?''
€”Microsoft Tech Net: Why you should wipe a compromised drive to the bare metal. Article by Jesper M. Johansson, Ph.D., CISSP, MCSE, MCP+I Rotating disc computer storage media, Formatting of disks File system management