Computer-Help.Net

October 22, 2004

Hard Drives, MS-Dos, and Other Filesystems

 
MS-Dos's hard disk parameters originated with the WD-1003 controller in 1984 which limited drives to 1024 cylinders x 16 heads x 63 sectors (10 bits, 4 bits, 6 bits, & 504MB). These values were the actual bit width of the hardware registers built into the controller chip and the O/S's, built in, hardware drivers.
 
The Int13 extensions include a fudge to allow the other 4 bits of the heads to be used for 1024 X 255 X 63 (8GB); a later revision  broke the 1024 cylinder barrier (I'll bet by using the other 2 bits in the sectors value) for 32GB, and the latest Int13x extensions themselves have recently changed to break the 137GB barrier.
 
Why this is important to understand, is that to ensure compatability with MS-Dos, we need to adhere to the rules established during its evolution. 
 
Fat 16 means there are two bytes per cluster in the allocation table, used by the O/S to link file segments together. MS-Dos 3.3 contains the original hardware limitations and its partitions will fail if the drive is over 504MB; but, MS-Dos 4, 5, & 6 can handle 2GB because they support the Int13 extensions.  
 
Fat32 in Windows 95 OSR2 doubles the number of bytes for each cluster in those same allocation tables, allows for a variable sized root directory, and adds two new partiton types which are Int13x compatable.
 
When creating MS-Dos compatable filesystems both the Int13 and filesystem rules apply. The first thing to change is the number of heads in the partition table and master boot records.  Using LBA mode in the system's rom BIOS before creating partitions is the simplest way to achieve this.
 
Unix, Linux, and several other operating systems have never suffered from these limitations because they simply passed the drive parameters to a single driver, which then handled all of the hardware itself; though several older versions did restrict the heads and sectors values within their drivers to the 16 & 63 defined in the orginal WD-1003.  Later versions removed those restrictions and now, too, support LBA translation which is also best set in the rom before partitioning.
 
If you feel that I need to add explanation, have further questions, or have any feedback, please contact me below.
 
Sincerely,

Davis M McCarn
Computer-Help.Net
184 Eaglecrest Drive
Matthews, NC 28104Mouse Copyright 2004 Davis M McCarn
(704) 882-7551 or
Email: davism@computer-help.net

Davis M McCarn 2004 All Rights Reserved