Learn about the technologies behind the Internet with The TCP/IP Guide!|
NOTE: Using robot software to mass-download the site degrades the server and is prohibited. See here for more.
Find The PC Guide helpful? Please consider a donation to The PC Guide Tip Jar. Visa/MC/Paypal accepted.
|View over 750 of my fine art photos any time for free at DesktopScenes.com!|
The well-known FORMAT command is used, of course, to format hard disks and floppy disks. Many people don't realize that this command functions quite differently for hard disks and floppy disks. As described here, there are two steps to formatting: low-level formatting and high-level formatting. For floppy disks, FORMAT does both low-level formatting and high-level formatting. For hard disks, it only does high-level formatting. The reason for this difference is that for hard disks, partitioning must be done in between the two steps. Modern hard disks are low-level formatted at the factory; they are then partitioned and high-level formatted by the user (or system builder).
There are many different parameters that the FORMAT command can use; these can be seen by typing "FORMAT /?" at a DOS command line. Most of these commands are used for specifying different formatting options for different types of floppy disks. An important parameter is the "/S" flag, which tells FORMAT to make the volume it is formatting ready for booting. This is done by creating the proper disk structures for booting, and copying the operating system files to the root directory of the new volume. In most cases today, you do not need to use any of the optional flags associated with the FORMAT command; it will "figure out" what it needs to do by examining your hardware. Even the "/S" flag is not needed for newer operating systems, which take care of all the operating system file setup for you.
There's one FORMAT command parameter that bears special mention. This is the undocumented "/Z" switch, which allows you to specify a particular cluster size for a partition as you format it, overriding the defaults that are established by the system based on the size of the partition (see here for a table of standard cluster sizes for FAT16 based on partition size, and here for FAT32.) For example, if you have a 12 GiB partition, the normal cluster size would be 16 sectors, or 8 kiB. If you format such a partition with the command "FORMAT /Z:8" then it will format it with eight-sector, 4 kiB clusters instead. While this can be useful in some circumstances, be sure to read the warning below carefully before using this option: it is undocumented for a reason.
Warning: While the
"/Z" switch has become increasingly popular amongst those that like to tweak
their systems, I do not recommend the use of this switch. In theory, it should
allow you to create a large partition with small cluster sizes, or a small partition with
large clusters. The problem is that this switch creates non-standard partitions
that can cause problems with some software that isn't expecting them. In the example given
above, the file allocation table would have twice as many entries as normal for a FAT32
partition. There have been problems reported with programs "breaking" when
attempting to use partitions that have been modified using the "/Z" parameter to
make small clusters, because the programs can't handle the increased numbers of clusters
in the partition. If you really care about getting smaller cluster sizes that much, just
break the disk into more partitions. Using "/Z" to increase the cluster
size should work, but again, it's a minor performance tweak and should be approached with