[comp.os.minix] Extra drives/controllers in Minix 1.5.10.3 ST

david@doe.utoronto.ca (David Megginson) (04/23/91)

I have two hard drives hooked up to my Mega 2: a Megafile 30 (#0) and
an ICD FA*ST 80 (#1). I can use either drive with with Minix 1.5.10.3 ST
when it is the only drive connected to the computer, but I have not
managed to use both of them together. I have read the introductory
comments in stwini.c, but I'm afraid I still don't know what minor device
numbers to pass to mknod. There are two separate drives with ID #'s
0 and 1, each with its own controller. Thank you for ANY help.


David Megginson
-- 
////////////////////////////////////////////////////////////////////////
/  David Megginson                      david@doe.utoronto.ca          /
/  Centre for Medieval Studies          meggin@vm.epas.utoronto.ca     /
////////////////////////////////////////////////////////////////////////

ralf@ptavv.ka.sub.org (Ralf Wenk) (04/24/91)

In article <1991Apr22.171444.832@doe.utoronto.ca>
david@doe.utoronto.ca (David Megginson) writes:
> I have two hard drives hooked up to my Mega 2: a Megafile 30 (#0) and
> an ICD FA*ST 80 (#1). I can use either drive with with Minix 1.5.10.3 ST
> when it is the only drive connected to the computer, but I have not
> managed to use both of them together. I have read the introductory
> comments in stwini.c, but I'm afraid I still don't know what minor device
> numbers to pass to mknod. There are two separate drives with ID #'s
> 0 and 1, each with its own controller. Thank you for ANY help.

I use two 20 MB HD's with a SH205 controller and a 240 MB HD with an
ICD Advantage+. So the configuration is mainly the same. One drive at
the SH205 and the IDC drive are dedicated for MINIX. All you have to
do is:

Change in /usr/include/minix/config.h NR_DRIVES to 3 (even if you
have only two HDs.

> /* define the number of hard disk drives on your system */
> /* (assuming 2 drives/controller) */
> #define NR_DRIVES	   3	/* typically 0 or 1 */

Create at least the following special files in /dev:

First drive on controller 0:
                              MAYOR NINOR 
brw-------  1 root     root       3,   0 Sep  2  1990 hd0a
brw-------  1 root     root       3,   1 Sep  2  1990 hd0b
brw-------  1 root     root       3,   2 Sep  2  1990 hd0c
brw-------  1 root     root       3,   3 Sep  2  1990 hd0d
brw-------  1 root     root       3,   4 Sep  2  1990 hd0e
brw-------  1 root     root       3,  13 Sep  2  1990 hd0n
Second drive on controller 0: (your system did not need them)
brw-------  1 root     root       3,  16 Sep  2  1990 hd1a
brw-------  1 root     root       3,  17 Sep  2  1990 hd1b
brw-------  1 root     root       3,  18 Sep  2  1990 hd1c
brw-------  1 root     root       3,  29 Sep  2  1990 hd1n
First drive on controller 1:
brw-------  1 root     root       3,  32 Sep  2  1990 hd2a
brw-------  1 root     root       3,  33 Sep  2  1990 hd2b
brw-------  1 root     root       3,  34 Sep  2  1990 hd2c
brw-------  1 root     root       3,  35 Sep  2  1990 hd2d
brw-------  1 root     root       3,  36 Sep  2  1990 hd2e
brw-------  1 root     root       3,  45 Sep  2  1990 hd2n
Character special files uses the same mayor,minor numbers:
crw-------  1 root     root       3,  16 Sep  2  1990 rhd1a
crw-------  1 root     root       3,  17 Sep  2  1990 rhd1b
crw-------  1 root     root       3,  18 Sep  2  1990 rhd1c
crw-------  1 root     root       3,  29 Sep  2  1990 rhd1n
crw-------  1 root     root       3,  32 Sep  2  1990 rhd2a
crw-------  1 root     root       3,  33 Sep  2  1990 rhd2b
crw-------  1 root     root       3,  34 Sep  2  1990 rhd2c
crw-------  1 root     root       3,  35 Sep  2  1990 rhd2d
crw-------  1 root     root       3,  36 Sep  2  1990 rhd2e
crw-------  1 root     root       3,  45 Sep  2  1990 rhd2n

Recompile and link a new system. Reboot and mount the MINIX
partitions. That's it.

-- 
-- 
Ralf Wenk -- ralf@ptavv.ka.sub.org

Martin Sckopke <X913%DMAFHT1.BITNET@cunyvm.cuny.edu> (04/24/91)

On Mon, 22 Apr 91 17:14:44 GMT David Megginson said:
>I have two hard drives hooked up to my Mega 2: a Megafile 30 (#0) and
>an ICD FA*ST 80 (#1). I can use either drive with with Minix 1.5.10.3 ST
>when it is the only drive connected to the computer, but I have not
>managed to use both of them together. I have read the introductory
>comments in stwini.c, but I'm afraid I still don't know what minor device
>numbers to pass to mknod. There are two separate drives with ID #'s
>0 and 1, each with its own controller. Thank you for ANY help.
>
Perhaps you read that I encountered similar problems while trying to
bring up a SQ555 under Minix. Here is what I have done:
Minor device no.: 0-15 for HD 0 Controller 0
                 16-32 for HD 1 Controller 0
                 33-47 for HD 0 Controller 1 ...
So I used 34 and 35 for the first and second partition on the second
drive, and it worked - at least for normal (cp, mv, open, close write)
access. But there still were some problems with fsck, readall and such.
But there is a patch from Frans Meulenbroeks relative to 1.5.10.3.
Since some more people seem to have difficulties, I post it here once
again, just to increase bandwidth.

                                       ! This space intentionally
       Martin Sckopke (X913@DMAFHT1)   !
                                       !    left blank.

#!/bin/sh
# This is a shell archive (shar 3.41)
# made 10/18/1990 07:35 UTC by meulenbr@cstw68
# Source directory /vol/minix/frans
#
# existing files will NOT be overwritten unless -c is specified
#
# This shar contains:
# length  mode       name
# ------ ---------- ------------------------------------------
#    316 -rw-r--r-- device.cdiff
#
# ============= device.cdiff ==============
if test -f 'device.cdiff' -a X"$1" != X"-c"; then
	echo 'x - skipping device.cdiff (File already exists)'
else
echo 'x - extracting device.cdiff (Text)'
sed 's/^X//' << 'SHAR_EOF' > device.cdiff &&
*** prev/fs/device.c	Sat Oct  6 22:37:48 1990
--- new/fs/device.c	Wed Oct 17 23:27:00 1990
***************
*** 54,59 ****
--- 54,60 ----
X  /* This procedure can be used when a special file needs to be closed. */
X
X    find_dev(dev);
+   dev_mess.DEVICE = dev;
X    (*dmap[major].dmap_close)(task, &dev_mess);
X  }
X
SHAR_EOF
chmod 0644 device.cdiff ||
echo 'restore of device.cdiff failed'
Wc_c="`wc -c < device.cdiff`"
test 316 -eq "$Wc_c" ||
	echo 'device.cdiff: original size 316, current size' "$Wc_c"
fi
exit 0
--

meulenbr@cst.prl.philips.nl (Frans Meulenbroeks) (04/25/91)

[ This shoudl perhaps go in the FAQ list[
david@doe.utoronto.ca (David Megginson) writes:

>I have two hard drives hooked up to my Mega 2: a Megafile 30 (#0) and
>an ICD FA*ST 80 (#1). I can use either drive with with Minix 1.5.10.3 ST
>when it is the only drive connected to the computer, but I have not
>managed to use both of them together. I have read the introductory
>comments in stwini.c, but I'm afraid I still don't know what minor device
>numbers to pass to mknod. There are two separate drives with ID #'s
>0 and 1, each with its own controller. Thank you for ANY help.

You'll also need the small fix I send out just after sending patch 3
the drive with ID 0 uses minors 0 to 15
the drive with ID 1 uses minors 32 to 47

Good luck,

--
Frans Meulenbroeks        (meulenbr@prl.philips.nl)
	Centre for Software Technology

meulenbr@cst.prl.philips.nl (Frans Meulenbroeks) (04/25/91)

X913%DMAFHT1.BITNET@cunyvm.cuny.edu (Martin Sckopke) writes:

>Perhaps you read that I encountered similar problems while trying to
>bring up a SQ555 under Minix. Here is what I have done:
>Minor device no.: 0-15 for HD 0 Controller 0
>                 16-32 for HD 1 Controller 0
>                 33-47 for HD 0 Controller 1 ...
>So I used 34 and 35 for the first and second partition on the second
>drive, and it worked - at least for normal (cp, mv, open, close write)
>access. But there still were some problems with fsck, readall and such.
>But there is a patch from Frans Meulenbroeks relative to 1.5.10.3.
>Since some more people seem to have difficulties, I post it here once
>again, just to increase bandwidth.

Thanks martin for reposting the patch.
However, your numbers are wrong.
Hd1 controller 0 uses minors 16 to 31
hd0 of controller 1 starts with minor 32 (which is the whole disk)
I haven't encountered problems with fsck, readall etc, but then again 
I have no partitions > 16 MB. 
Please mail me your problems.
--
Frans Meulenbroeks        (meulenbr@prl.philips.nl)
	Centre for Software Technology

klamer@mi.eltn.utwente.nl (Klamer Schutte) (04/26/91)

In <meulenbr.672567457@cstw168> meulenbr@cst.prl.philips.nl (Frans Meulenbroeks) writes:

(About the patch 3 for st minix 1.5.10)
>You'll also need the small fix I send out just after sending patch 3

Huh??? Where can i get it?

Please Frans, put any small fixes you have together and put it somewere
for ftp -- i (and i think anybody) want to keep up-to-date.

There are enough wheels invented ;-)

Klamer
-- 
Klamer Schutte
Faculty of electrical engineering -- University of Twente, The Netherlands
klamer@mi.eltn.utwente.nl	{backbone}!mcsun!mi.eltn.utwente.nl!klamer

meulenbr@cst.prl.philips.nl (Frans Meulenbroeks) (05/06/91)

klamer@mi.eltn.utwente.nl (Klamer Schutte) writes:

>Please Frans, put any small fixes you have together and put it somewere
>for ftp -- i (and i think anybody) want to keep up-to-date.

>There are enough wheels invented ;-)

yes, you're right.
Unfortunately I have been buried by 1.6 work lately, and my current
kernel is changed quite heavily from the 1.5.10.3 version.
I don't know if the kernel stuff will work with 1.5 fs/mm any more.
Also there are still some bug reports to process.
And unfortunately my time is very limited.

I'll see if I have time to make a 1.5.10.4. 
Given my time schedule, it will be at least two weeks before I
can distribute anything...

Frans.
--
Frans Meulenbroeks        (meulenbr@prl.philips.nl)
	Centre for Software Technology