[comp.os.minix] hard disk problems on XT clone

watson@convex.UUCP (04/06/87)

I'm having some trouble with the minix hard disk driver. 
My system is an XT clone, but is compatible enough to run
venix (another version of unix) with it's own disk driver.
I have three partitions dedicated to venix, and one (#4)
for minix. I can ``dd'' a minix disk onto the minix partition,
and the minix hard disk file checker likes it just fine.

But when I boot minix and try to read or write the hard disk,
all I get is a hard error. I also note that one of the hard
disk select lights stays on all the time the minix kernel is
running.

My questions:
1. Has minix been tested in a two drive environment? (Both 10 Mb
   XT compatible).
2. If the hard disk file system checker runs ok, but minix doesn't,
   what is likely to be wrong?

Help, Andy, please... I only have one floppy!

lyo@cheviot.UUCP (04/15/87)

I am running minix on a machine with the following configuation:

	Machine: Ferranti PC860/XT
	Processor: 8086 at 4.77Mhz
	Hard Disk: Seagate 10Mb
	Controller: DTC-5150BX

Like many others, when I first tried to boot minix I received the
message "Winchester task got message from -1" - indicating a spurious
interrupt.  This was a surprise, as the heading at the top of wini.c
indicated that the driver should work with the DTC controller.

There was some hope however as I could receive "some" output from "od
/dev/hd0".  However, any attempt at making a file system on the hard disc
was doomed to failure.

I received the controller specification from DTC yesterday and on
inspection could not find any major flaws with the driver!  However, on
page 11 of the handbook there was a small note indicating that although
command bytes could be passed without handshaking, it was not recommended.

In fact the handbook indicates that the host interaction with the
controller should follow this sequence:

	1.  Output a byte to the contoller Select Port - WIN_SELECT = mode.
	2.  Wait for controller ready - WIN_STATUS == x0D.
	3.  Set up the control register - WIN_DMA = mode.
	4.  Output the command bytes with handshaking between i.e check
	    for ready bit of WIN_STATUS ( bit 0) after every byte.
	5.  Check for an erorr free completion.

The handshaking can be achieved with the inclusion in "com_out" - at line
548 of wini.c - of "if (i) hd_wait(1);" (it not being required for the
first byte).

One other discrepancy is in "win_result" lines 301 and 302 which my
manual suggests should be transposed.

After making these changes, recompiling the kernel and building a new
boot disc, the system came up without any complaints.  I made a minix
file system on /dev/hd1 (150 cylinders , 5099 blocks) and copied "/usr"
complete with subdirectories.  The hard disc did not perform
faultlessly however as during the copying of /usr/bin a series of error
messages ensued.  Rc was amended to mount /dev/hd1 on /usr and the
system booted OK.  During the boot the winchester was cleaned up from
the previosly mentioned failures - with "fsck" - and the transfer to
/usr/bin was completed without further failures.

This is an incomplete posting, I still have to find the cause of the
previously mentioned failures but I hope that this somewhat brief account
will encourage other clone owners with the same problem.