robin@medstar.UUCP (Robin Cutshaw) (05/03/85)
Here is the patch for the Xenix kernel hard disk table. Each table entry consists of 4 int (short) parameters. Entry 0 = # of cylinders, 1 = # of heads, 2 = # of sectors/track, and 3 = write precomp. Note that the the table as supplied has several differences to those in the ROM BIOS. Also, there is only space for 13 entries so if you have a drive type 14 you must patch another location and you won't be able to use DOS. There are three places that will have to be patched, /boot, /etc/badtrack, and /xenix. If you have a drive of type 4-8 you will somehow have to patch the floppy drive kernel /xenix.fd. This will be a trick because adb doesn't come with this distribution. The Original Table as supplied (/xenix) : diskinfo: 306 4 17 128 diskinfo+8.: 615 4 17 300 diskinfo+16.: 615 6 17 300 diskinfo+24.: 915 8 17 512 diskinfo+32.: 410 6 17 256 diskinfo+40.: 462 8 17 256 diskinfo+48.: 492 5 17 256 diskinfo+56.: 900 7 17 -1 diskinfo+64.: 900 15 17 -1 diskinfo+72.: 820 3 17 -1 diskinfo+80.: 855 5 17 -1 diskinfo+88.: 855 7 17 -1 diskinfo+96.: 306 8 17 128 diskinfo+104.: 0 24919 28274 28265 /* DO NOT PATCH THIS!!!!!! */ /********** START of PATCHES ************/ Patch #1 : First boot XENIX from the installation diskette and do a full install. Then cp /boot /boot-. (on the fixed disk) adb -w /boot $x 3f:1f0f?w 75## (## = number of heads) $q Patch #2 : This patch will patch the disk table in /boot. adb -w /boot 71:10356/w 940 10364/w 940 10370/w 512 10372/w 615 10374/w 4 10378/w -1 10380/w 462 10382/w 8 10388/w 733 10390/w 5 $q Patch #3 : This patches the disk table in /etc/badtrack. (They are for the whole table minus the extra entry that can't be added). cp /etc/badtrack /etc/badtrack- adb -w /etc/badtrack 71:28/w 940 36/w 940 42/w 512 44/w 615 46/w 4 50/w -1 52/w 462 54/w 8 60/w 733 62/w 5 $q Patch #4 : Patches to make it equivalent to the ROM BIOS (/xenix): adb -w /xenix - diskinfo+24/w 940 /* 915.= 940. */ diskinfo+32/w 940 /* 410.= 940. */ diskinfo+38/w 512 /* 256.= 512. */ diskinfo+40/w 615 /* 462.= 615. */ diskinfo+42/w 4 /* 8.= 4. */ diskinfo+46/w -1 /* 256.= -1. */ diskinfo+48/w 462 /* 492.= 462. */ diskinfo+50/w 8 /* 5.= 8. */ diskinfo+56/w 733 /* 900.= 733. */ diskinfo+58/w 5 /* 7.= 5. */ $q Patch #5 : apply patch #4 on floppy disk kernel /xenix.fd /******** End of Patches **********/ New Table Entries (as patched) : diskinfo: 306 4 17 128 diskinfo+8.: 615 4 17 300 diskinfo+16.: 615 6 17 300 diskinfo+24.: 940 8 17 512 diskinfo+32.: 940 6 17 512 diskinfo+40.: 615 4 17 -1 diskinfo+48.: 462 8 17 256 diskinfo+56.: 733 5 17 -1 diskinfo+64.: 900 15 17 -1 diskinfo+72.: 820 3 17 -1 diskinfo+80.: 855 5 17 -1 diskinfo+88.: 855 7 17 -1 diskinfo+96.: 306 8 17 128 diskinfo+104.: 0 24919 28274 28265 /* PATCH THIS AND DIE */ Questions, comments, bugs to me... -- ---- Robin Cutshaw Director of Systems Research, MedSTAR, Inc. ..{akgua,gatech,gacsr}!medstar!robin