Disk Formatting

Low-Level Formatting

  • The process of dividing the physical storage medium surface into basic hardware components
  • Done by Hardware manufacturer
  • Cannot be done by OS
  • End users generally cannot perform a low-level format
# NVMe
# Rebuilds internal controller mapping tables and layout structures
# can be used to convert 512e --> 4Kn
nvme format
 
# SATA
# aka Fast Format (not to be confused by OS Quick Format)
# natively switches enterprise SATA HDDs from 512e --> 4Kn
SET SECTOR CONFIGURATION EXT
 
# SCSI
# can modify block size or count
Format Unit
  • In modern context, “Low-level formatting” may mean actual Low level Formatting or Reinitialization or Disk Filling

Reinitialization

  • It refers to processes that return a disk to a factory-like configuration: no data, no partitioning, all blocks available to use
# NVMe (using default params)
nvme format
 
# NVMe/SCSI
SANITIZE
 
# SATA
SECURITY ERASE
 
# SCSI (using default params)
Format Unit

Disk Filling

  • It is process of overwriting every logical sector on the disk with a fixed value
# Linux/macOS
sudo dd if=/dev/zero of=/dev/sda bs=4k status=progress
 
# Windows
diskpart
DISKPART> list disk
DISKPART> select disk 1
DISKPART> clean all
 
# macOS
diskutil secureErase 0 disk2

Partitioning

  • aka Disk Slicing
  • The process of dividing a single physical block device’s flat, linear LBA array into one or more isolated logical regions called Partitions (or Volumes)
  • See Disk_Partitioning

Logical Formatting

  • aka High-Level Formatting
  • The process of constructing software data structures on top of the drive’s logical sectors to enable file management

Boot Loader