Proper setup and formatting are critical to a drive's performance and reliability. This section describes the procedures used to format a hard disk drive correctly. Use these procedures when you install a new drive in a system or immediately after you recover data from a hard disk that has been exhibiting problems. The three major steps in the formatting process for a hard disk drive subsystem are as follows:
Low-Level FormattingAll new hard disk drives are low-level formatted by the manufacturer, and you do not have to perform another LLF before you install the drive. In fact, under normal circumstances, you should not ever have to perform a low-level format on an ATA or SCSI drive. Most manufacturers no longer recommend that you low-level format any ATA type drive. This recommendation has been the source of some myths about ATA. Many people say, for example, that you can't perform a low-level format on an ATA drive, and that if you do, you will destroy the drive. This statement is untrue! What can happen with some of the earliest ATA drives is that you might lose the optimal head and cylinder skew factors that were set by the manufacturer for the drive, as well as the map of drive defects. This can have a negative effect on the drive's performance, but you can still reliably use the drive. Note that all drives that internally use a zoned recording (where there is a variable number of sectors per track internally) are immune to any problems due to low-level formatting because the actual sector marks can't be rewritten. This includes pretty much all modern ATA drives made in the last 12 years. However, sometimes you must perform a low-level format on an ATA or a SCSI drive. The following sections discuss the software you can use to do this. SCSI Low-Level Format SoftwareSCSI drives also come preformatted, and unless there is a problem with the drive, you will not have to perform this operation yourself. If you do want to low-level format a SCSI drive, you must use the LLF program provided by the manufacturer of the SCSI host adapter. The designs of these devices vary enough that a register-level program can work only if it is tailored to the individual controller. Fortunately, all SCSI host adapters include low-level format software, either in the host adapter's BIOS or in a separate disk-based program. The interface to the SCSI drive is through the host adapter. SCSI is a standard, but no true standards exist for what a host adapter is supposed to look like. This means that any formatting or configuration software is specific to a particular host adapter. Note Notice that SCSI format and configuration software is keyed to the host adapter and is not specific in any way to the particular SCSI hard disk drive you are using. Because of differences in how various SCSI host adapters view the contents of a SCSI hard disk, if you move a SCSI hard disk containing data to a different SCSI host adapter, the data on the hard disk might not be recognized. ATA Low-Level Format SoftwareATA drive manufacturers have defined and standardized extensions to the original WD1002/1003 hard disk controller card to AT-bus (ISA) interface, which is known as the ATA (AT Attachment) interface. The ATA specification provides for vendor-unique commands, which are manufacturer proprietary extensions to the standard. To prevent improper low-level formatting, many of these ATA drives have special codes that must be sent to the drive to unlock the format routines. These codes vary among manufacturers. If possible, you should obtain LLF and defect management software from the drive manufacturer; this software usually is specific to that manufacturer's products and often is model specific. Check the brand and model number of your hard disk to determine the utility program you need. Most ATA drives are protected from any alteration to the skew factors or defect map erasure because they are always in a translated mode internally. Zoned bit recording drives are always under translation and are fully protected. Most ATA drives have a custom command set that must be used in the format process; the standard format commands defined by the ATA specification usually do not work, especially with intelligent or zoned bit recording ATA drives. Without the proper manufacturer-specific format commands, you can't perform the defect management by the manufacturer-specified method, in which bad sectors often can be spared. Most manufacturers supply low-level format programs for their drives. Here are a few examples:
You should try the manufacturer-specific format programs first. They are free, can often work at a lower level, and can handle defects in ways that the more generic ones can't. If formatting software is not available from your drive's manufacturer, I recommend Disk Manager by Ontrack and the Micro-Scope program by Micro 2000. Another excellent, inexpensive, general-purpose PC hardware diagnostic that includes low-level format capability is the Hitachi (formerly IBM) Drive Fitness Test (DFT) program. The Drive Fitness Test program works on non-Hitachi and non-IBM drives as well and performs a detailed and thorough test of your hard drive. I recommend this as one of the best general-purpose drive test programs on the market because it can do a fairly thorough test in nondestructive mode. It performs an LLF (destructive) only on IBM- and Hitachi-brand drives. You can download DFT from the Hitachi site listed previously. Note Although Ontrack Disk Manager can be purchased in a "generic" version that works with any manufacturer's hard drives, brand-specific OEM versions are often available free of charge on the utility disks or CD-ROMs shipped with new retail-packaged hard disk drives. You should also check your drive maker's website for updated versions of Disk Manager. These OEM versions are designed to check for a particular brand's drive firmware and do not work on any brand other than the one for which they are modified. Nondestructive FormattersGeneral-purpose, BIOS-level, nondestructive formatters, such as Calibrate (older Symantec Norton Utilities) and SpinRite (Gibson Research), are not recommended in most situations in which a real LLF is required. These programs have several limitations and problems that decrease their effectiveness; in some cases, they can even cause problems with the way defects are handled on a drive. These programs attempt to perform a track-by-track LLF by using BIOS functions, while backing up and restoring the track data as they go. These programs do not actually perform a complete LLF because they do not even try to low-level format the first track (Cylinder 0, Head 0) due to problems with some controller types that store hidden information on the first track. These programs also do not perform defect mapping in the way standard LLF programs do, and they even can remove the carefully applied sector header defect marks during a proper LLF. This situation potentially enables data to be stored in sectors that originally were marked defective and might actually void the manufacturer's warranty on some drives. Another problem is that these programs work only on drives that have already been formatted and can format only drives that are formattable through BIOS functions. Note SpinRite is useful for recovering data found on drives with read errors because of its thorough method of repeatedly rereading the errors and analyzing the results to reconstruct the missing data. A true LLF program bypasses the system BIOS and sends commands directly to the disk controller hardware. For this reason, many LLF programs are specific to the disk controller hardware for which they are designed. Having a single format program that will run on all types of controllers is virtually impossible. Many hard drives have been incorrectly diagnosed as being defective because the wrong format program was used and the program did not operate properly. Drive PartitioningPartitioning a hard disk is the act of defining areas of the disk for an operating system to use as a volume. When you partition a disk, the partitioning software writes a master partition boot sector at Cylinder 0, Head 0, Sector 1the first sector on the hard disk. This sector contains data that describes the partitions by their starting and ending cylinder, head, and sector locations. The partition table also indicates to the ROM BIOS which of the partitions is bootable and, therefore, where to look for an operating system to load. The FDISK program is the accepted standard for partitioning hard disk drives for use with all operating systems up through Windows Me. Windows 2000 and XP use a similar command-line program called DISKPART, or you can partition and format hard disks with the Disk Management tool. All versions of Windows starting with Windows 95 can also partition and format the drive using the SETUP program for installing the OS. These programs are included with your operating system, and although they might have the same name and basic functions with any OS, you should typically use the tools that specifically came with your OS. Partitioning prepares the boot sector of the disk in such a way that the FORMAT program or the Windows SETUP format utility can operate correctly. Partitioning also enables various operating systems to coexist on a single hard disk. No matter which operating system you use, it should come with an FDISK, DISKPART, or SETUP program that can be used to partition the drive. Note Because FDISK, DISKPART, and SETUP depend on BIOS information about the hard disk to determine the size and drive geometry of the hard disk, having correct BIOS settings saved in the BIOS Setup is vital to the correct operation of these programs. If a 100GB hard drive is defined in the BIOS as a 100MB hard drive, for example, all these programs will see is 100MB. With any version of Windowsas with MS-DOSFDISK or other disk preparation tools enable you to create two types of disk partitions: primary and extended. A primary partition can be bootable but an extended partition can't. If you have only a single hard disk in your system, at least part of the drive must be prepared as a primary partition if you want to start your computer from the hard disk (and who doesn't?). A primary partition is seen as a single volume or drive letter (C: on one-drive systems), whereas an extended partition acts as a sort of logical container for additional volumes (drive letters D: and beyond). A single extended partition can contain a single volume (also referred to by FDISK as a logical DOS drive) or several volumes (logical DOS drives) of various sizes. Don't get hung up on the fact that FDISK calls partitions "DOS" partitions or "DOS" drives. This is true even though the operating system you are installing is Windows 95, 98, Me, NT, 2000, XP, Linux, and so on. Depending on the version of Windows in use (and with any version of MS-DOS), you might need to subdivide a hard drive through the use of FDISK. The original release of Windows 95 and all MS-DOS versions support a file system known as FAT16, which allows no more than 65,536 files per drive and a single drive letter or volume size of no more than 2.1GB. Thus, a 10GB hard disk prepared with MS-DOS or the original Windows 95 (or 95A) must have a minimum of five drive letters and could have more (see Figure 12.7). Figure 12.7. Adding a hard drive above 2.1GB in size to an MS-DOS or original Windows 95A computer forces the user to create multiple drive letters to use the entire drive capacity. The logical DOS drives are referenced like any other drive, although they are portions of a single physical hard disk.
Another reason for subdividing a single drive into multiple volumes is increased data security. For example, PowerQuest (the creator of PartitionMagic) suggests a three-volume partitioning scheme that looks like this:
In this example, primary and extended partitions would be assigned as shown here:
If a catastrophic failure to the disk structure wipes out C: or D:, drive E:which contains the datais usually still intact. This method also makes backing up the data easier; just set the backup program to back up all of E:, or all the changed files on E:. Note Although external USB and IEEE 1394a drives are normally preformatted and partitioned to allow immediate use, you can normally use FDISK/FORMAT or Disk Management to change the partitions and file system used on the drive. See the external drive's instruction manual or the drive vendor's website for details. Large Hard Disk SupportIf you use the Windows 95B or above (Win95 OSR 2.x), Windows 98, Windows Me, or Windows 2000 versions of FDISK with a hard drive greater than 512MB, FDISK offers to enable large disk support. Choosing to enable large disk support provides several benefits:
However, keep in mind that all disk operations must be performed through an operating system with FAT32 support (Windows 95B or later, Windows 98, Windows Me, or Windows 2000). If you have old MS-DOS games or applications that are bootable, you won't be able to access a FAT32 volume unless you replace the DOS version on the disk with the DOS included on Win95B or Windows 98. This normally can be done by using the SYS A: command from the \Windows\Command folder. Another option is to use the Windows Startup menu in Win95B or Win98 (press F8 as Windows starts to load) and select Command Prompt to get to a FAT32-capable DOS. On the other hand, you can select Start, Shutdown, Restart the Computer in MS-DOS Mode from the Windows desktop. A drive prepared with the large hard disk support (FAT32) option enabled can still be partitioned into primary and secondary partitions with FDISK, as with FAT16 for the data-security reasons listed earlier. Another type of file system is NTFS, which is supported by only Windows NT, Windows 2000, and Windows XP. This is a high-performance file system with additional security and networking features. NTFS was revised to NTFS5 in Windows NT 4.0 with Service Pack 4 and later, as well as Windows 2000 and Windows XP. Note that Windows 9x can't read NTFS partitions, and Windows NT can't read FAT32 partitions. Windows 2000 and Windows XP, however, can handle both FAT32 and NTFS. Assigning Drive Letters with FDISKFDISK can be used in many ways, depending on the number of hard drives you have in your system and the number of drive letters you want to create. With a single drive, creating a primary partition (C:) and an extended partition with two logical DOS drives within it results in the following drive letters:
Most people think that a second physical drive added to this system should have drive letters that follow the E: drive. However, you must understand how drive letters are allocated by the system to know how to use FDISK correctly in this situation. Table 12.1 shows how FDISK assigns drive letters by drive and partition type.
How does this affect you when you add another hard drive? If you prepare the second hard drive with a primary partition and your first hard drive has an extended partition on it, the second hard drive takes the primary partition's D: drive letter. This moves all the drive letters in the first hard drive's extended partition up one drive letter. In the first example, a drive is listed with C: (primary partition), D:, and E: (extended partition volumes) as the drive letters (D: and E: were in the extended partition). Table 12.2 indicates what happens if a second drive is added with a primary partition and an extended partition with two volumes (same setup as the first drive).
After adding the second drive, the original drive letters D: and E: have now become E: and F:. The primary partition on the new drive has become D:, and the extended partition volumes on the second drive are G: and H:. Confused? Well, you better not be or you'll find yourself deleting or copying data to or from the wrong drive. This principle extends to third and fourth physical drives as well: The primary partitions on each drive get their drive letters first, followed by logical DOS drives in the extended partitions. One way to effect this is to partition additional drives with only extended partitionsin other words, do not create primary partitions on them. That enables the new drive's partitions to be seen only as additional letters, and the letters used by the first drive's partitions to remain unchanged. If you're adding a drive to your system, you should now understand why preparing that second, third, or fourth drive with a primary partition is a bad idea. If you're installing an additional hard drive (not a replacement), remember that it can't be a bootable drive. And if it can't be bootable, there's no reason to make it a primary partition. FDISK allows you to create an extended partition using 100% of the space on any drive. Table 12.3 shows the same example used in Table 12.2 with the second drive installed as an extended partition.
When a new drive is added with only extended partition volumes, you can see that the original drive letters remain undisturbed. This arrangement is much easier to understand, and it prevents accidents with data because of drive letters changing. This operating system behavior also explains why some of the first computers with ATA-based (ATAPI) Iomega Zip drives had the Zip drive as D:, with a single hard disk identified as C: and E:. The Zip drive was treated as the second hard drive with a primary partition. Subsequently, Iomega changed the Zip drive format and driver so that the Zip disk is recognized as an extended partition at the end of the drive letter chain. Running FDISKWhen you run newer versions of FDISK, the first thing that happens is you are prompted with the following: Do you wish to enable large disk support (Y/N)...........? [Y] If you answer Yes to this question, FDISK creates FAT32 volumes for all volumes created that are larger than 512MB. Answering No to this question forces FDISK to create only FAT16 volumes, which are limited to a 2GB maximum size and waste more space on the disk due to larger cluster sizes. Normally, in a modern system you would answer Yes, allowing the use of FAT32. After answering the question, FDISK shows a menu similar to the following: Current fixed disk drive: 1 Choose one of the following: 1. Create DOS partition or Logical DOS Drive 2. Set active partition 3. Delete partition or Logical DOS Drive 4. Display partition information 5. Change current fixed disk drive Enter choice: [1] Option 5 is shown only if FDISK detects more than one drive on your system (if more than one is entered via your BIOS Setup). In that case, FDISK defaults to the first drive, and via option 5 you can cause FDISK to work with any of the other hard disks on the system. To create partitions, you select option 1. If the drive is already partitioned, however, you can use option 4 to display the current layout of the drive. After selecting option 1, the menu changes to enable you to create primary or extended partitions on a drive as follows: Create DOS Partition or Logical DOS Drive Current fixed disk drive: 1 Choose one of the following: 1. Create Primary DOS Partition 2. Create Extended DOS Partition 3. Create Logical DOS Drive(s) in the Extended DOS Partition Enter choice: [1] The rules require you to create a primary partition first on the boot drive, but on a secondary or nonboot drive, you can create just an extended partition if you choose. So, if you are partitioning the first drive in a system and it will be bootable, you would choose option 1. At this point, you are prompted to decide whether you want to use the maximum available size for a Primary DOS Partition. If you say Yes and you're using FAT32, the primary partition uses the entire drive. Conversely, if you say Yes and you did not enable large drive support (meaning you are using FAT16), the partition uses the entire drive or 2GB, whichever is smaller. If you decide to create a primary partition that is not the full drive, you should go back through the menus and create an extended partition using the rest of the drive, and then further divide it into logical drives. Normally, I recommend making the primary partition the full size of the drive, keeping all of the drive as one letter. But there are various reasons you might want to split the drive into multiple partitions, such as for different operating systems, different file systems, applications, and so on. After all the partitions are created, the final operation is to make one of them active (bootable), which is option 2 from the main FDISK menu. Typically, the only one that can be active is the primary partition. After that is done, all FDISK operations are complete, and you can exit the program. When exiting FDISK after making partition changes, the system must be rebooted before these changes will be recognized. After rebooting, you must then high-level format each of the volumes with the operating system FORMAT command, which then allows the operating system to store files on them. The C: volume usually must be formatted with the system files, although when you install Windows via the Windows Setup command, it detects whether the system files are present and offers to install them for you. Drive Partitioning and Formatting with Disk ManagementEven though Windows 2000 and Windows XP have a very powerful command-line tool called DISKPART that provides FDISK-like capabilities, along with additional options useful for working with advanced disk structures such as RAID arrays and dynamic disks, most Windows 2000 and Windows XP users utilize the GUI-based Disk Management component of the Microsoft Management Console to perform hard disk partitioning and formatting when installing a new hard disk on an existing system. As with FDISK, you can select the type of file system you want to use, but the following differences exist between FDISK and Disk Management:
To use Disk Management to partition a new hard disk in Windows XP, do the following:
No rebooting is necessary, and the color-coded legend at the bottom of the Disk Management display helps you track the status of the disk preparation process. Drive Partitioning with Aftermarket UtilitiesAlternative partitioning programs such as PartitionMagic by Symantec and Partition Commander by V-Communications enable you to take an existing hard drive and perform the following changes to it without loss of data:
Note I still recommend FDISK, DISKPART, Disk Management, or SETUP be used for initial partitioning and setup of any drive (these utilities destroy existing data), but these aftermarket utilities can be very useful for reconfiguring a system that is already partitioned. Although the program recommends a full backup before starting, I've used these utilities many times to turn a single "big drive" into two or more drive letters in less than 10 minutes. Performing the same task with backup software and FDISK/FORMAT can take several hours because you must back up your existing drive, remove existing partitions with FDISK, create new partitions with FDISK, restart your computer, format the new drives, and reload your operating system and your backup. High-Level (Operating System) FormattingThe final step in the installation of a hard disk drive is the high-level format. Similar to the partitioning process, the high-level format is specific to the file system you've chosen to use on the drive. On Windows 9x and DOS systems, the primary function of the high-level format is to create a FAT and a directory system on the disk so the operating system can manage files. You must run FDISK before formatting a drive. Each drive letter created by FDISK must be formatted before it can be used for data storage. As you learned in the section "Drive Partitioning and Formatting with Disk Management," Windows 2000 and Windows XP perform the high-level format with the New Partition Wizard. Usually, you perform the high-level format with the FORMAT.COM program or the formatting utility in Windows 9x/Me Explorer. FORMAT.COM uses the following syntax: FORMAT C: /S /V This command high-level formats drive C:, writes the hidden operating system files in the first part of the partition, and prompts for the entry of a volume label to be stored on the disk at the completion of the process. The FAT high-level format program performs the following functions and procedures:
Now, the operating system can use the disk for storing and retrieving files, and the disk is a bootable disk. During the first phase of the high-level format, the program performs a marked defect scan. Defects marked by the LLF operation show up during this scan as being unreadable tracks or sectors. When the high-level format encounters one of these areas, it automatically performs up to five retries to read these tracks or sectors. If the unreadable area was marked by the LLF, the read fails on all attempts. After five retries, the DOS FORMAT program gives up on this track or sector and moves to the next one. If an area remains unreadable after the initial read and five retries, it is marked in the FAT as a bad cluster. Note Because the high-level format doesn't overwrite data areas beyond the root directory of the hard disk, using programs such as Norton Utilities to unformat the hard disk that contains data from previous operations is possible, provided no programs or data has been copied to the drive after high-level formatting. Unformatting can be performed because the data from the drive's previous use is still present. If you create an extended partition, the logical DOS drive letters found there need a simpler FORMAT command because system files aren't necessaryfor example, FORMAT D:/V for drive D:, FORMAT E:/V for drive E:, and so on. FDISK and FORMAT LimitationsThe biggest problem with FDISK is that it is destructive. If you change your mind about disk structure, you must back up your system and start over again. That alone is cause for using FDISK with care, but here are other limitations you should keep in mind:
Although Disk Management in Windows 2000 and Windows XP does a better job than FDISK/FORMAT of avoiding drive letter conflicts with existing drives, it's still a destructive process if you need to change your disk partitions, and it has no provision for migrating data. For these reasons, many drive vendors offer some type of automatic disk installation software with their hard drives. These routines can make the task of disk migration a fast, easy, and reliable operation. Typical features of automatic disk installation programs include the following:
The two major vendors in the automated disk-utility business are Ontrack Data Recovery, Inc., and StorageSoft (now a part of Phoenix). These companies sell their disk-installation products to OEM hard drive vendors for use with particular brands of drives. They also sell to the public "generic" versions that can be purchased for use with any brand or model of hard disk. Table 12.4 provides a basic overview of the most popular disk-installation programs.
Disk Manager and EZ-Drive are DOS-based utility programs, whereas DiscWizard, MaxBlast, and Disk Manager version 4.x offer a Windows-like interface. Seagate's DiscWizard and MaxBlast actually analyze the system, ask the user questions about the intended installation, and prepare a customized procedure based on the user's responses. OEM versions of disk-installation programs are available from the drive makers' websites; retail versions of Disk Manager v4.x usable with any combination of drives can be purchased from retail stores or at the vendor's online store. |