[comp.os.minix] hard disks and Minix ST

mpsimon@phoenix.Princeton.EDU (M. Patrick Simon) (12/08/89)

In article <17411@rpp386.cactus.org> you (mark@rpp386.UUCP) write:
>...
>I just got Minix yesterday.  The ST documentation talks about certain
>drive partitions "/dev/hd?" (where ? stands for 1-3).  My problem is that
>I do not have that type of partition information in the Supra Format
>Utitlity.  Could someone tell me what I would need to do to give MINIX a
>10Mb partition on my hard drive?  At the current time, I am unfamiliar
>on how to dedicate a disk partition in such a way that MINIX can use it.
> 
>Also, a good source told me that I will have problems getting MINIX to 
>use my Supra drive because of sector sizes.  Does anyone know of a fix
>for this.  Thanks a lot. 

I have a hard disk from Toad Computers, which uses an ICD interface and ICD
software, hooked up to my ST, so I am not sure how much of my experience
will apply to your case. Assuming your hard disk is SCSI device 0,
controller 0, you should be able to get Minix to work without recompiling
the sources. You need to know what partition you want to devote to Minix.
If you don't know, and none of the Supra utilities will tell you how your
hard disk is partitioned, I suggest getting the January, 1989 issue of
STart Magazine, which has a partition lookup program by David Small and/or
Dan Moore. This program runs under GEM, and saved me alot of grief when
I was trying to hook up my hd to minix because the documentation that came with
my hd was incorrect about which SCSI device my drive was set up as.
     Once your hard disk is formatted, and you know what partition
you want to use, you need to "mkfs /dev/hd? NNNN", where NNNN is the
number of sectors in that partition divided by 2 (assumes 512 byte sectors),
e.g. NNNN = length of partition in kbytes (1 kbyte = 1024 bytes), and hd?
is hd1,2,3,or4 depending on whether you want to dedicate partition 1,2,3,or4.
The ICD formatting software automatically created 512 byte sectors (I would
assume this is standard for Atari ST hd's, but I could be wrong), and this
worked fine with Minix. If mkfs says it can't do what you ask, it probably
means that your hard disk is not SCSI device 0, but you should already know
whether that's true before you get to this stage (when you find out the
partition info, you should also find out what SCSI device and controller).
If your hd is
not SCSI device 0, controller 0, then you will have to re-compile the
Minix sources to allow for multiple hd's (change NR_DRIVES in kernel/stwini.c)
to be >= number of drives (each SCSI device counts as 2 drives because it
can have 2 controllers). There is also
a note in the ST Minix manual which modifies what I said about NNNN slightly,
so please check there before attempting mkfs.

>I hope I don't sound like a fool.

You don't. I had even more fun than you are going to because I needed to
recompile Minix from floppy to look for multiple hard disk drives. In
addition to the modification to stwini.c above, I also modified kernel/stdma.c
to have all the dmaxxxx subroutines' arguments explicitly declared. Other
useful changes on a multiple drive hd system include changing fs/main.c
constant RAM_IMAGE to your hd drive,controller # and changing subroutine
load_ram to default load the ram disk from hard disk. There are also some
modifications that need to be made to Makedev in /dev if you have multiple
drives or a drive other than SCSI 0, but these are fairly obvious from
the current entries in Makedev and the stwini.c source.

>Mark Lehmann

Good luck,
--Patrick Simon    mpsimon@phoenix.princeton.edu     12-7-89

# Standard disclaimer applies