Disk formatting is the process of preparing a
data storage device
Data ( , ) are a collection of discrete or continuous values that convey information, describing the quantity, quality, fact, statistics, other basic units of meaning, or simply sequences of symbols that may be further interpreted form ...
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 hard disk drive platter, pla ...
,
solid-state drive,
floppy disk
A floppy disk or floppy diskette (casually referred to as a floppy, a diskette, or a disk) is a 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 with a ...
,
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, such as digital cameras as well as in many early games conso ...
or
USB flash drive
A flash drive (also thumb drive, memory stick, and pen drive/pendrive) is a data storage device that includes flash memory with an integrated USB interface. A typical USB drive is removable, rewritable, and smaller than an optical disc, and u ...
for initial use. In some cases, the formatting operation may also create one or more new
file systems. 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 and software resources, and provides common daemon (computing), services for computer programs.
Time-sharing operating systems scheduler (computing), schedule tasks for ...
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
privileged[E.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, 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 un ...
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 disk storage unit (of the late 1950s) block size was 100 six-bit characters) but starting with the
1301 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, th ...
s on the
IBM System/360
The IBM System/360 (S/360) is a family of mainframe computer systems announced by IBM on April 7, 1964, and delivered between 1965 and 1978. System/360 was the first family of computers designed to cover both commercial and scientific applicati ...
expanded this concept in the form of
Count Key Data (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
In computing, Serial Attached SCSI (SAS) is a point-to-point serial Communications protocol, protocol that moves data to and from Computer storage, computer-storage devices such as hard disk drives, solid-state drives and tape drives. SAS replac ...
(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 adapter, 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 (PAT ...
(SATA) drives, appear at their
interfaces 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 of 4096 byte logical blocks.
Floppy disk
A floppy disk or floppy diskette (casually referred to as a floppy, a diskette, or a disk) is a 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 with a ...
s generally only used fixed block sizes but these sizes were a function of the host's
OS and its interaction with its
controller 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
An optical disc is a flat, usuallyNon-circular optical discs exist for fashion purposes; see shaped compact disc. disc-shaped object that stores information in the form of physical variations on its surface that can be read with the aid o ...
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
A disk controller is a controller circuit that enables a 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 connecting it to the rest of the system.{ ...
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 format within a disk partition or a
logical volume.
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
sectors 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 un ...
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
* Means of communication, tools and channels used to deliver information or data
** Advertising media, various media, content, buying and placement for advertising
** Interactive media, media that is inter ...
; for example, large records can be used to cut down on inter-record gap size.
Several
freeware,
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, libre software, libreware sometimes known as freedom-respecting software is computer software distributed open-source license, under terms that allow users to run the software for any purpose as well as to study, change, distribut ...
programs (e.g.
GParted
GParted is a GTK front-end to GNU Parted and an official GNOME partition-editing application (alongside GNOME Disks, Disks). GParted is used for creating, deleting, resizing, moving, checking, and copying Partition (computing), disk partitions a ...
,
FDFORMAT, NFORMAT,
VGA-Copy 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 ( ) is a family of open source Unix-like operating systems based on the Linux kernel, an kernel (operating system), operating system kernel first released on September 17, 1991, by Linus Torvalds. Linux is typically package manager, pac ...
supports a variety of sector sizes, and
DOS and
Windows
Windows is a Product lining, product line of Proprietary software, proprietary graphical user interface, graphical operating systems developed and marketed by Microsoft. It is grouped into families and subfamilies that cater to particular sec ...
support a large-record-size
DMF-formatted floppy format.
After establishing the structure of tracks, a formatter also needs to fill the entire floppy and look for
bad sectors. Traditionally, the physical sectors were initialized with a fill value of
0xF6
as per the INT 1Eh's
Disk Parameter Table (DPT) during format on IBM compatible machines. This value is also used on the
Atari Portfolio.
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/Intel 8085, 85-based microcomputers by Gary Kildall of Digital Research, Dig ...
8-inch floppies typically came pre-formatted with a value of
0xE5
,
[ (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] and by way of
Digital Research
Digital Research, Inc. (DR or DRI) was a privately held American software 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 ...
this value was also used on
Atari ST
Atari ST is a line of personal computers from Atari Corporation and the successor to the company's Atari 8-bit computers, 8-bit computers. The initial model, the Atari 520ST, had limited release in April–June 1985, and was widely available i ...
and some
Amstrad
Amstrad plc was a British consumer electronics company, founded in 1968 by Alan Sugar. During the 1980s, the company was known for its Home computer, home computers beginning with the Amstrad CPC and later also the ZX Spectrum range after the ...
formatted floppies.
Amstrad otherwise used
0xF4
as a fill value.
Low-level formatting (LLF) of hard disks
Hard disk drives prior to the 1990s typically had a separate
disk controller
A disk controller is a controller circuit that enables a 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 connecting it to the rest of the system.{ ...
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 type of general-purpose computer mostly developed from the mid-1960s, built significantly smaller and sold at a much lower price than mainframe computers . By 21st century-standards however, a mini is ...
and personal computer
A personal computer, commonly referred to as PC or computer, is a computer designed for individual use. It is typically used for tasks such as Word processor, word processing, web browser, internet browsing, email, multimedia playback, and PC ...
systems until the 1990s. IBM
International Business Machines Corporation (using the trademark IBM), nicknamed Big Blue, is an American Multinational corporation, multinational technology company headquartered in Armonk, New York, and present in over 175 countries. It is ...
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
In engineering, debugging is the process of finding the root cause, workarounds, and possible fixes for bugs.
For software, debugging tactics can involve interactive debugging, control flow analysis, log file analysis, monitoring at the ap ...
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.
Modern disks: reinitialization
Modern hard drives can no longer perform post-production LLF, i.e. to re-establish the basic layout of "tracks" and "blocks" on the recording surface. ''Reinitialization'' refers to processes that return a disk to a factory-like configuration: no data, no partitioning, all blocks available to use.
Command-set support
SCSI provides a command. This command performs the needed certification step to weed out bad sectors and has the ability to change sector size. The command-line sg_format program may be used to issue the command. A variety of sector sizes may be chosen, but are not available on all devices: 512, 520, 524, 528, 4096, 4112, 4160, and 4224-byte sectors. Although the SCSI command provides many options, even resizing, it does not touch on the track layer where low-level format happens.
ATA does not expose a low-level format functionality, but they allow the sector size to be changed via ( in hdparm
). (Consumer drives usually only support 512 and 4096-byte sectors.) Although sector-size change may scramble data, it is not a safe way of erasing data, nor is any certification done. ATA offers a separate ( in hdparm
) command for erasure.
NVMe
NVM Express (NVMe) or Non-Volatile Memory Host Controller Interface Specification (NVMHCIS) is an open, logical-device interface specification for accessing a computer's non-volatile storage media usually attached via the PCI Express bus. The in ...
drives have a standard method of formatting, available in, for example, the Linux command-line program . Sector size change and secure erase options are available. Note that NVMe drives are generally solid-state, making this "track" distinction useless.
Seagate Technology
Seagate Technology Holdings plc is an American Computer data storage, data storage company. It was incorporated in 1978 as Shugart Technology and commenced business in 1979. Since 2010, the company has been incorporated in Dublin, Ireland, with ...
drives offer a TTL serial debugging console. Among other things, the console can format the "system" and "user" partitions while performing defect checks (re-initialization over pre-established logical blocks) and modify track parameters (managing the ''real'' low-level format).
Disk-filling
When the hard drive's built-in reinitialization function (see above) is unavailable due to driver or system limitations, it is possible to fill the entire disk instead. On older hard drives without bad sector management, a program will also need to check for any damaged sectors and try to spare them out. On newer drives with defect management, reallocated sectors may be left unerased, whereas the built-in re-initialization function will erase them.
In modern times, it is most common to fill hard drives with value of 0x00
. One popular method for performing this 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 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 will erase all files and file systems.
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 ...
. The latter value is typically also the default value used on ROM disks (which cannot be reformatted). Some advanced tools allow configuring the fill value.
Zero-filling a drive is not a secure method of preparing a drive for use with an encrypted filesystem. Doing so voids the plausible deniability of the process, as the encrypted areas (indistinguishable from random without a key, unless the cipher is compromised) will stand out among zero blocks. The correct technique is to zero-fill inside a temporary encrypted layer then discard the key and layer setup. ( /dev/urandom provides similar safety, but tends to be slow.)
Confusion
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.
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 op ...
, Microsoft Windows
Windows is a Product lining, product line of Proprietary software, proprietary graphical user interface, graphical operating systems developed and marketed by Microsoft. It is grouped into families and subfamilies that cater to particular sec ...
, and UNIX-based operating systems (such as BSD
The Berkeley Software Distribution (BSD), also known as Berkeley Unix or BSD Unix, is a discontinued Unix operating system developed and distributed by the Computer Systems Research Group (CSRG) at the University of California, Berkeley, beginni ...
, Linux
Linux ( ) is a family of open source Unix-like operating systems based on the Linux kernel, an kernel (operating system), operating system kernel first released on September 17, 1991, by Linus Torvalds. Linux is typically package manager, pac ...
and macOS
macOS, previously OS X and originally Mac OS X, is a Unix, Unix-based operating system developed and marketed by Apple Inc., Apple since 2001. It is the current operating system for Apple's Mac (computer), Mac computers. With ...
) this is normally done with a partition editor, such as fdisk, GNU Parted, or Disk Utility
A disk utility is a utility software, 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 an ...
. 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, e.g., z/VM, 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 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 scan 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 floppies.
In current IBM mainframe operating systems derived from OS/360 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:
...
and z/VSE, formatting of drives is done by the INIT command of the ICKDSF 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 text, creating a volume label, creating a Volume Table of Contents
In the storage architecture of OS/360 and successors, Conversational Monitor System, CMS, and DOS/360 and successors, the Volume Table of Contents (VTOC) is a data structure that provides a way of locating the data set (IBM mainframe), data sets th ...
(VTOC) and, optionally, creating a VTOC index (VTOCIX); high level formatting may also be 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 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 manager, volume management capabilities. It began as part of the Sun Microsystems Solaris (operating system), Solaris operating system in 2001. Large parts of Solaris, includin ...
aggregate in the LDS using ioeagfmt.
In IBM operating systems derived from CP-67, 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 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 hard disk drive platter, pla ...
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 and software resources, and provides common daemon (computing), services for computer programs.
Time-sharing operating systems scheduler (computing), schedule tasks for ...
(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 op ...
, PC DOS, OS/2
OS/2 is a Proprietary software, proprietary computer operating system for x86 and PowerPC based personal computers. It was created and initially developed jointly by IBM and Microsoft, under the leadership of IBM software designer Ed Iacobucci, ...
and Microsoft Windows
Windows is a Product lining, product line of Proprietary software, proprietary graphical user interface, graphical operating systems developed and marketed by Microsoft. It is grouped into families and subfamilies that cater to particular sec ...
, disk formatting can be performed by the format
command
Command may refer to:
Computing
* Command (computing), a statement in a computer language
* command (Unix), a Unix command
* COMMAND.COM, the default operating system shell and command-line interpreter for DOS
* Command key, a modifier key on A ...
. 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 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 editors. Reliance upon /U
for secure overwriting of hard drive partitions is therefore inadvisable, and purpose-built tools such as DBAN 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 software, system tool and command (computing), command in DOS and Microsoft Windows (and related operating systems), as well as Digital Research FlexOS, IBM/Toshiba 4690 Operating System, 4 ...
to recover files.
Unix-like operating systems
High-level formatting of disks on these systems is traditionally done using the mkfs
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 provides a format utility for the NTFS
NT File System (NTFS) (commonly called ''New Technology File System'') is a proprietary journaling file system developed by Microsoft in the 1990s.
It was developed to overcome scalability, security and other limitations with File Allocation Tabl ...
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 (and its various GUI frontends such as GParted
GParted is a GTK front-end to GNU Parted and an official GNOME partition-editing application (alongside GNOME Disks, Disks). GParted is used for creating, deleting, resizing, moving, checking, and copying Partition (computing), disk partitions a ...
and the KDE Partition Manager) and the Disk Utility
A disk utility is a utility software, 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 an ...
application on Mac OS X
macOS, previously OS X and originally Mac OS X, is a Unix, Unix-based operating system developed and marketed by Apple Inc., Apple since 2001. It is the current operating system for Apple's Mac (computer), Mac computers. With ...
.
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 indices (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 be completely overwritten (every sector), either by a separate tool, or during formatting. Data are destroyed in DOS, OS/2, and Windows when the /L (long) option is used on format and always for a Partitioned Data Set (PDS) in MVS and for newer file systems on IBM mainframes.
It is disputed whether one pass of zero-fill is enough to destroy sensitive data on older (until 1990s) magnetic storage: Gutmann (known for his 35-pass Gutmann method) claims that magnetic force microscopy may be able to "see" old bits on a floppy,[Gutmann, Peter. (July 22–25, 1996) ]
Secure Deletion of Data from Magnetic and Solid-State Memory.
' University of Auckland Department of Computer Science. Epilogue section. but the sources he cited does not prove such. Random fill is believed to be stronger than a fixed pattern fill. One pass of zero fill is sufficient to prevent data remanence, according to NIST (2014) and Wright et al (2008). The '' Secure Erase'' option built into hard drives is considered trustworthy,[ Created: 2011.02.21, updated: 2013.04.02.] with the caveat that early solid state drives are known to mis-implement the function.
Degaussing is effective without controversy; however, this may render the drive unusable.
See also
* Data erasure
* Data recovery
* Data remanence
* Drive mapping
* Comparison of file systems
The following tables compare general and technical information for a number of file systems.
General information
Metadata
All widely used file systems record a last modified time stamp (also known as "mtime"). It is not included i ...
Notes
References
{{reflist, refs=
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
Formatting of disks
File system management