[comp.os.minix] HELP!! Can't run on AT hard disk

martyl@rocksvax.UUCP (05/21/87)

HELP!!  I'm trying to make a  Minix file system for a hard disk on an IBM
PC AT (not compatible, a genuine leased Big Blue baby).

I've received the AT distribution from Prentice-Hall and it runs fine off
floppy disk.  Unfortunately I can't do anything useful in a reasonable way with
1 1.2 meg floppy and 1 360k floppy.

I totally messed up one hard disk playing with FDISK and diskfix to make 
non-Dos partitions for Minix -- and I thought it should be trivial to set up
a hard disk.  Well, anyway I was able to make non-DOS partitions.  I booted
up Minix, tried  "mkfs /dev/hdx nnnn" numerous times where x ranged from 0 to
5 and nnnn took a wide range of reasonable values.

I was able to get to various points in process of using the hard disk.  The 
most I could accomplish was to make the file system (mkfs), mount it, and
make a couple of directories or a small file (something of the order of 1 block).  When I tried to upload the floppy distribution disks onto hard I got:
	Can't reset Winchester errors
	Putblock failed (or something to that effect)

These happened at various times in the mkfs/mount/use process -- and the
disk runs fine under MS/DOS.  

I was running on a 6Mhz AT (old model) with a 10Mhz clock.  It's funny, since
Minix has no problems with the floppy drives (MSDOS does).  Reinserting the 
original crystal didn't fix a thing.  I spent about 5 hours last night
formatting hard disks, running fdisk, running Minix, barfing the hard disk
and trying again.  

This morning at work, I tried it on an 8Mhz model 339 AT.  It's doing the
same variety of weird things -- (4 Winchester wouldn't reset errors, followed
by Unrecoverable disk error).  In addition, on both systems, when I run
df /dev/hdx after I run mkfs, it occassionally comes up with reasonable 
information.

The DOS chkdsk program does find some bad media -- I'm not sure whether its
on the Minix partition or not.  I've definitely tried enough different
combinations of mkfs and partition sizes that it shouldn't be aproblem.
By the way, it seems running "mkfs /dev/hd0" blows away the partition table --
this was important since if you allocate the whole disk to Minix (which I tried)
you can't make a DOS partition or erase any other partitions.

I've pulled some of the Minix mkfs and at_wini sources onto an MS/DOS disk so
at least I can look at them. I'm kinda in a catch 22 situation -- it is really
too hard to figure out what's going on until I get the thing onto hard disk
and I can't get it onto hard disk (except under MS/DOS).  Any hints?

I may have missed some patches, but this would involve recompiling/relinking
the kernel (if my understanding is correct -- there's no way to substitute 
device drivers at runtime, is there?).  Also, if anyone has a collection of
Minix file system/disk debug tools which are runnable under MS/DOS, they 
would be appreciated.  I'm not really anxious to start porting the sources 
to another MSDOS compiler (I use Aztec C right now). Posting an ARC file of
Minix disk debug tools which run under DOS (like an intelligent FDISK utility)
wouldn't be a bad idea.

Anyone know what's going on?  At work, I'm using 6 different ATs for all
types of combinations of hardware.  Surely one of them should work.  I
really don't know whether its the controller, the media or the disk driver.

thanks,

marty leisner
xerox corp
leisner.henr@xerox.com (for mail notes)
martyl@rocksvax.uucp (for binaries/source/mail if all else fails)