home *** CD-ROM | disk | FTP | other *** search
- 2K CLUSTERS WITH DOS 3.1
- Bill Higgins
- Compuserve IBM SIG
-
- The following text was uploaded to CompuServes IBM SIG on July 16, 1985, by
- Bill Higgins (70575,307) and later modified by Jim Gainsley (76701,1007),
- one of the SysOps of the IBM PC SIG. Anyone considering an upgrade to DOS
- 3.1, especially XT owners, should be interested in Bill's remarks on the
- efficient use of hard disk space. You must have DOS 3.1 to utilize the
- procedures outlined in the following text.
-
- If you have a 10 megabyte hard disk the following information permits you
- to use 2k clusters instead of the standard 4k clusters. Typically, you
- will free about 10% of the disk space you are currently using.
-
- Standard 10 megabyte fixed disks formatted under DOS 3.1 utilize 4k
- clusters (i.e. the minimum space allocated to any file is 4096 bytes),
- while drives 20 megabyte and larger utilize 2k clusters. I use a PC with
- twin 10 megabyte 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, Sysops Jim Gainsley and Conrad Kageyama and the
- DOS Technical Reference, I was able to make the changes necessarry to use
- 2k clusters on both of my 10 megabyte drives. By following the step-by-
- step instructions that follow, you will be able to make the switch to 2k
- clusters yourself.
-
- NOTE! THE FOLLOWING PROCEDURE WILL DESTROY ALL DATA ON THE FIXED DISC!
-
- You will need the following:
-
- 1) IBM PC-DOS version 3.1 (3.0 appears not to work).
-
- 2) A disk utility such as DISK REPAIR (a part of the IBM Professional DEBUG
- Facility), or DISMOD (a user supported program available on many BBS's), or
- equivalent. (NORTON Utilities is OK) You will not need this if you use
- the Alternate Methode in 4a.
-
- 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 fixed disk, using your current version of
- DOS.
-
- 2) Cold boot DOS 3.1, then run FDISK to create (or be sure there exists) a
- DOS partition on the fixed disk.
-
- 3) Format the fixed disk using the DOS 3.1 FORMAT.COM program. DO NOT use
- any parameters (no /S or /V).
-
- 4) Using your disk utility, select the boot sector and view it. At offset
- 0Dh, you should see the value of 08, which is the number of sectors per
- cluster. Change this to 04. (0Dh is decimal 13, which means the 14th
- byte, since counting starts with byte 0. Recall that each byte is
- represented by a hex pair.)
-
- At offset 16h, you should see a value of 0800, which is the number of
- sectors per FAT (in hex word format). Change this to 1500. Figure 1
- displays an example of the boot record (24 bytes) as it originally appears
- and the new boot record as it should appear once patched for 2k clusters.
-
- FIGURE 1.
- -------------------------------------------------------------------------
- Boot record before modification:
-
- EB299049 424D2020 332E3100 02080100 090002F3 50F80800
- ** ****
-
- Boot record after 2k cluster size changes:
-
- EB299049 424D2020 332E3100 02040100 020002F3 50F81500
- ** ****
-
- The data elements directly above the double ** are the number of sectors
- per cluster; the data elements directly above the four **** are the number
- of sectors per FAT.
- ------------------------------------------------------------------------
-
- All changes to the FAT sectors required for 2k clusters will be
- accomplished by the subsequent format in instruction 6 below. No other
- manual changes are required.
-
- 4a) Alternate Method: If you would rather, and if you are familiar with
- the operation of DEBUG, the following method can be used ('XXXX' means
- 'anything is okay' and <cr> means to press Enter.)
-
- Under DOS 3.1, do:
-
- DEBUG <cr>
- -L 0 n 0 1 <cr>
- -E 0D <cr>
- XXXX:0D 08.04 <cr>
- -E 16 <cr>
- XXXX:16 08.16 <cr>
- -W 0 n 0 1 <cr>
- -Q
-
- where n equals the fixed disk drive code, as follows:
-
- Drive designation n
-
- B 1
- C 2
- D 3
- E 4
-
- Note: Be really careful when you do the L and W commands in the foregoing
- sequence. It would be best to check your work by invoking DEBUG, then
- entering the commands:
-
- -L 0 n 0 1 <cr>
- -D 0D L1 <cr>
- -D 16 L1 <cr>
-
- making sure that the results are 04 and 15, respectively. Then exit with
- Q <cr>
-
- A more detailed explanation of these two changes: The number of sectors
- per cluster would change from 08 to 04, since that 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, which will be in 16 bit format instead of the former 12 bits. The
- value to use for a 10 megabyte disk and 2k clusters would be 21 sectors, or
- 1500 in hex word format (In this case the 15 is all that counts: 15 hex =
- 21 decimal.)
-
- 5) Exit the disk utility and do a COLD BOOT (turn the machine off, then
- back on) with DOS 3.1. 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 information in the boot sector from what's in the memory-
- resident BPB will give unpredictable results!
-
- The following is the safest way to proceed. Please use it.
-
- 6) Reformat the drive using DOS 3.1 FORMAT.COM.
-
- FORMAT C:/S
-
- (You may also include the /V, if you wish to include a volume label.)
-
- DOS 3.1 FORMAT will not affect your changes to the boot sector. (This is
- changed from the DOS 3.0 FORMAT, which re-writes the boot sector.)
-
- 7) Restore your files, being sure to use the RESTORE parameter, /P, which
- issues a prompt before restoring system files.
-
- WARNING! You must not allow the two system files, IBMBIO.COM and
- IBMDOS.COM to be restored, even if they are DOS 3.1! If you do, they will
- not be put in the proper locations and your fixed disk will not be bootable
- and you will have to reformat!
-
- Avoid restoring an earlier version of COMMAND.COM, but if you do restore an
- earlier version, nothing is lost; just be sure to copy a 3.1 version over
- it afterwards. You should now be operational again, with 2k clusters.
-
- Further information on the entries in the boot sector entries used to build
- the BIOS Parameter Block can be found in the DOS 3.1 Technical Reference
- Manual, page 2-28. Of course, I cannot warrant that this change will work
- for all controller/disk combinations, particularly for controllers and
- drivers that are not 'XT clones' though it 'should work' for all drives
- compatible enough to work under DOS 3.1.
-
- Reprinted by permission of the Capital PC Users Group (CPCUG). This
- article may not be distributed for personal gain and is intended to be
- used/distributed freely between PC users.
-