Formatting a disk for use by an operating system and its applications typically involves three different processes. • 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 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. and
DOS and
Windows support a large-record-size
DMF-formatted floppy format. and by way of
Digital Research this value was also used on
Atari ST and some
Amstrad formatted floppies. User-instigated low-level formatting (LLF) of
hard disk drives was common for
minicomputer and
personal computer 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.
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 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 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. 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 . 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.
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,
Microsoft Windows, and UNIX-based operating systems (such as
BSD,
Linux and
macOS) this is normally done with a
partition editor, such as
fdisk,
GNU Parted, or
Disk Utility. 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. 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 (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 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 ==