Large Disk Drives >8.4Gb

[email protected]
Wed, 9 Dec 1998 14:15:18 -0600


Getting Beyond the ATA 8.4GB Limit  
Hello all,

Recently large ATA (EIDE) disk drives have been giving us quite some problems.
The following document from IBM is quite illuminating on the topic and I have
editted it to reflect the issues that we face when using these large disk drives
with Fermi Red Hat Linux.

The previous FAQ from Connie on how to install Fermi Red Hat Linux on large
disk drives is quite useful, but I should add a couple more ways to obtain the 
correct number of cylinders/heads/sectors to pass to the kernel (and hence 
'fdisk') at boot time.

An example:

Look at the documentation on the disk drive itself.  Usually, there is some
indication of the geometry of the drive on the case.  For instance, on my 
Quantum BigFoot TX they list the cylinders/heads/sectors of the drive like so:

12.0GB: 23361/16/63

Unfortunately, this exceeds the BIOS cylinder limit of 1024.  This means that
a kernel must reside within the first 1024 cylinders of a harddrive in order 
for the BIOS to be able to boot that kernel. But not to worry because the BIOS 
head limit is 255 so a translation can be performed like so:

		C*H*S = C'*H'*S'

which yields:

		23361*16*63 = 1465*255*63

You may notice that 1465 is still greater than 1024, however, passing this
disk geometry to the kernel allows for the user to place the kernel almost 
anywhere on the disk and its chances of being below the 1024 limit is much 
better.  Anyway, the Linux partition is usually going to be in the 1st or 2nd
partition on the drive which probably is within the 1024 boundary.  

When the LILO: prompt appears on the 'Welcome to Fermi Red Hat Linux!" screen 
enter this:

LILO:  linux hda=C',255,63

where C' is the number calculated above (or 1465 in this example).  You may now 
use either DiskDruid or fdisk to fully format your disk drive.

Another Example:

I also have an IBM Deskstar 16.8Gb drive which reports that it has a geometry
of 16383/16/63 which if you multiply it out equals 8.4Gb.  So, what's the 
problem here?  Well, 16383 is the largest 14 bit number allowed which is used
by the BIOS which I don't completely understand why this makes a difference
at this time.  But! there is another number that can be used and that is the
LBA number.  For an explanation of LBA, check out the  PC Guide page on LBA.  
The LBA number is the true number of 512 byte blocks, or sectors, 
on the disk.  To obtain the correct number of cylinders do this calculation:

			number of LBA sectors 
			--------------------- = C'
			     ( 255 x 63 ) 

and use this number as above at the LILO: prompt - 

LILO:  linux hda=C',255,63

And everything should work as advertised.

Here's that IBM document:




When the personal computer (PC) was first developed, designers had to decide how many bytes would be designated for addressing particular memory locations within the system, including hard drive memory. It was also necessary to specify how the address bytes would be structured to access that memory. Originally, these bytes were divided into cylinder, head, and sector (CHS) address locations that related directly to the physical layout of the hard drives. Unfortunately, the designers of the system BIOS (Basic Input/Output System) and the ATA (Advanced Technology Attachment) interface did not set up the total bytes used for addressing in the same manner, nor did they define the same number of bytes for the cylinder, head, and sector addressing. The differences in the CHS configurations required that there be a translation of the address when data was sent from the system (using the system BIOS) and the ATA interface. This is what caused the problems that were found at 528 MB and 4.2 GB, which limited systems to smaller capacity drives.

The new limitation involves the total addressing space that was defined for the system BIOS. Most PC systems are limited to accessing drives with a capacity of 8.4 GB or less (7.9 GB on some systems.) The BIOS's of these systems do not have adequate address locations to access more than 8.4 GB.

A solution to this problem requires updating the current system BIOS to one that supports the interrupt 13 extensions or patching the current BIOS with the extension support. In the future, all PC system BIOS's should support the interrupt 13 extensions, allowing systems to address drives of extraordinarily large capacities.

