5.4 Preparing a Hard Drive for OS Installation
5.4.2 Formatting a hard drive
After the drive is partitioned, it must be prepared to store data. This process is called formatting. Formatting a hard drive creates magnetic tracks in concentric circles on the disk surface. These tracks are then broken up into chunks of 512 bytes called sectors. The tracks of the disk are numbered, beginning with 00, from the outer edge of the disk inward. In the computer world, numbering usually begins with 0 instead of 1. The number of tracks per disk depends on the type of disk and the drive in use. The combination of two or more sectors on a single track is called a cluster. A cluster is sometimes called a block. The size of each cluster depends on the size of the hard disk and the version of DOS in use.

A cluster is the minimum unit DOS will use to store a file. This means that even if a file is only one byte long, one whole cluster will still be used to store the file. The disk capacity is determined by the number of tracks and sectors and, therefore, by the number of clusters that can be created on the disk surface by formatting it. Finally, in a hard disk drive where several disks are stacked and rotate on a common spindle, all of the tracks having the same number are referred to collectively as a cylinder.

Note: Each sector on a DOS disk holds 512 bytes. However, files can be any length. Therefore, a single file may occupy several sectors on the disk. On floppy disks, common cluster sizes are one or two sectors long. With hard disks, the cluster size may vary from 1 to 16 sectors in length, depending on the type of disk.

File Allocation Table (FAT)
During formatting, a special file called the File Allocation Table (FAT) is created and located in the disk sector 0. FAT is a reference table that the OS uses to locate files on the disk. Newer DOS versions actually provide additional protection by storing a second (identical) copy of the original FAT created during formatting at another location. The first copy is the normal working copy while the second FAT is used as a backup measure in case the contents of the first FAT become corrupted. Under normal circumstances the contents of either copy of FAT will be hidden.

Since the original 16-bit FAT associated with DOS (called FAT16), other versions have come into being. VFAT is the version that came with the "original" Windows 95. FAT32 (32-Bit), a more efficient form of FAT, came with Windows 95 OSR2, Windows 98, and Windows Millennium Edition. These operating systems are collectively known as Windows 9x. Only DOS and the 16-bit Windows 3.X still use FAT16. When written as "FAT", without any number associated with it, it is understood to be FAT16. When a hard drive is formatted for installation of DOS, the FAT is created. When formatted for the installation of Windows 9x, FAT32 is created as the file system in the disk partition where the Windows 9x OS is to be installed.

A Windows program such as Cvt1.EXE or third party utilities such as Partition Magic can be used to convert FAT16 to FAT32, without destroying the data in the disk partition. However it is not possible to convert a FAT32 partition back to a FAT16 partition. FAT, FAT32, and other file systems, including NTFS, are discussed more thoroughly in Chapter 7.

A drive may be formatted at a low-level or high-level, depending on the circumstances, although high-level formatting is more commonly used.

  • Low-level formatting routine marks off the disk into sectors and cylinders, and defines their placement on the disk. IDE and SCSI drives normally come with the low-level format already performed at the factory. Some SCSI devices may still require a low-level format, but never do a low-level format on an IDE drive unless the drive has totally failed.
  • High-level format routine is performed by the format command in MS-DOS. This procedure creates logical structures on the disk that tell the system what files are on the disk and where they can be found. When MS-DOS or a Windows 9x bootable system disk containing format.exe is used to format the hard drive, the process creates a blank File Allocation Table (FAT) and root directory structure on the disk. A high-level format should be performed when the hard drive is prepared for the OS installation.

When using a Windows 98 bootable disk containing the format command to format a hard drive, the syntax at the DOS command prompt is as follows:

A:\>format C:

C: is the hard disk, A: is the floppy boot disk, and A:\> is the DOS command prompt.

Typing a "space" and /s after the drive letter designation in the command will format the hard drive and transfer the system files, making it bootable. The syntax at the DOS command prompt is as follows:

A:\>format C: /s

Lab Activity  (PDF, 10 KB)
  In this lab, students will be able to partition the hard drive into two drives. Students will also be able to install the three system files onto the hard drive to make it a bootable drive.
 
Worksheet  (PDF, 9 KB)
  Hard Drive Preparation