DOS 3.10 CLUSTER SIZE CHANGE - 10/15 MB DRIVES DOS 3.10 formats 10- and 15 MB drives using a 4K cluster size. The reasoning behind this scheme is to keep the size of the file alloca tion table (FAT) to a minimum. The problem with this scheme is its inherent waste of disk space; no matter how small a file is, it will take up space in 4K increments. 20 - and 30 MB drives are not affected, as DOS formats them using a 2K cluster scheme. This document deals with changing the 10- and 15 MB formats to a 2K format. The table below shows the specifications of DOS-standard format 10- and 15 MB drives: 10 MB 15 MB ================================================================= Cylinders 305 305 Surfaces 4 6 FAT Size, in Sectors 8 12 Directory Size, in Sectors 32 32 Root Directory Entries 512 512 Cluster Size, in Sectors 8 8 Number of Clusters 2587 3882 Data Space, in K-bytes 10348 15528 FAT Entry Size, in Bytes 3 3 ================================================================= The values that change are the FAT size and the cluster size. The FAT entry size was probably the main reason DOS' designers kept the cluster size at 4K for version 3.10. This remarkable scheme encodes 341 cluster entries into each 512 byte FAT sector. While it is difficult to decode a FAT just by looking at it, this scheme saves space, espe cially on floppy disks. The one major drawback of this encoding scheme is that no more than 4096 clusters may be represented by it. When you change the above values, for both sizes of drives, you will increase the number of clusters over 4096, forcing DOS to adopt a new 4-byte FAT entry size, allowing only 255 entries per FAT sector. The savings come in space and performance. Since most hard disk controllers' internal buffers are only 2K to begin with, your drive will be opera ting at peak efficiency. The slow-down will come when DOS requests to read the FAT, which is marked by a rapid blinking of the drive "active" light. The new changes produce this table: 10 MB 15 MB ================================================================= Cylinders 305 305 Surfaces 4 6 --> FAT Size, in Sectors 21 31 Directory Size, in Sectors 32 32 Root Directory Entries 512 512 --> Cluster Size, in Sectors 4 4 * Number of Clusters 5170 7758 * Data Space, in K-bytes 10340 15516 * FAT Entry Size, in Bytes 4 4 ================================================================= --> You Change * Change as a result  PROCEDURE -> MAKE A BACKUP OF ALL YOUR FILES ON YOUR FIXED DISK! <- You will need a sector editor such as PC-Tools. The values to be changed reside in the Boot Record in the first sector of the disk. As the system initializes, it reads in the boot sector of the hard disk to determine its format structure. The fol lowing table describes in detail the boot record: Offset Length Description ===================================================================== 3 8 bytes System ID (e.g. DOS 3.10) 11 1 word Bytes per Sector (i.e. 512, hex 0200) --> 13 1 byte Sectors per Cluster 14 1 word Reserved Partition Sectors (1 or 17) 16 1 byte Number of FAT Table Copies (2) 17 1 word Number of Root Directory Entries 19 1 word Total Number of Sectors 21 1 byte Format ID (hex F8 for fixed disks) --> 22 1 word Number of Sectors in FAT 24 1 word Number of Sectors per Track 26 1 word Number of Surfaces 28 1 word Number of Special Reserved Sectors ===================================================================== --> You Change Load in the boot record (logical sector 0) and have a look. Make sure the disk has been previously formatted under DOS 3.10. If not, re-format the disk under version 3.10 and continue from here. Next, locate the above offsets in the boot record and make the necessary changes according to the following table (note: all values are in hex notation) : FROM TO 10 MB 15 MB 10 MB 15 MB ====================================================================== Sectors per Cluster 08 08 04 04 Number of Sectors in FAT 08 0C 15 1F ====================================================================== Once you have made the changes and you have updated the disk, reboot the system from a floppy containing the DOS 3.10 operating sys tem. The system will initialize the hard disk under your new format. Re-format the hard disk. After you restore your backed-up files, you will notice a marked increase in the amount of free space. You should increase the number of buffers in your config.sys file to 30 or 35 to accommodate the larger FAT. Note that the DOS program FDISK will destroy any changes made to the boot record, as will any low-level format program, such as the one built into the IBM Advanced Diagnostics. James Knauer 7/86  CHG10.COM Not all computer users with fixed disks for their PC's have access to a program, such as PC-Tools, that allows operations on bytes or words in a specified sector within a fixed disk's boot record. For that matter, some users may be rather hesitant about trying such a critical modification even if the software for disk sector modification is available. CHG10 handles the modification of a 10 mb fixed disk's boot record with little or no user intervention. (15 mb fixed disk users see below.) CHG10 provides a little elementary error checking and will NOT modify any fixed disk unless the proper values are found. I have used CHG10 to alter the configuration of two 10 mb fixed drives without problems. Modification using CHG10: 1. BACKUP YOUR FIXED DISK!!!! (Using the "R" option, my rudimentary testing indicated the changes could be undone--before the disk was formatted--without loss of data. But why take chances?) 2. Type the following instruction and press the ENTER key: CHG10 d: /M where "d:" is the disk drive id. If the disk has already been modified, the original configuration may be restored by replacing "/M" with "/R". (Only one option--the first--is checked and acted upon.) 3. Re-boot the system with from a floppy in drive A. 4. Format the modified fixed disk using the DOS FORMAT program. 5. Restore your files from the backup diskettes or tape. Transformation of CHG10 to CHG15: 1. Type the following statement and press the ENTER key: COPY CHG10.COM CHG15.COM (In other words, make a copy of the CHG10 program.) 2. Type the following statements, one at a time and press the ENTER key after each statement. (The interested reader may consult the DOS 3.1 Manual, Chapter 10, for more information on DEBUG.) DEBUG CHG15.COM E 104 08 00 0C 00 04 00 1F W Q (The source code for CHG10 is also included in the ARC file for those who prefer source code modification--and have an assembler.) 3. Following the instructions listed under "Modification Using CHG10", modify your fixed disk. CHG10 Messages and Errors: Format: CHG10 d: /{M|R} The drive id or option is incorrect or missing. Use correct format. The fixed disk drive must be other than A or B. The option field must be EITHER "M" (to Modify) or "R" (to Revert). Altered--re-boot, re-format, and reload! The fixed disk has been modified. Continue with step 3 under "Modification using CHG10". Sectors in FAT: Expected nn, Found nn Sectors Per Cluster: Expected nn, Found nn "nn" is a base 10 value. The "Expected nn" is what CHG10 expected to find, "Found nn" is the value actually found (assuming the least significant byte is < 100d). The disk was probably formatted under an earlier version of DOS. After backing up the disk (assuming you did not already do so), format the disk using the DOS 3.1 FORMAT program and try again. THE DISK HAS NOT BEEN MODIFIED BY CHG10!!! Notes: CHG10 has been tested only on two 10 mb fixed disk drives. No testing has been done on a 15 mb or greater drive. Users of the ENABLE package (The Software Group) may NOT want to convert their drive(s) as the windowing feature tends to go wild. Limited testing with single window programs (public domain, user supported, or locally written) have shown no problem. John D. Tucker 7/86