Two levels of formatting
Formatting a disk for use by an operating system and its applications and files involves two quite different types of formatting. First, a low-level (closer to the hardware) formatting program will mark the surface of the disk with sector numbers and other information to be used later, in normal operations, by the disk controller. This is intended to be the permanent foundation of the disk, and is often completed at the factory.
High-level formatting occurs during operating system installation, or when adding a new disk. This inscribes the file system format. Disk and distributed file system will specify an optional boot block, and 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 hardware.
The process is most easily described with a standard 1.44 MB floppy disk in mind. Low-level formatting of the floppy normally writes 18 sectors of 512 bytes each on each of 160 tracks (80 on each side) of the floppy disk, providing 1,474,560 bytes of storage on the disk.
Sectors are actually physically larger than 512 bytes, as they include sector numbers, CRC bytes and synchronization fields, which indicate the correct speed at which to read data off at the disk. 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 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 minimize sector gap and thereby allowing the number of sectors per track to be increased),
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.[citation needed]
Low-level formatting (LLF) of hard disks
Low-level format of a 10-megabyte IBM PC XT hard drive.
User instigated low-level formatting (LLF) of hard disks was common in the 1980s. Typically this involved setting up the MFM pattern on the disk, so that sectors of bytes could be successfully written to it. With the advent of RLL encoding, low-level formatting grew increasingly uncommon, and most modern hard disks are embedded systems, which are low-level formatted at the factory with the physical geometry dimensions and thus not subject to user intervention.
Early hard disks were quite similar to floppies, but low-level formatting was generally done by the BIOS rather than by the operating system. This process involved using the MS-DOS debug program to transfer control to a routine hidden at different addresses in different BIOSs[citation needed].
Early hard disks often had imprecise head-movement mechanisms based on stepper motor technology which located tracks by advancing the stepper a specific number of steps. Ideally, the correct track would then appear under the head. But a drive formatted horizontally often would not function in a vertical orientation, due to the force of gravity pulling down on the mechanism and moving the heads slightly out of alignment with tracks written in the horizontal position. It was usually necessary to LLF a drive for the orientation it was meant to be used.
Early hard drives also tended to use a magnetic storage material with a low resistance to demagnetization (coercivity). An MFM/RLL drive containing data that was rarely written would eventually develop data errors all by itself due to the opposing magnetic domains that define data bits softening and neutralizing each other. Although data would become unreadable, this was not due to a media defect. The low-level format process can wipe out these mushy sectors and firm up new boundaries in the mud, allowing the drive to perform again as if it were brand new for a while longer. Some older drive utilities such as Spinrite included a sector refreshing function that read and rewrote all sectors to firm up the sector magnetic domains.
Transition away from LLF
Starting in the early 1990s, low-level formatting of hard drives became more complex as technology improved with:
]]>