Xref: utzoo comp.sys.att:12090 comp.os.msdos.programmer:4360 comp.unix.internals:2461 comp.unix.sysv386:6489 Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!rphroy!caen!uwm.edu!rutgers!psuvax1!hsdndev!cmcl2!panix!zink From: zink@panix.uucp (David Zink) Newsgroups: comp.sys.att,comp.os.msdos.programmer,comp.unix.internals,comp.unix.sysv386 Subject: Re: Dos and unix on same Disk Message-ID: <1991Mar30.224536.603@panix.uucp> Date: 30 Mar 91 22:45:36 GMT Followup-To: comp.os.msdos.programmer,comp.unix.sysv386 Organization: PANIX Public Access Unix, NYC Lines: 83 I had said: > People keep mentioning the problem with DOS 4 and SCO etc., but so > far nobody has mentioned the base problem here. Me and my big mouth! Well, after further research I say: SCO only works with DOS 3.? partitions. These partitions are, of course, all small (under the 32M is it? limit). It will recognize up to 3 such partitions. For best results, these should be the first 3 partitions on the disk. It is probably also wise to make the DOS partitions before making the unix partitions. Format them first to be safe. SCO will recognize a DOS 4.0 partition if it is small and the first partition on the disk. It can be spoofed to recognize up to three DOS 4 (or mixed 4 & 3) partitions if they are all small. Granularity is also an issue. I had assumed DOS had the granularity issues, but it would appear that SCO has it. On the disk I tested the granularity appeared to be one side. It might actually be 16K, as these were the same on the disk in question. Partitions should be organized so that they are divided on granularity boundaries in order for SCO to access them. I don't know if DOS will let you format them not on said boundaries, and I'm not about to try it and find out, thankew ;) To spoof SCO into recognizing second and subsequent DOS 4 partitions: DOS 4 adds a header to the beginning of each partition that is I believe 1 side in size (Might be 32 sectors . . .). DOS reads the Side/Cylinder/Sector table to find the partitions, SCO uses the Absolute sector numbers in the partition table. Therefore, using an appropriate tool (We used NU the norton utility, doing it with NU described in [1]), view the partition table and add one side's worth of sectors to the absolute sector number (remember to subtract the same amount from the size field). Save the changes and SCO should be able to see your partitions. Finally, a few years ago I was involved with a number of Xenix/DOS systems, and we had serious problems with corrupted Xenix Filesystems if we installed Xenix first. I still don't know why this was. Also note that Unix uses BIOS for boot (like it really has a choice). Therefore, any bootable partition must lie within the first N sectors (where N is I believe one million). Note that all that really matters is that /unix lie within the BIOS reachable cylinders. So you can install it and have it work perfectly. Then you or some software product you install (Or some new drivers) relink the kernal, and the new kernal's disk blocks are scattered about . . . . So make the entirety of your root unix partition BIOS reachable! (Usually only an issue if your disk is > 500 M.) -- David Zink david@jyacc.com (Work) zink@panix.uucp (Play) [1] Using NU to spoof SCO: Start up NU, (these are menu choices) Explore Disk, Choose Item, Absolute Sector, Drive C: (Or whatever), Side 0, Cylinder 0, Sector 1, # of Sectors 1 (return), Edit/Modify. This should bring you into the partition table editor. NU mysteriously calls absolute sectors relative sectors. The first Partition should start on Side 1, Cylinder 0, Sector 1. This places it exactly one side from the beginning of the disk. Consequently, in the relative sectors field will be the number of sectors on a side. Remember, the first Dos 4 partition works fine. Usable partitions will probably be labelled 'DOS-16'. If one is labelled 'BIG-DOS' then it will be (mostly) unusable [2]. Scoot over with the arrow keys to the relative sector for the second and/or third DOS-16 partition, and add the number of sectors in a side to that number. Subtract that same value from the # of sectors field and hit return. NOTHING WILL HAPPEN. But, as you exit from NU it will suddenly ask you if you wish to save the changes. (Get cold feet and say no; grumble under your breath;) you should now be able to access the partitions from unix. Do 'dosdir /dev/hd03' remember that the partitions under Unix are numbered in the reverse order from NU or DOS. [2] Accessing BIG-DOS partitions from SCO: Can't be done, except of course that it can, sort of, if you are careful. SCO only cares that the blocks actually accessed are within the first 32K. Therefore, for a one time only thing, it is possible to use a typical disk-compactor or optimizer to force all the files to the start of the partition. Then read-only access is fairly safe. If your compactor will let you place the files you want near the front, then you are in good shape. But don't be surprised if things on the SCO side core-dump a lot. P.S. Since there is a lot of overhead to running multiple partions under DOS, and since we don't need to transfer files that much, we always configure a DOS-16 partition at the start of the disk to use as a transfer area, followed by a BIG-DOS partition, followed by the unix partition(s). --DZ