v5 and v6 UNIX seem to have very few device files in /dev as
distributed. Inparticular, I need to set up the device entries for my
RK05 drives, /dev/rk0 and /dev/rrk0 etc.
Does anyone know the major and minor numbers offhand, or know the
source well enough to know where to find them? I've grepped the source
to no avail ...
Cheers,
Bob
--
----------------------------------------------------------------------------
Robert Manners Osney Laboratory
rjm(a)swift.eng.ox.ac.uk Dept of Engineering Science
University of Oxford
01865 246561 x 162
Try:
http://swift.eng.ox.ac.uk Linux - the only choice
"I'd rather stay a child
and keep my self respect,
if being an adult
means being like you" Jello Biafra
----------------------------------------------------------------------------
From Tom I Helbekkmo <tih(a)Hamartun.Priv.NO> Thu
Nov 16 01:35:23 1995
Received: from
Norway.EU.net by minnie.cs.adfa.oz.au
(8.6.8/8.3) with SMTP id DAA28676; Thu, 16 Nov 1995 03:44:26 +1100
Received: by
Norway.EU.net with UUCP id AA08831
(5.65c/IDA-1.4.4/EUnet/NO for oldunix(a)minnie.cs.adfa.oz.au) Wed, 15 Nov 1995 17:44:06
+0100
Received: (from tih@localhost) by barsoom.Hamartun.Priv.NO (8.6.12/8.6.12) id QAA13129;
Wed, 15 Nov 1995 16:35:24 +0100
Date: Wed, 15 Nov 1995 16:35:23 +0100 (MET)
From: Tom I Helbekkmo <tih(a)Hamartun.Priv.NO>
To: Bob Manners <rjm(a)swift.eng.ox.ac.uk>
Cc: OldUnix MailingList <oldunix(a)minnie.cs.adfa.oz.au>
Subject: Re: mknod device numbers
In-Reply-To: <m0tFeu2-00000EC(a)swift.eng.ox.ac.uk>
Message-Id: <Pine.NEB.3.91.951115163146.12873C-100000(a)barsoom.Hamartun.Priv.NO>
Mime-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
On Wed, 15 Nov 1995, Bob Manners wrote:
v5 and v6 UNIX seem to have very few device files in
/dev as
distributed. Inparticular, I need to set up the device entries for my
RK05 drives, /dev/rk0 and /dev/rrk0 etc.
This works for me, with v6:
# chdir /dev
# ls -l
total 0
crw--w--w- 2 root 0, 0 Nov 7 21:14 console
crw-rw-r-- 1 bin 8, 1 May 14 1975 kmem
crw-rw-r-- 1 bin 8, 0 May 14 1975 mem
crw-rw-rw- 1 bin 8, 2 May 14 1975 null
brw-rw-rw- 1 root 0, 0 Oct 10 1975 rk0
brw-rw-rw- 1 root 0, 1 Oct 10 1975 rk1
brw-rw-rw- 1 root 0, 2 Oct 10 1975 rk2
brw-rw-rw- 1 root 0, 3 Oct 10 1975 rk3
crw-rw-rw- 1 root 9, 0 Nov 7 01:19 rrk0
crw-rw-rw- 1 root 9, 1 Nov 7 01:19 rrk1
crw-rw-rw- 1 root 9, 2 Nov 7 01:19 rrk2
crw-rw-rw- 1 root 9, 3 Nov 7 01:19 rrk3
crw--w--w- 2 root 0, 0 Nov 7 21:14 tty8
Protection could be better, of course. :-)
-tih
--
Tom Ivar Helbekkmo
tih(a)Hamartun.Priv.NO
From Milo Velimirovic 31 Wing 785-8030
<milov(a)fingers.acs.uwlax.edu> Thu Nov 16 03:22:22 1995
Received: from
fingers.acs.uwlax.edu by minnie.cs.adfa.oz.au (8.6.8/8.3) with SMTP id EAA28815; Thu, 16
Nov 1995 04:22:44 +1100
Received: by
fingers.acs.uwlax.edu;
id AA02396; NX5.67d/42; Wed, 15 Nov 95 11:22:22 -0600
Date: Wed, 15 Nov 95 11:22:22 -0600
From: Milo Velimirovic 31 Wing 785-8030 <milov(a)fingers.acs.uwlax.edu>
Message-Id: <9511151722.AA02396(a)fingers.acs.uwlax.edu>
Received: by NeXT.Mailer (1.100.RR)
Received: by NeXT Mailer (1.100.RR)
To: Tom I Helbekkmo <tih(a)hamartun.priv.no>
Subject: Re: mknod device numbers
Cc: OldUnix MailingList <oldunix(a)minnie.cs.adfa.oz.au>
Reply-To: Milo.Velimirovic(a)uwlax.edu
Hi,
All of this is very installation specific. The major/minor numbers in the
device inodes need to correspond exactly to the entries in the devtab
structure in the kernel. This is probably something that can be divined by
running nm on the kernel, /unix ? (All this is from memory, my annotated V6
kernel listing is buried at home right now.) But, I'd be surprised to see a V6
distribution that didn't have the rk drivers built in. Another thing to
watch out for is the rk driver, er, device names/numbers that interleaved a
file system across multiple drives.
BTW, is there anywhere one can get a "legal license" to run V6, V7, 2.XBSD on
my pdp11/34's and 11/44?
--Milo
---
Milo Velimirovic <Milo.Velimirovic(a)uwlax.edu>
Unix Computer Network Administrator (608) 785-8030
Information Technology, Operations and Networking
University of Wisconsin - La Crosse
La Crosse, Wisconsin 54601 USA 43 48 05 N 91 14 22 W
Begin forwarded message:
> Date: Wed, 15 Nov 1995 16:35:23 +0100 (MET)
> From: Tom I Helbekkmo <tih(a)Hamartun.Priv.NO>
> To: Bob Manners <rjm(a)swift.eng.ox.ac.uk>
> Cc: OldUnix MailingList <oldunix(a)minnie.cs.adfa.oz.au>
> Subject: Re: mknod device numbers
> In-Reply-To: <m0tFeu2-00000EC(a)swift.eng.ox.ac.uk>
> Mime-Version: 1.0
> Content-Type: TEXT/PLAIN; charset=US-ASCII
> On Wed, 15 Nov 1995, Bob Manners wrote:
> > v5 and v6 UNIX seem to have very few device files in /dev as
> > distributed. Inparticular, I need to set up the device entries for my
> > RK05 drives, /dev/rk0 and /dev/rrk0 etc.
> This works for me, with v6:
> # chdir /dev
> # ls -l
> total 0
> crw--w--w- 2 root 0, 0 Nov 7 21:14 console
> crw-rw-r-- 1 bin 8, 1 May 14 1975 kmem
> crw-rw-r-- 1 bin 8, 0 May 14 1975 mem
> crw-rw-rw- 1 bin 8, 2 May 14 1975 null
> brw-rw-rw- 1 root 0, 0 Oct 10 1975 rk0
> brw-rw-rw- 1 root 0, 1 Oct 10 1975 rk1
> brw-rw-rw- 1 root 0, 2 Oct 10 1975 rk2
> brw-rw-rw- 1 root 0, 3 Oct 10 1975 rk3
> crw-rw-rw- 1 root 9, 0 Nov 7 01:19 rrk0
> crw-rw-rw- 1 root 9, 1 Nov 7 01:19 rrk1
> crw-rw-rw- 1 root 9, 2 Nov 7 01:19 rrk2
> crw-rw-rw- 1 root 9, 3 Nov 7 01:19 rrk3
> crw--w--w- 2 root 0, 0 Nov 7 21:14 tty8
> Protection could be better, of course. :-)
-tih
--
> Tom Ivar Helbekkmo
> tih(a)Hamartun.Priv.NO
From Tom I Helbekkmo <tih(a)Hamartun.Priv.NO> Thu
Nov 16 06:57:59 1995
Received: from
Norway.EU.net by minnie.cs.adfa.oz.au
(8.6.8/8.3) with SMTP id IAA29309; Thu, 16 Nov 1995 08:03:54 +1059
Received: by
Norway.EU.net with UUCP id AA29747
(5.65c/IDA-1.4.4/EUnet/NO for oldunix(a)minnie.cs.adfa.oz.au) Wed, 15 Nov 1995 22:03:25
+0100
Received: (from tih@localhost) by barsoom.Hamartun.Priv.NO (8.6.12/8.6.12) id VAA14351;
Wed, 15 Nov 1995 21:58:00 +0100
Date: Wed, 15 Nov 1995 21:57:59 +0100 (MET)
From: Tom I Helbekkmo <tih(a)Hamartun.Priv.NO>
To: Milo.Velimirovic(a)uwlax.edu
Cc: OldUnix MailingList <oldunix(a)minnie.cs.adfa.oz.au>
Subject: Re: mknod device numbers
In-Reply-To: <9511151722.AA02396(a)fingers.acs.uwlax.edu>
Message-Id: <Pine.NEB.3.91.951115213628.14251A-100000(a)barsoom.Hamartun.Priv.NO>
Mime-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
On Wed, 15 Nov 1995, Milo Velimirovic 31 Wing 785-8030 wrote:
All of this is very installation specific. The
major/minor numbers in the
device inodes need to correspond exactly to the entries in the devtab
structure in the kernel.
True enough. The example I gave was correct for the V6 distribution
that Ken Wellsch donated to the PUPS archive, and in which the file
/usr/sys/conf/c.c (generated by 'mkconf' in the same directory) ends
up with the following for the default "rkunix" with rk, tm and tc
drivers enabled, as per the script /usr/sys/run:
int (*bdevsw[])()
{
&nulldev, &nulldev, &rkstrategy, &rktab, /* rk */
&nodev, &nodev, &nodev, 0, /* rp */
&nodev, &nodev, &nodev, 0, /* rf */
&tmopen, &tmclose, &tmstrategy, &tmtab, /* tm */
&nulldev, &tcclose, &tcstrategy, &tctab, /* tc */
&nodev, &nodev, &nodev, 0, /* hs */
&nodev, &nodev, &nodev, 0, /* hp */
&nodev, &nodev, &nodev, 0, /* ht */
0
};
int (*cdevsw[])()
{
&klopen, &klclose, &klread, &klwrite, &klsgtty, /*
console */
&nodev, &nodev, &nodev, &nodev, &nodev, /* pc
*/
&nodev, &nodev, &nodev, &nodev, &nodev, /* lp
*/
&nodev, &nodev, &nodev, &nodev, &nodev, /* dc
*/
&nodev, &nodev, &nodev, &nodev, &nodev, /* dh
*/
&nodev, &nodev, &nodev, &nodev, &nodev, /* dp
*/
&nodev, &nodev, &nodev, &nodev, &nodev, /* dj
*/
&nodev, &nodev, &nodev, &nodev, &nodev, /* dn
*/
&nulldev, &nulldev, &mmread, &mmwrite, &nodev, /* mem
*/
&nulldev, &nulldev, &rkread, &rkwrite, &nodev, /* rk
*/
&nodev, &nodev, &nodev, &nodev, &nodev, /* rf
*/
&nodev, &nodev, &nodev, &nodev, &nodev, /* rp
*/
&tmopen, &tmclose, &tmread, &tmwrite, &nodev, /* tm
*/
&nodev, &nodev, &nodev, &nodev, &nodev, /* hs
*/
&nodev, &nodev, &nodev, &nodev, &nodev, /* hp
*/
&nodev, &nodev, &nodev, &nodev, &nodev, /* ht
*/
0
};
The major device numbers are the offsets (counting from 0) in these
arrays, so rk has major 0 for the block device, 9 for the character
device. I would assume that this holds for V6 in general -- if one
were to add device drivers, one would surely extend these arrays at
their ends, not insert anything into them... :-)
-tih
--
Tom Ivar Helbekkmo
tih(a)Hamartun.Priv.NO