[comp.os.minix] DOS and Minix partitions

kduling@nmsu.edu (Kevin Duling) (05/03/91)

   I'm having some rather serious problems between my Minix and DOS partitions.
First, let me say what I'm doing and then everyone can yell at me and tell me 
what stupid thing(s) I'm fudging.
   I've got a 32 Meg Seagate 138R harddrive which fdisk reports to have 939 
cylinders and 17 sectors.  I set part. 1 to 10M (10641k) and set that to Minix.
That's cylinders 0 through 312, btw.  Then I set part. 2 to 313 through 938
and made that my DOS partition.  I set it active, and wrote it.
   Ok...next I spent 4+ hours installing and testing Minix.  Everything works
great.  Then I switched over to DOS and formatted that partition, restoring my
files.  At this point I did some cleaning and purging of directories.  When I 
was done, I ran PCTools' Compress and Mirror to save my FAT.
   When I booted Minix next time, the whole fs was destroyed.  fdisk still 
reported that I had my partitions, and DOS ran just fine...but Minix was
trashed.
   The next time I tried, I removed all the partitions, formatted all 32M,
booted Minix from floppies and remade my partitions.  Then I formatted my DOS
partition, restored all the files (I use PCTools here, too), and backed up
both the FAT and the partition table with Mirror.
   I installed Minix again, from mkfs to setup_move.  It tested fine and 
