ATA Capacity Limitations

ATA interface versions up through ATA-5 suffered from a drive capacity limitation of about 137GB (billion bytes). Depending on the BIOS used, this limitation can be further reduced to 8.4GB, or even as low as 528MB (million bytes).

This is due to limitations in both the BIOS and the ATA interface, which when combined create even further limitations. To understand these limits, you have to look at the BIOS (software) and ATA (hardware) interfaces together.

Prefixes for Decimal and Binary Multiples

Many readers are unfamiliar with the MiB (mebibyte), GiB (gibibyte), and so on designations I am using in this section and throughout the book. These are part of a standard designed to eliminate confusion between decimal- and binary-based multiples, especially in computer systems.

Standard SI (system international or metric system) units are based on multiples of 10. This worked well for most things, but not for computers, which operate in a binary world where most numbers are based on powers of 2. This has resulted in different meanings being assigned to the same prefix

For example 1KB (kilobyte) could mean either 1,000 (103) bytes or 1,024 (210) bytes. To eliminate confusion, in December 1998 the International Electrotechnical Commission (IEC) approved as an international standard the prefix names and symbols for binary multiples used in data processing and transmission.

BIOS Limitations

Motherboard ROM BIOSs have been updated throughout the years to support larger and larger drives. These are when the limits were broken, such that BIOSs older than August 1994 are generally limited to drives of up to 528MB, whereas BIOSs older than January 1998 are generally limited to 8.4GB.

Most BIOSs dated 1998 or newer support drives up to 137GB, and those dated September 2002 or newer should support drives larger than 137GB. These are only general guidelines, though; to accurately determine this for a specific system, you should check with your motherboard manufacturer.

You can also use the BIOS Wizard utility, which will tell you the BIOS date from your system and specifically whether your system supports the Enhanced Hard Disk Drive specification (which means drives over 8.4GB). If your BIOS does not support EDD (drives over 8.4GB), the three possible solutions are:

  • Upgrade your motherboard BIOS upgrade to a 1998 or newer version that supports >8.4GB.

  • Install a BIOS upgrade card, such as the ATA Pro Flash or the Ultra ATA 133 PCI card.

  • Install a software patch to add >8.4GB support.

Of these, the first one is the most desirable because it is usually free. Visit your motherboard manufacturer's Web site to see whether it has any newer BIOSs available for your motherboard that will support large drives.

If it doesn't, the next best thing is to use a card such as the ATA Pro Flash from Micro Firmware or the Ultra ATA 133 PCI card from Maxtor. I almost never recommend the last solution because it merely installs a software patch in the boot sector area of the hard drive, which can result in numerous problems when booting from different drives, installing new drives, or recovering data.

CHS Versus LBA

There are two primary methods to address (or number) sectors on an ATA drive. The first method is called CHS (cylinder head sector) after the three respective coordinate numbers used to address each sector of the drive. The second method is called LBA (logical block address) and uses a single number to address each sector on a drive.

CHS was derived from the physical way drives were constructed (and is how they work internally), whereas LBA evolved as a simpler and more logical way to number the sectors regardless of the internal physical construction.

When reading a drive sequentially in CHS mode, the process starts with cylinder 0, head 0, and sector 1 (which is the first sector on the disk). Next, all the remaining sectors on that first track are read; then the next head is selected; and then all the sectors on that track are read—and so on until all the heads on the first cylinder are read.

Then the next cylinder is selected, and the sequence starts again. Think of CHS as an odometer of sorts: The sector numbers must roll over before the head number can change, and the head numbers must roll over before the cylinder can change.

When reading a drive sequentially in LBA mode, the process starts with sector 0, then read 1, then 2, and so on. The first sector on the drive in CHS mode would be 0,0,1, and the same sector in LBA mode would be 0.

As an example, imagine a drive with one platter, two heads (both sides of the platter are used), two tracks on each platter (cylinders), and two sectors on each track. We would say the drive has two cylinders (tracks per side), two heads (sides), and two sectors per track. This would result in a total capacity of eight (2x2x2) sectors.

Noting that cylinders and heads begin numbering from 0—whereas physical sectors on a track number from 1—using CHS addressing, we would say the first sector on the drive is cylinder 0, head 0, sector 1 (0,0,1); the second sector is 0,0,2; the third sector is 0,1,1; the fourth sector is 0,1,2; and so on until we get to the last sector, which would be 1,1,2.

Now imagine that we could take the eight sectors and, rather than refer directly to the physical cylinder, head, and sector, number the sectors in order from 0 to 7. Thus, if we wanted to address the fourth sector on the drive, we could reference it as sector 0,1,2 in CHS mode or as sector 3 in LBA mode.

CHS/LBA and LBA/CHS Conversions

You can address the same sectors in either CHS or LBA mode. The conversion from CHS to LBA is always consistent in that for a given drive, a particular CHS address always converts to a given LBA address, and vice versa. The ATA-1 document specifies a simple formula that can be used to convert CHS parameters to LBA:

LBA = (((CxHPC) + H)xSPT) + S – 1

By reversing this formula, you can convert the other way—that is, from LBA back to CHS:

C = int (LBA / SPT / HPC) H = int ((LBA / SPT) mod HPC) S = (LBA mod SPT) + 1

For these formulae, the acronyms are defined as follows:

LBA = Logical block address C = Cylinder H = Head S = Sector HPC = Heads per cylinder (total number of heads) SPT = Sectors per track int X = Integer portion of X X mod Y = Modulus (remainder) of X/Y

Using these formulas you can calculate the LBA for any given CHS address, and vice versa.