In today’s world there is confusion about what a “low-level format” is and what 
it does.  There are three levels of “format” one can do on a volume: lay down 
the block markers, initialize the volume and initialize the file system.  Most 
people today (in the Windows and Mac world) think of a low level format as what 
really happens when you initialize the volume.

A real low level format lays down the block markers on the disk.  This is what 
SCSICTL on NetBSD can do. It can also change the block size used on the volume, 
but it does not zerorize the blocks.  It does wipe out the bad block table.  
This operation is commanded by the host system but is performed by the disk’s 
firmware.  Normally this is done at the factory and there are few if any 
utilities that can do this outside the factory (SCSICTL in NetBSD being an 
exception).  The primary reason for this lack of utilities is probably because 
the manufacturer doesn’t want the user wiping out the bad block table, and some 
disks ship from the factory with bad blocks already revectored in the tables.

The volume initialization, what Windows and OS X refer to as a “low level 
format” is actually a volume initialization.  It sets up the disk partition 
table (MBR or GPT/GUID) and both systems have the option of writing zeros to 
all the blocks on the volume.  If bad blocks are detected the disk firmware 
will revector them and record them in the bad block tables on the disk.  I 
don’t know off-hand if there’s a utility in NetBSD which will write zeros to 
all the blocks on the disk other than doing a simple “dd” to the entire raw 
volume.

The file system initialization is where the designated disk partition is set up 
to contain the designated file system - FAT, ExFAT, HFS+, APFS, EXT, FFS, etc.  
It defines the file system structure for the partition, and as with volume 
initialization, if bad blocks are detected they will be revectored and recorded 
in the disk’s bad block table.


Reply via email to