brown@nicmad.UUCP (09/05/85)
[Munch! Munch! Munch! That line was even tastier!!!] I guess that it comes in handy, running an IBM-PC BBS. That way I can get some things from there and pass them on to here. Anyway, a little while ago I put up a couple of things to do with DOS3.10 patches. Well, it has been put together in one text file. So, I am posting it to the net. The upgrade/change to the FAT table to make 10MB hard disks use 2K cluster sectors does indeed work. I have it on both of the 10MB drives that I am using. I do suggest that a tape backup system is used or it will take a lot longer to do this upgrade. The upgrade is fast and painless, but doing a floppy backup and restore is not. The CompuServe IBMPC SIG Users Group ------------------------------------ PATCHES FOR IBM DOS 3.1 ----------------------- ************************************************************************ Note: In the patches which follow, it is assumed the user is familiar with the use of DEBUG. The notation "xxxx" means "anything is ok". The notation <cr> means press Enter. ************************************************************************ FIXED DISK CLUSTER SIZE If you have a 10 Meg hard disk, the following information collated by Bill Higgins, provides for 2K clusters instead of the standard 4K clusters. Typically, you will free up about 10% of the disk space you are currently using. 2K Cluster Size for 10MB Fixed Disks under DOS 3.1 Standard 10mb fixed disks formatted under DOS 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. 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, SysOps Jim Gainsley, and Conrad Kageyama, 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. NOTE: THE FOLLOWING PROCEDURE WILL DESTROY ALL DATA ON THE FIXED DISK!!! 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 USS program, available on many BBS's), or equivalent. Note: You will not need this, if you use the Alternate Method in #4a below. 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, run FDISK to create or be sure that a DOS partition exists 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. See below for an explanation of the pertinent info in this sector. At location AA below, you should see a value of 08 which is the number of sectors per cluster. Change this to 04. At location BB below, you should see a value of 0800 which is the number of sectors per fat (in hex Word format). Change this to 1500. The results should appear as in CC and DD below. 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. -------------------- Example of first few bytes in the Boot Sector of the fixed disk, displayed in hex format, after formatting with DOS 3.1, and prior to 2k cluster size changes: (The bytes of interest are located at Boot sector Offsets 0Dh = Sectors per cluster, and 16h = Sectors per FAT.) EB299049 424D2020 332E3100 02080100 020002F3 50F80800 ^^ ^^^^ AA BB After the 2k cluster size changes: EB299049 424D2020 332E3100 02040100 020002F3 50F81500 ^^ ^^^^ CC DD Where the data elements directly above AA are sectors per cluster, and above BB are sectors per FAT. (4a) Alternate Method: If you would rather, and if you are familiar with the operation of Debug, the following method can be used. Under DOS 3.1, do: DEBUG -L 0 n 0 1 <cr> -E 0D <cr> xxxx:0D 08.04 <cr> -E 16 <cr> xxxx:16 08.15 <cr> -W 0 n 0 1 <cr> -Q where, n = the fixed disk drive as follows: If fixed disk is drive B then n=1 " C " n=2 " D " n=3 " E " n=4 NOTE: Be *really* careful when you do the L and W commands in the foregoing sequence. Would be best to check your work by doing DEBUG, then -L 0 n 0 1 <cr> then doing -D 0D L1 <cr> and -D 16 L1 <cr> making sure that the results are 04 & 15 respectively. Then exit by doing -Q ------------------- 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 which will be in 16-bit format instead of the former 12-bits. The value to use for a 10 meg & 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 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 info in the boot sector than what's in the memory-resident BPB will give UNPREDICTABLE RESULTS. The following is safest way to preceed. Please use it. (6) Reformat the drive using the DOS 3.1 FORMAT.COM, FORMAT C: /S (You may also include /V, if you wish to include a volume label.) DOS 3.1 FORMAT will NOT affect your changes to the boot sector. (This a change from DOS 3.0 FORMAT, which re-writes the boot sector.) (7) Restore your files, BEING SURE TO USE the RESTORE parameter, /P which prompts 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 info 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, Page 2-28. 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.1. Comments to: -- Bill Higgins [70575,307] CIS, IBMPC SIG -- ********************************************************** ENVIRONMENT SIZE Thanks to Bob Morse, the environment size can be patched as follows: DEBUG COMMAND.COM -E 0D11<cr> xxxx:0D11 0A.1E<cr> -W<cr> -Q<cr> (1E is for a 544 byte nominal size. Use 3C for a 1K size.) ********************************************************* SCREEN SCROLLING From Ward Christensen, the ANSI.SYS scrolling patches to disable the wait for retrace and the screen blanking have new addresses but they work just fine. Using DEBUG, proceed as follows: DEBUG ANSI.SYS -E 02E3<cr> xxxx:02E3 74.90 FB.90<cr> -E 02EA<cr> xxxx:02EA EE.90<cr> -W<cr> -Q<cr> ********************************************************** DISABLE EDLIN AUTOMATIC .BAK FILE CREATION On a BBS I found the patch from an unknown author to disable the automatic .BAK file when using EDLIN. Using DEBUG proceed as follows: DEBUG EDLIN.COM -E 0CD5<cr> xxxx:0CD5 56.41<cr> -W<cr> -Q<cr> ********************************************************** AUTOMATIC INSTALLATION OF PRINTER FOR DOS PRINT Also on a BBS I found the patch by an unidentified author to PRINT.COM to obviate the need to type the desired printer port. If the printer port is LPT1, then using DEBUG proceed as follows: DEBUG PRINT.COM -E 1788<cr> xxxx:1788 E8.90 CB.90 02.90<cr> -E 179A<cr> xxxx:179A CD.90 21.90<cr> -W<cr> -Q<cr> If the printer port is LPT2 then the following address must ALSO be modified as follows: -E 10CA 4 "LPT2" ********************************************************* DISABLE AUTOMATIC HEADER IN FIND.EXE OUTPUT The FIND program puts an automatic header ---------- filename in the output listing. To disable this header, patch FIND.EXE as follows: REN FIND.EXE FIND.TMP DEBUG FIND.TMP -E 0424<cr> xxxx:0424 03.2C<cr> -W<cr> -Q<cr> REN FIND.TMP FIND.EXE ********************************************************** PERMIT MORE THEN 10 MISMATCHES IN COMP.COM I have patched COMP.COM to permit 50 mismatches as follows: DEBUG COMP.COM -E 08E2<cr> xxxx:08E2 0A.32<cr> -E 0BF8<cr> xxxx:0BF8 31.35<cr> -W<cr> -Q<cr> ********************************************************** ECHO OFF I have patched COMMAND.COM to set the default to echo off to to obviate the need for the ECHO OFF and CLS statements at the beginning of a batch file. DEBUG COMMAND.COM -E 1967<cr> xxxx:1967 01.00<cr> -W<cr> -Q<cr> ----------------------- My thanks to Bob, Ward, and others for their patches. Comments to: -- Ted Eyrick [72446,317] CIS, IBMPC SIG -- Edited by: Jim Gainsley [76703,1007] (SysOp) IBMPC SIG CompuServe 8-9-85 -- Mr. Video {seismo!uwvax!|!decvax|!ihnp4}!nicmad!brown