Disk formatting is the process of preparing a data storage device such as a hard disk drive, solid-state drive, floppy disk, memory card or USB flash drive 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 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 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 bytes, 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 devices on the IBM System/360 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 (SAS) and Serial ATA (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 disks 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 discs generally only use fixed block sizes.
Process 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. 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 bytes 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; for example, large records can be used to cut down on inter-record gap size. Several freeware, shareware and free software programs (e.g. GParted, 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 supports a variety of sector sizes, and DOS and Windows 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 8-inch floppies typically came pre-formatted with a value of 0xE5, and by way of Digital Research this value was also used on Atari ST and some Amstrad formatted floppies. Amstrad otherwise used 0xF4 as a fill value.
Low-level formatting (LLF) of hard disks
… excerpt ends here. Continue reading the full article.


