2K Cluster Size for 10MB Fixed Disks under DOS 3.x Standard 10mb fixed disks formatted under DOS 3.0 & 3.1 utilize 4k clusters (i.e., the minimum space allocated to any file is 4096 bytes), while drives 20mb and larger utilize 2k clusters. At work, I use a PC with twin 10mb drives under DOS 3.1. Since I have a multitude of small files on these disks, the smaller allocation unit's space saving advantage far outweighs any theoretical disadvantage of additional overhead for DOS to handle the added allocation units. With the help of Bob Morse, Jim Gainsley, and the DOS Technical Reference, I was able to make the changes necessary to use 2k clusters on both of my 10mb drives. By following the step-by-step instructions below, you will be able to make the switch to 2k clusters yourself. The need for making a complete backup of all your files prior to attempting this procedure cannot be overephasized. You will need the following tools: (1) IBM PC-DOS version 3.1 (3.0 will work, but because of other bugs, 3.1 is strongly recommended). (2) A disk utility such as Norton's NU.COM, or equivalent. Most critical to the process is the sequence in which this procedure is attempted. Here is the 4k to 2k cluster procedure: (1) Do a complete backup of the drive, using your current version of DOS. (2) Cold boot DOS 3.1, and FDISK the drive to create a DOS partition. (3) Format the drive using the DOS format program. Don't use any parameters (no /s or /v). (4) Using your Norton (or whatever), select the boot sector and view it. See below for an explanation of the pertinent info in this sector. You should see a value of 08 for sectors per cluster. change this to 04. You should see a value of 0800 for sectors per fat. Change this to 1500. All changes to the fat sectors required for 2k clusters will be accomplished by the subsequent format (6,below). No other manual changes are required. A more detailed explanation of these two changes: The number of sectors per cluster would change from 08 to 04, since that's what this is all about. The sectors per FAT will change, in order to accomodate (1) the increased number of possible FAT entries, and (2) the increased size of each fat entry (new 16 vs. old 12 bits each). The value to use for a 10 meg & 2k clusters would be 21 sectors, or 1500 in hex word format. (5) Exit Norton and do a cold boot. This is critical, since the boot sector is read by DOS only once, at boot time, in order to build the BIOS Parameter Block. Having different info in the boot sector than what's in the memory-resident BPB will cause exceedingly flaky things to happen, as you can imagine. (6) Reformat the drive using the DOS program, using whatever switches that you desire (/s or /v). Format will not affect your changes to the boot sector. (7) Restore your files, remembering to use the new restore switch (/P) which prompts before restoring system files. If you restore an old version of COMMAND.COM, make sure to copy a 3.x version over it afterwards. You should now be operational again, with 2k clusters. -------------------- Example of first few bytes in the Boot Sector displayed in hex format, after formatting with DOS 3.1, and prior to 2k cluster size changes: EB299049 424D2020 332E3100 02080100 020002F3 50F80800 ^^ ^^^^ AA BB After the 2k cluster size changes: EB299049 424D2020 332E3100 02040100 020002F3 50F81500 ^^ ^^^^ AA BB Where the data elements directly above AA are sectors per cluster, and above BB are sectors per FAT. Further info on the entries in the boot sector entries used to build the BIOS Parameter Block can be found in the DOS 3.x Technical Reference, Page 3-22. Of course, I cannot warrant that this change will work for all controller/disk combinations, particularly for controllers and drives which are not 'XT clones' though it 'should work' for all drives compatible enough to work under DOS 3.x. Tom Tcimpidis ADDENDUM TO CLUSTER.TXT If you do not have Nortons Utilities the following procedure may be used instead of procedure (4) above. All of the other procedures are identical to the ones above. This procedure uses the IBM-DOS Supplemental Disk DEBUG.COM program. Listed below is a procedure to change sectors per cluster and sectors per FAT. A (*) indicates debug command response and a (-) indicates the operator entered command or response followed by a carriage return. With the IBM-DOS Supplemental Disk in drive a: A>debug Start debug **----- -l 0 n 0 1 Where: n=2 is drive c:, n=3 is d:, n= *--------- n=4 is e: etc. Loads address 0 drive n, sector 0 to sector 1. -e 0d Enters byte 0d, sectors per cluster. *---- -xxxx:000d 08.04 The 04, changes 8 sectors per cluster **************-- to 4 sectors per cluster. -e 16 Enters byte 16, sectors per FAT. *---- -xxxx:0016 08.15 The 15, changes 8 sectors per FAT to **************-- 15 hex sectors per FAT. -w 0 n 0 1 Where n is drive per above. Writes *--------- to address 0 on drive n, from sector 0 to sector 1. -q Quit debug, return to DOS. Continue *- with procedure (5) above. -------------------- On a 10 megabyte disk with 6,758,400 bytes used, changing to 2k clusters from 4k clusters saved 598,000 bytes. This is a six percent gain in usable disk space. Reference: PC WORLD, April 1986 page 341 and and also September 1986 page 297 for more information on changing cluster sizes on 10 and 20 megabyte drives. The April issue is the source of this debug procedure. M. Burd, 23 August 1986.