it seemed to be perfect (I didn't run fsck at this point, tho).  I shut it down
and *tried* to boot DOS.  "Missing Operating System" is what I got.  Ok...I
ran Mirror to see what was wrong and it told me that my FAT was damaged.  So
I restored it.  Mirror ran, but it didn't fix anything.  I didn't get a 
'missing OS' message this time....I didn't get anything.  The machine was VERY
hung.  I quickly booted Minix to see if it was ok.  fsck barfed errors all over
the screen.
   I've owned this drive for 3 years, it has 0 bad sectors, and has *NEVER*
given me trouble.  So what's wrong?

--
 -=*=-=*=--=*=-=*=--=*=-=*=--=*=-=*=--=*=-=*=--=*=-=*=--=*=-=*=--=*=-=*=--=*=-
Kevin J. Duling                     UNIX                       kduling@nmsu.edu
New Mexico State University        VM/CMS               oprkjd@nmsuvm1.nmsu.edu
Computer Center/Large Systems       VMS                    CC4831@vaxa.nmsu.edu
 -=*=-=*=--=*=-=*=--=*=-=*=--=*=-=*=--=*=-=*=--=*=-=*=--=*=-=*=--=*=-=*=--=*=-

tgcpwd@rwb.urc.tue.nl (Wim van Dorst) (05/03/91)

In article <1193@opus.NMSU.Edu> kduling@nmsu.edu (Kevin Duling) writes:
> I'm having some rather serious problems between my Minix and DOS partitions.
> [stuff deleted]
> I've got a 32 Meg Seagate 138R harddrive which fdisk reports to have 939 
> [elaborate problem description deleted]

You have found the symptom of "wrong number of heads" diagnosis. I had the
same problem and found the solution.

I have an ST225 HD with four heads, and an OMTI controller for it. The
xt_wini driver asks the controller the disk parameters, and the OMTI 
controller says: two heads (and more of course). The answer it gives is
quite acceptable to Minix, which starts using the first two heads, but
using for the first 1 MByte you write twice the total amount of disk space
(2 MB thus) as half of it is not used. When you do a mkfs of say 10MB the
end of that fs will be on the 20thMB, somewhere in another partition
perhaps, it even may be in DOS as Minix doesn't care. That's what happened.

Now the solution is to find the proper set of disk parameters in the 
controller and use that. If your controller doesn't know about the proper
set of disk parameters, such as the OMTI controller (stupid thing), then
you have to find a suitable one, and hardcode the others parameters. That
was what I did for my HD. I have a patch of this available if you'll need
it. I posted it in the beginning of this year, so it may be in the archives
somewhere ftb'able.

If you want more information: drop me a line.
Met vriendelijke groeten, Wim 'Blue Baron' van Dorst.

-- 
---------------------------------------------------------------------
Blue Baron = Wim van Dorst, Voice (+31) 074-443937, (+31) 02152-42319
(-:       baron@wiesje.hobby.nl           tgcpwd@urc.tue.nl       :-)
---------------------------------------------------------------------

kduling@nmsu.edu (Kevin Duling) (05/07/91)

  I guess I wasn't quite clear enough in my earlier posting, so I'll try again.
I'm having serious problems with partitioning my harddrive to hold both Minix
and DOS.
  I'm trying to run Minix 1.5 on a Tandy 1000 SX (8088 processor) with a 32 Meg
Seagate 138R drive that has a Super Bios II formatter (Copywrite Western 
Digital Corp., 1988).  It has 939 cyl's, 4 heads, and 17 sectors.  I'm 
partitioning the drive with 10Megs for Minix and 20Megs for DOS. 
  I've tried using both vanilla xt_wini.c provided with PH 1.5 and xt2_wini.c
from plains.nodak.edu.  With both programs, after I install Minix and try to
install DOS, I find bits and pieces of Minix in my DOS partition.  Conversely,
if I install DOS first, then Minix, I find corrupted DOS files.  I just can't
get Minix to stay in its own partition.
  Several people have mailed me saying that the problem was that xt_wini
was finding the wrong number of heads.  The pre-menu message that xt2_wini 
spits out (and quickly clears) shows that it finds that I have 4 heads on my 
drive.  It also displays my partition data, which seems to be correct.
  Now, I've got to get this running soon or my wife is going to kill me.  She's
getting understandably frustrated that she can't use Fontasy and Quattro Pro
under DOS for 2 days at a time...and I'm getting VERY tired of restoring.
HELP!!

--
 -=*=-=*=--=*=-=*=--=*=-=*=--=*=-=*=--=*=-=*=--=*=-=*=--=*=-=*=--=*=-=*=--=*=-
Kevin J. Duling                     UNIX                       kduling@nmsu.edu
New Mexico State University        VM/CMS               oprkjd@nmsuvm1.nmsu.edu
Computer Center/Large Systems       VMS                    CC4831@vaxa.nmsu.edu
 -=*=-=*=--=*=-=*=--=*=-=*=--=*=-=*=--=*=-=*=--=*=-=*=--=*=-=*=--=*=-=*=--=*=-

overby@plains.NoDak.edu (Glen Overby) (05/07/91)

In article <1217@opus.NMSU.Edu> kduling@nmsu.edu (Kevin Duling) writes:
>  I'm trying to run Minix 1.5 on a Tandy 1000 SX (8088 processor) with a 32 Meg
>Seagate 138R drive that has a Super Bios II formatter (Copywrite Western 

You have to enable the AUTO_BIOS option of both xt_wini and xt2_wini (this
option should be set in <minix/conf.h> around line 40-something) and the
controler should work like a charm (mine does).

Your problem comes from the WD controler writing the disk geometry on the
primary boot sector, just in front of the partition table.  Without
AUTO_BIOS set, both wini drivers assume that they should retrieve parameters
out of ROM, where there are some conservative parameters for 10MB drives.
-- 
		Glen Overby	<overby@plains.nodak.edu>
	uunet!plains!overby (UUCP)  overby@plains (Bitnet)

hall@marigold.cs.odu.edu (Randy Hall) (05/08/91)

In article <1217@opus.NMSU.Edu> kduling@nmsu.edu (Kevin Duling) writes:
>I'm trying to run Minix 1.5 on a Tandy 1000 SX (8088 processor) with a 32 Meg
>Seagate 138R drive that has a Super Bios II formatter (Copywrite Western 

A friend of mine installed minix on his tandy and had to change some jumppers.
First, the hatd drive controller uses sector translation to make the computer
think it has 17 sectors instead of 26 sectors.  Second, I think that the tandy
uses the IQR normaly for the HD for video sync.  (at least on the TX)  You
need to disable the video sync and set the HD controller to use that 
standard IRQ.  After these hardware changes were made, use the universal
boot disk to get started (BIOS DRIVER)

Sorry for not being able to give any of the details but I wasn't the one who
did the installation.  I think he got all of his information from the tandy
technical reference manual.


-- 

                                   Randy Hall
                                   hall@cs.odu.edu

dperks@hobbit.gandalf.ca (Dave Perks) (05/08/91)

In <1193@opus.NMSU.Edu> kduling@nmsu.edu (Kevin Duling) writes:

>   I'm having some rather serious problems between my Minix and DOS partitions.
>   ... I've got a 32 Meg Seagate 138R harddrive which fdisk reports to have 939 
>cylinders and 17 sectors.  I set part. 1 to 10M (10641k) and set that to Minix.
>That's cylinders 0 through 312, btw.  Then I set part. 2 to 313 through 938
>and made that my DOS partition.  I set it active, and wrote it.
>   Ok...next I spent 4+ hours installing and testing Minix...
>   When I booted Minix next time, the whole fs was destroyed.  fdisk still 
>reported that I had my partitions, and DOS ran just fine...but Minix was
>trashed.

    I had the same problem, with DR-DOS 5.0. For some reason it masks off the
high order bit of the partition type field, so the Minix type 0x81 looks
like 0x01 -- a normal MS-DOS partition. DR-DOS uses all DOS-type partitions on
all hard drives, so the first partition (Minix!) was C: and the second (DOS)
was D:.

    To work around, I gave Minix the end of the disk instead of the beginning
and everything worked okay, except that I had to be careful not to mess up the
bogus D: partition from the DR-DOS.

    I finally worked up a patch to the BIOS portion of DR-DOS (IBMBIO.COM or
IO.SYS -- I can't remember which *-DOS uses which name) that deletes the masking
of the high order bit. It's at home and I'm not, and I wouldn't really want to
distribute it anyway in case it has previously unrevealed side effects ;-O

--dave perks, dperks@boromir.gandalf.ca