The current ATA interface uses 28 bit addressing which supports drives that are 2** X 512 bytes or 137 GB. Unfortunately, most system BIOS's use 24 bit addressing which only allows access to 2**24 X 512 bytes or 8.4 GB. (This number really multiplies out to be 8.6GB but because of the way the BIOS uses the bit, only 8.4 GB can be accessed.) When the system wants to read or write data to the disk, the BIOS has to use a software interrupt. The main interrupt that is used to access the disk drive is interrupt 13h. This interrupt was assigned 24 bits of addressing, which only allows the system to access 8.4GB on a disk drive. System designers were aware of this limitation and defined extensions for interrupt 13. This allows for a quad-word or 64 bits of addressing, which is equal to 2**64 X 512 bytes or 9.4 x 10**21 bytes. That is 9.4 Tera Gigabytes or over a trillion times as large as an 8.4 GB drive.
Very few systems built in 1997 (or before) properly support the BIOS interrupt 13 extensions. However, all major BIOS manufacturers are currently working on BIOS's that support the extensions. By mid 1998, most new systems should have this support. Systems without the support can be modified to use drives greater than 8.4 GB.
There are a number of things that can be done to update a system in order to allow the use of large drives.

The options available are:

1. Obtain a new version of BIOS that supports the interrupt 13 extensions from the system or BIOS manufacturer.

2. Load software on the system that links into the BIOS to add the interrupt 13 support. This is not necessary on Linux systems. Since kernel version 2.0.35 the OS can recognize and access an entire disk larger than 8.4Gb. This software is only for use on Windows-type systems.There are several vendors that offer software for this purpose. Ontrack's Disk Manager for IBM (version 9) can be downloaded at no charge from the following web site: http://www.storage.ibm.com/techsup/hddtech/welcome.htm

3. Use an intelligent host adapter whose BIOS supports interrupt 13 extensions. This adds the cost of additional hardware, but may be the best solution for certain systems. 

With the increase in disk drive size, there is another limitation that affects the user that cannot be corrected by updating the BIOS. This is due to an inherent limitation within the operating systems. The most widely used are Windows 3.x and Windows 95. Most versions of these operating systems only support a maximum partition size of 2.1GB. This means that drives over 2.1GB will have to be partitioned into several logical drives, C:, D:, and so on. 8.4GB drives will require at least 4 logical drives. Linux does NOT have a partition size limitation like Windows does.

Microsoft has provided extended file system support as a solution. They have increased the addressing bits in the File Allocation Table (FAT) from 16 bits (FAT16) to 32 bits (FAT32) which allows for much larger logical drive sizes, up to 2.2TB. Unfortunately, the new extended file system is only supported in the very latest versions of Windows 95, called OSR2.x. This release of the Windows operating system is only being offered directly through system manufacturers and is not sold to the general public for upgrading current systems.

To check if a version of Windows 95 supports the extended file system (FAT32), select:

-START
-SETTINGS
-CONTROL PANEL
-Double click on the SYSTEM icon
-Look under GENERAL
-If SYSTEMS PROPERTIES shows:

*4.00.950b -This version supports the extended file system (FAT32.)

*4.00.950 or 4.00.950a -This version only supports FAT16.

Windows 98 should be able to support FAT32 but this is dependent on how Microsoft intends to release it. Microsoft may choose to release a FAT32 version only to system manufacturers and offer a FAT16 version for sale to end users as a system upgrade.
The next limitation with the ATA interface should occur at 137 GB. (Some systems and operating systems may encounter other unforeseen limitations before this.) At 137 GB, the 28 bits of addressing on the ATA bus run out. Some possible solutions for this problem follow:

1. The ATA's Feature Register could be used to add an additional 8 bits giving 28+8=36 or 35.2 TB of addressable space.

2. The size of each sector could be increased. For example, a sector size of 4096 bytes would increase the maximum size of the drives to 2.2 TB.

3. The industry could switch to a completely different interface. The IEEE 1394 interface is the most likely candidate and may gain popularity before one of the other options needs to be implemented.



(c) International Business Machines Corporation 1998 
All Rights Reserved 
IBM is a registered trademark of the International Business Machines Corporation. Other product names are trademarks or registered trademarks of their respective companies.
References in this publication to IBM products, programs, or services do not imply that IBM intends to make them available in all countries in which IBM operates.