[comp.os.minix] Hard Disk Problems with Ver 1.2.0

wall-rt@cscosl.ncsu.edu (Richard Todd Wall) (02/23/90)

     I've been having Many Many problems with getting my Hard Disk
to work with Minix version 1.2.0.  I have a 15 meg. Hard Drive 
(306 cyl. 6 heads)..  I'm running it as a second hard drive, i.e.
dev/hd5 hd6 hd7 hd8 hd9.  That stuff is all set up correctly because
I can use that statement in ~~ out count=100 whatever, anyway that
works with out any errors.  I rebuild my kernel and my boot disk 
with the change in the wini.c file.  I changed the Heads declaration
to 6 instead of 4.  I set up 2 partitions, 1 - 1 meg. partition and
1 - 14 meg. partition.  When I do mkfs for hd6 as 240 block that seems
to work. (How do I know??  Doesn't error up.)  When I do mkfs for
hd7 with 14000 blocks or even 10000 blocks it give some kind of putchar
error.  I try to mount hd6 and that doesn't work either.  Do I need to
recompile mkfs and change some line to tell the number of heads???
What's going on??????
     The first time I posted this message I got a lot of "me too" replys
so if someone would please clear up this problem, I would be very
grateful.....     

     Thanks........
 
o o ______           _     _____  _  _ o o          mcnc!bacchus!beretta!todd
' '   /       /   / ' )   /      // // ' '    or    wall-rt@cscosl.ncsu.edu
     / ______/ __/   / / / __.  // //   
   _/ (_) (_/_(_/_  (_(_/ (_/|_</_</_               Durham, North Carolina

Peter_Van_Epp@cc.sfu.ca (02/24/90)

If this is an xt system (you don't say!) then in order to use hd6 et al you need
to also indicate that there are two hard disks in xt_wini.c and then recompile.
As I recall the same thing happened to me test appeared to work on hd6 but mkfs
died with errors. Hope this helps.

SHARKEY@OSU-20.IRCC.OHIO-STATE.EDU (Scott A. Sharkey) (02/26/90)

I believe (because I had the same problem before rearranging my system so that
minix was on drive 1 and DOS on drive 2) that there are some problems in the 
code that reads the partition table off the drives.  I don't remember for 
sure, but I think the bug is that minix ALWAYS reads the partition table off
drive 1, no matter what.  But I "fixed" it by making a very small DOS 
partition on C:, which basically booted drive D: for DOS, and a larger
minix partition on C.  So, take a look at the code which reads partition
tables.  -Scott

king@hpfcdj.HP.COM (Mike King) (03/01/90)

If you are using the at_wini.c disc driver in a version of 1.2 MINIX
then you probably have the same problem I just came across.

In at_wini.c there is a routine called copy_prt.  This routine copies
the partition table for a hard disc from an internal buffer into
a table that the wini driver uses in accessing the disc.  Note that
the block 0 of the disc, which contains the partition table, has all ready
been read into an internal buffer.

I found a bug in the copy_prt routine.  This may or may not be your
problem.  I don't know if the 1.2 copy I have had been hacked up
by someone else before I got it.

Notice the change is just multiplying the variable by 5, i.e 
in two places replace drive with drive*5.

The following is a diff of the old at_wini.c and the fix I put in.  This is
in the copy_prt routine in that file.

	FROM THE AT_WINI.C and the fixed AT_WINI.C
	------------------------------------------
               
509c509
< 	wn = &wini[i + drive + 1];
---
> 	wn = &wini[i + drive*5 + 1];
519c519
<   sort(&wini[drive + 1]);
---
>   sort(&wini[drive*5 + 1]);




Hope this fixes the problem,

Mike King

R&D Hardware Lab
Hewlett Packard - Graphics Technology Division
Fort Collins, Colo.
303-229-3989