II.  Generalities


II.2  Hard disk capacity limitations

The Int 13h software interrupt

The software interrupt Int 13h, supports hard disk access commands that can be given to the BIOS, which then passes them on to the hard disk. Addressing of sectors is done by the use of 3-dimensional coordinate system. First two coordinates: a cylinder number and a head number, determine the track on the hard disk, and start from zero. The third one is the number of a sector on this track, and by convention, starts from one. The Int 13h interface allocates 24 bits for the specification of the sector coordinates, precisely:

This means that the BIOS can support disks containing up to approximately 16.5 million sectors, which at 512 bytes per sector yields a maximum of 7.875 gigabytes. Disks larger than this require either an operating system that totally bypasses the BIOS without using Int 13h or a BIOS and operating system supporting Int 13h extensions.

The 504 MB barrier

The most (in)famous hard disk barrier is the 504 MB limitation for standard IDE/ATA hard disks. It is alternatively referred to as the 504 MB or the 528 MB barrier, depending on whether binary or decimal megabytes are considered. Due to this barrier, a hard disk with a size over 504 MB will normally appear only as having 504 MB under some circumstances. This problem is a result of combining the geometry specification limitations of the IDE/ATA standard and the BIOS Int 13h standard.

The problem is that due to poor planning, the standards are not the same; they each reserve different numbers of bits for the geometry. In order to use an IDE/ATA hard disk with the standard BIOS disk routines then, the limitations of both standards must be taken under account, which means that only the smaller of each geometry number can be used. Here is how the two standards allocate bits for the geometry:


Table II.2.1: The number of bits used for the geometry specification of IDE/ATA and BIOS standards, and their combination.
Standard Bits For
Cylinder Number Head Number Sector Number Total Geometry
IDE/ATA 16 4 8 28
BIOS Int 13h 10 8 6 24
Combination 10 4 6 20

The maximum number supported for any parameter is 2^N, where N is the number in the table above. So this means that under IDE/ATA, 2^16 or 65,536 cylinders are supported. We can then multiply all the figures together to get a total number of sectors supported, and then multiply that by 512 bytes (per sector) to get the maximum supported capacity:


Table II.2.2: The maximal capacity supported by IDE/ATA and BIOS standards, and their combination.
Standard Maximum Cylinders Maximum Heads Maximum Sectors Maximum Capacity
IDE/ATA 65,536 16 256 128 GB
BIOS Int 13h 1,024 256 63 7.88 GB
Combination 1,024 16 63 504 MB

Note: The BIOS Int 13h limit for sectors is 63, and not 64, because by convention sectors are numbered starting from 1, not 0.


The 504 MB figure is just 1,024 * 16 * 63 * 512; the problem is the combination of the limitations of the two standards. Due to the 16-head limitation of IDE/ATA, no IDE hard disk is ever specified with more than 16 logical heads; they always have a large number of cylinders instead. The problem is that when you put the disk in a machine with a standard, non-translating BIOS, it can't see more than 1,024 of the cylinders. There are several different ways that the system may react to a drive too large for it to handle.

The normal solution to the 504 MB problem is to use BIOS geometry translation. Software drive overlays will also avoid the problem, but at a cost.

The 7.88 GB barrier

This barrier, sometimes just called the "8 GB barrier", is based on a BIOS limitation. When the standard of Int 13h was planed capacity of hard disks did not exceed 10 MB, and nobody assumed use of disks grater than 8 GB. Today, it is a problem.

After reading previous two sections the source of that barrier is clear. The software interrupt Int 13h simply does not allow to pass more than 24 bit long arguments to the hard disk via the BIOS. This results in unbreakable barrier of 7.88 GB, which is the product of 1,024 cylinders, 256 heads, 63 sectors and 512 bytes per sector. Unbreakable, if standard interrupt Int 13h is used. This includes all IDE/ATA disks and SCSI disks. By obvious reason there is no use in applying BIOS geometry translation to get around this problem.

The only way to get around the 7.88 GB barrier is to make a break with the past and change the way hard disk accesses are done. One of the solution is so-called Int 13h extensions which allows much larger capacity drives to be used. Using this method requires consistent BIOS and operating system support for the extensions.

Another way to work around this barrier is Direct Disk Access, in other word bypassing the BIOS. More advanced operating systems take away responsibility for dealing with the hard disk from the BIOS and employ their own access routines for the hard disk, which are faster and more efficient than using the default BIOS code. This is mainly done for performance reasons (cf. [Kozierok]).


Note: Besides barrier described in this section, there are yet two another for IDE/ATA hard disk drives, called: 1.97 GB and 2 GB. More detailed discussion of this topic can be found in [Kozierok].


Note: Some older SCSI host adapters did have problems that made them unable to access hard disks over 1 GB in size, or some other arbitrary limits. Present host adapters should not have these limitations.


Note: FAT-16 file system is restricted to 2 GB per partition. It is a file system issue, not a hardware or BIOS one.


Note: Solaris 7 and earlier can access up to first 1024 cylinders (ca. 8 GB) on IDE/ATA hard disks.