|
|
1.1 root 1: .so ../ADM/mac
2: .XX setup 497 "Setting Up a Research UNIX System"
3: .nr dP 2
4: .nr dV 3p
5: .TL
6: Setting Up a Research
7: .UX
8: System
9: .AU
10: Norman Wilson
11: .AI
12: .MH
13: .SP 2
14: .2C
15: .NH
16: Introduction
17: .PP
18: `Research
19: .UX '
20: is the
21: .UX
22: system used and fiddled with
23: in the
24: Bell Laboratories Computing Science Research Center.
25: It is often named after the most recent version of the manual.
26: This is the Tenth Edition.
27: .PP
28: The system runs only on VAXes,
29: and only on some CPUs and some peripheral devices.
30: At the moment these include the VAX-11/750, 11/780, and 8550,
31: the MicroVAX II and III,
32: MSCP disks connected to UDA50, KDA50, KDB50, and RQDX3 controllers,
33: and TU78, TE16, and TU81 tapes.
34: Various Ethernet and Datakit controllers are supported.
35: The list is likely to change as time passes.
36: There will probably never be support for
37: DEC HSC50 and HSC70 disk servers.
38: .PP
39: There is no official distribution tape for the system,
40: nor are there any plans to produce one.
41: This reflects our desire to stay out of the software support business;
42: we have enough of that keeping our own machines running.
43: We are, however, willing to send snapshots of our current system
44: to deserving people with the right expectations.
45: We are interested in sharing the system with colleagues;
46: we aren't set up to support customers.
47: .PP
48: Our system
49: is not packaged for novices.
50: It is assumed that anyone who gets a copy
51: is self-sufficient and can
52: read our manuals, the hardware manuals, and the source code
53: to resolve confusions and problems.
54: Each copy of the distribution
55: is hand-crafted at a different time;
56: different kinds of digging around may be necessary
57: to get any given copy running.
58: .PP
59: If you haven't been scared off yet,
60: here are some suggestions about how to get started.
61: .NH
62: Documentation
63: .PP
64: The system changes daily, so the printed manual is always out of date.
65: Check the online manual,
66: and any supplementary printed pages
67: that came with the tape,
68: before taking the printed book as gospel.
69: .PP
70: Neither the online manual nor the printed one
71: is pure;
72: various local programs and local conventions
73: have crept in,
74: especially
75: in the crucial system administration parts.
76: Examples should be taken as examples,
77: not as recipes.
78: .NH
79: Cracking the tape and booting
80: .PP
81: The tape consists of
82: at least a root file system image
83: and a
84: .I tar
85: image to be put in
86: .CW /usr .
87: There may be other files as well.
88: Tapes are hand-crafted,
89: so details do vary;
90: see the notes that came with the tape.
91: .PP
92: The root image is a block-by-block copy
93: of a root file system,
94: containing a
95: kernel binary in
96: .CW /unix
97: specific to your hardware.
98: It is probably exactly five megabytes long.
99: It should be copied
100: (you figure out how)
101: to the beginning of the disk you want to boot from.
102: One way is to
103: plug the disk into some already-running machine
104: with a tape drive,
105: and
106: .P1 0
107: dd bs=blocksize </dev/rawtape >/dev/rawdisk
108: .P2
109: .PP
110: The root image includes a boot block
111: that behaves as described in
112: .I reboot (8).
113: On the VAX-11/750
114: and machines with similar boot ROMs,
115: such as the 8200 (if we ever support it),
116: nothing more is needed.
117: On other VAXes,
118: in particular the 11/780
119: and the 8500-8700 machines,
120: some boot programs must be installed on the console disk.
121: A floppy and instructions
122: should have come with the tape.
123: .PP
124: Once the root is installed,
125: boot the system to single-user state,
126: .I reboot (8).
127: The kernel image is in file
128: .CW /unix .
129: It is prudent to run
130: .I fsck
131: or
132: .I chuck (8)
133: on the root file system to be sure it's OK.
134: It is mandatory to examine
135: the special files in
136: .CW /dev
137: to make sure they're correct for your disk and tape drives;
138: ......
139: see
140: .I mknod (8)
141: and the driver writeups
142: referred to there.
143: The special files on the tape bear no necessary correspondence
144: to the ones you need,
145: though we try to supply correct ones for the root file system.
146: .PP
147: To read in
148: .CW /usr ,
149: do something like this:
150: .P1 0
151: # /etc/mkbitfs /dev/ra02 31231 4 40
152: \fR(make a new 4KB-block file system;
153: see below for details)\fP
154: # /etc/mount /dev/ra02 /usr
155: # cd /usr
156: # mt fsf 1 \fR(skip first file on the tape, the root image)\fP
157: # umask 2
158: # tar xbf 20 /dev/rmt0 \fR(extract \f(CW/usr\fR files)\fP
159: .P2
160: .PP
161: The
162: .CW /usr
163: files occupy about 50 megabytes.
164: The
165: .CW umask
166: is needed because
167: .I tar
168: carefully records permissions in the archive,
169: but at the moment neglects to restore them.
170: Most of the directories have group (but not general)
171: write permissions on our system.
172: .I Tar
173: does at least set ownership correctly.
174: .PP
175: There may be a snapshot of our sources as well,
176: in one or more additional tape files or on additional tapes.
177: They won't exactly correspond to the binaries.
178: The tape won't have absolute pathnames on it,
179: and for the most part you can rearrange things as you please
180: (though dependencies do creep in),
181: but the arrangement on the tape
182: reflects our conventions.
183: The source to the operating system belongs in
184: .CW /usr/src/sys ;
185: that to the 5620 software in
186: .CW /usr/jerq/src ;
187: that to everything else in
188: .CW /usr/src .
189: Sources to the network programs
190: live in
191: .CW /usr/src/ipc
192: (even some programs that are installed in
193: .CW /usr/bin ),
194: except the network file system,
195: which is in
196: .CW /usr/src/netb .
197: Most programs are built with
198: .I mk (1),
199: but a few still use
200: .I make
201: instead.
202: Programs with their own directories have their own
203: .I mkfile s;
204: there is one
205: .I mkfile
206: in
207: .CW /usr/src/cmd
208: for all the small programs there.
209: .PP
210: The sources occupy some indeterminate but large amount of space;
211: expect to need at least 135 megabytes.
212: .NH
213: Disks and file systems
214: .PP
215: There are two kinds of disk file system,
216: referred to herein as
217: `classical'
218: and
219: `bitmapped.'
220: A classical file system
221: uses 1024-byte blocks
222: and a V7-style free block list.
223: A bitmapped file system
224: uses 4096-byte blocks
225: and keeps the free block list in a bitmap.
226: Bitmapped file systems
227: come in two flavors:
228: small ones, which keep the free block bitmap in the super-block
229: (which means they can't be much bigger than 120 megabytes),
230: and big ones, which keep the bitmap in the highest-numbered blocks
231: in the file system.
232: We use bitmapped file systems almost exclusively.
233: The root image on the tape will be a bitmapped file system.
234: .PP
235: The system distinguishes
236: classical file systems from bitmapped ones
237: by the minor device number:
238: bitmapped file systems are on devices
239: with numbers greater than 64.
240: A block device with minor number 10
241: could contain a classical file system;
242: if it contains a bitmapped file system,
243: it should have minor number 74 instead.
244: All the disk drivers ignore the 64 bit.
245: .PP
246: Various tools work with the different kinds of file systems:
247: .IP
248: .I Fsck
249: understands classical and small bitmapped file systems.
250: It doesn't know about big ones yet.
251: .IP
252: .I Chuck
253: understands both kinds of bitmapped file system,
254: but doesn't know how to rebuild the free list in a classical file system.
255: .IP
256: .I Icheck ,
257: .I dcheck ,
258: and
259: .I ncheck
260: work with all kinds of file system.
261: .PP
262: If you check the block special file,
263: you don't have to reboot the system after fixing the root.
264: We borrowed this simple convenience from
265: 4.1BSD;
266: it seems to have vanished from subsequent Berkeley systems.
267: .PP
268: .I Mkfs
269: makes a classical file system;
270: .I mkbitfs
271: a bitmapped file system,
272: which will be the small kind if possible.
273: To get reasonable speed,
274: it is important to set file system spacing parameters correctly;
275: see
276: .I mkfs (8).
277: In our experience,
278: the `space' number is very important,
279: but the `cylinder size' makes little difference.
280: .PP
281: Read
282: .I mount
283: and
284: .I umount (8)
285: carefully;
286: notice in particular that the arguments to
287: .I umount
288: are mount points like
289: .CW /usr ,
290: not special files like
291: .CW /dev/ra02 .
292: .PP
293: An example to get you started:
294: many of our machines have system files on a single RA81.
295: The driver allows the disk to be split into certain sections
296: (\c
297: .I ra (4)).
298: We use these sections:
299: .IP
300: Section 0 (5 megabytes) is the root.
301: .IP
302: Section 1 (10 megabytes) is the swap area.
303: .IP
304: Section 2 (120 megabytes)
305: is
306: .CW /usr .
307: .IP
308: Section 5 (50 megabytes at the high end of the disk)
309: is a rather generous
310: .CW /tmp .
311: .PP
312: Users' files might go in
313: .CW /usr ,
314: or in other file systems in the other two
315: 120 megabyte sections;
316: if the latter,
317: we use symbolic links
318: to arrange that
319: .CW /usr/andrew
320: always means
321: .I andrew 's
322: home directory.
323: .PP
324: Backups are somewhat ad hoc.
325: The old V7
326: .I dump
327: and
328: .I restor
329: programs have long since rotted,
330: and their newer Berkeley-derived kin
331: seem too complicated to be worth adapting.
332: We back up whole file systems
333: simply by copying the special file to tape with
334: .I dd ;
335: 120 megabytes in 16Kbyte blocks
336: fits nicely on a 6250 bpi magtape.
337: Such backups are mostly meant for use when disk drives break;
338: they aren't very convenient when files are accidentally deleted.
339: .PP
340: A more sophisticated and more complicated system
341: for incremental backups
342: is described in
343: .I backup (1)
344: and
345: .I backup (8).
346: .I Cpio
347: and
348: .I tar
349: are simpler possibilities.
350: .NH
351: Files to watch for
352: .PP
353: Most of our machines are run in a fairly open manner;
354: special files for disks and memory
355: often have general read permissions.
356: Most system files and directories
357: may be written by group
358: .I bin ;
359: if the special files aren't generally readable,
360: they may certainly be read by group
361: .I sys .
362: You may want to change some of this,
363: and to browse around generally for holes.
364: .PP
365: Here are some files that have system-dependent contents;
366: the versions on the tape are probably wrong,
367: and must be edited for your system.
368: .de Fp
369: .IP
370: .ne 2
371: .ti -5n
372: .CW "\\$1"
373: .br
374: .if !'\\$2''\{.
375: .ti -5n
376: .CW "\\$2"
377: .br\}
378: ..
379: .Fp /etc/whoami
380: A single line of text containing this machine's name,
381: printed by
382: .I getty (8),
383: used by
384: .I uucp
385: and miscellaneous network programs.
386: .Fp /n
387: Mount points for network file systems,
388: .I netfs (8).
389: .I
390: .CW /n/ remsys
391: .R
392: is the (empty) directory
393: on which the remote file system for system
394: .I remsys
395: is mounted.
396: .I
397: .CW /n/ myname\c
398: .R
399: ,
400: where
401: .I myname
402: is the name in
403: .CW /etc/whoami ,
404: is conventionally a symbolic link
405: to
406: .CW / .
407: .Fp /etc/fstab
408: Filesystems to be mounted in normal operation,
409: .I fstab (5).
410: .Fp /etc/ttys
411: Terminal lines to be maintained by
412: .I init
413: and
414: .I getty (8),
415: .I ttys (5).
416: .Fp /etc/crontab
417: List of actions for
418: .I cron (8).
419: .Fp /etc/passwd /etc/group
420: List of users and groups,
421: .I passwd (5).
422: .Fp /etc/rc
423: Script to be executed when the system starts,
424: .I rc (8).
425: .Fp /lib/dst
426: Daylight saving time definitions,
427: .I ctime (3).
428: The timezone is compiled into the kernel,
429: as is a flag that declares whether daylight time ever happens;
430: these are probably both mistakes.
431: .Fp /lib/ttynames
432: List of directories searched by
433: .I ttyname (3).
434: .Fp /etc/aculist
435: List of telephone dialling devices,
436: .I dialout (3).
437: .I Cu
438: and
439: .I uucp
440: depend on this list.
441: .PP
442: If you use networking,
443: .I uucp ,
444: or electronic mail,
445: there are other files to fix;
446: details below.
447: .PP
448: Here are some accounting files
449: that should be truncated from time to time:
450: .Fp /usr/adm/wtmp
451: Session accounting,
452: .I login (8).
453: .Fp /usr/adm/messages
454: Record of console messages,
455: .I dmesg (8).
456: .Fp /usr/adm/smdr
457: Autodialler use;
458: written if possible by
459: .I dialout (3).
460: .Fp /usr/spool/mail/mail.log
461: Record of mail sent or delivered,
462: .I upas (8).
463: .Fp /usr/netb/setupl /usr/netb/zarf.log
464: Network file system logs,
465: .I netfs (8).
466: .Fp /usr/ipc/log
467: Directory where various daemons in
468: .CW /usr/ipc/mgrs
469: write log files;
470: .I svcmgr ,
471: .I dkmgr ,
472: .I tcpmgr (8)
473: among others.
474: .Fp /usr/spool/uucp/.Log
475: Log files from various
476: .I uucp
477: daemons.
478: .PP
479: We run
480: .CW /usr/ipc/servers/daily
481: just before midnight every day;
482: it maintains a week's worth of daily issues
483: of the
484: .CW /usr/ipc/log
485: files and of
486: .CW mail.log .
487: If present,
488: .CW /usr/adm/weekclean
489: and
490: .CW /usr/adm/monthclean
491: show what we do
492: about some of the other files.
493: .NH
494: .....
495: Setting up mail
496: .PP
497: Everyone has a complicated mail system these days;
498: ours is perhaps simpler than many,
499: but still requires some setting up.
500: There are various files to fix in
501: directory
502: .CW /usr/lib/upas ,
503: especially
504: the list of addressing rules in
505: .CW rewrite
506: and the list of local name alias files in
507: .CW namefiles .
508: See
509: .I mail (1)
510: and
511: .I upas (8),
512: and the
513: .I upas
514: paper in Volume 2.
515: .PP
516: The
517: .CW rewrite
518: on the tape knows about local mail
519: and
520: .I uucp ,
521: which is probably enough to get you started;
522: the supplied
523: .CW namefiles
524: points at two empty files
525: .CW names.local
526: and
527: .CW names.global .
528: Our usual
529: .CW rewrite
530: file is in
531: .CW rewrite.fancy ;
532: you don't want to use it unchanged,
533: but it is there as an advanced example.
534: Shell scripts like
535: .CW route
536: go with it.
537: Before trying to use them,
538: please read them carefully,
539: and remove things like
540: use of our gateway machine
541: .I research .
542: .NH
543: Setting up uucp
544: .PP
545: Our
546: .I uucp
547: programs belong to the
548: honey danber
549: family,
550: and behave in a mostly standard way.
551: The principle difference is that
552: the programs don't read a single
553: .CW Systems
554: file to look up a system.
555: Instead,
556: they run
557: .CW /usr/lib/uucp/uugrep
558: with an argument naming the system of interest.
559: .I Uugrep
560: is expected to print one or more
561: .CW Systems
562: lines,
563: which may or may not be relevant to that system;
564: the system name in each line must still be checked.
565: .PP
566: Normally
567: .I uugrep
568: just prints the contents of all the files named in
569: .CW /usr/lib/uucp/Sysfiles .
570: However, if the files
571: .CW /usr/lib/uucp/Bsystems.[FT]
572: exist,
573: they are assumed to contain a
574: .I cbt (3)
575: database of
576: .CW Systems
577: entries;
578: .I uugrep
579: searches the database
580: and prints only the lines for the interesting system.
581: If that system isn't found,
582: or one of the original
583: .CW Systems
584: files is newer than the database,
585: the database is ignored
586: and all the files are printed.
587: .PP
588: .I Uugrep
589: without arguments
590: spits out all the entries,
591: and rebuilds the database if necessary.
592: .PP
593: To use the database,
594: create empty
595: .CW Bsystems.T
596: and
597: .CW Bsystems.F
598: files (with the same permissions used for Systems files),
599: and run
600: .P1 0
601: /usr/lib/uucp/uugrep >/dev/null 2>&1
602: .P2
603: Make arrangements to run this whenever one of the
604: .CW Systems
605: files changes;
606: we just do it every hour.
607: .PP
608: .CW /usr/lib/uucp/uudemon.hr
609: is run hourly,
610: .CW uudemon.day
611: daily.
612: Take them as examples.
613: .PP
614: None of the
615: .I uucp
616: files are used by
617: .I cu
618: in our system.
619: .NH
620: Setting up networking
621: .PP
622: The programs in
623: .I con (1)
624: are used to remotely log into another machine
625: and to execute remote commands.
626: .I Push
627: and
628: .I rcp (1)
629: copy files.
630: Our
631: .I push
632: speaks a different
633: (and markedly simpler)
634: language from the DKHOST program of the same name;
635: .I npush
636: and
637: .I npull
638: attempt compatibility.
639: .PP
640: For each kind of network,
641: there is at least one network-specific daemon
642: responsible for listening and dialling.
643: This daemon announces a local name
644: through which outbound calls may be requested.
645: It also listens for inbound calls from the network,
646: maps the network's idea of a service name
647: through some local convention,
648: and calls the appropriate local name for the service.
649: Most local services,
650: login and command execution in particular,
651: are handled by
652: .I svcmgr (8).
653: .PP
654: Local service names,
655: including network dialling,
656: are announced with
657: .I ipccreat
658: and called with
659: .I ipcopen ;
660: see
661: .I ipc (3).
662: The services are usually announced in directory
663: .CW /cs .
664: For example,
665: the Datakit dialler announces itself as
666: .CW /cs/dk ;
667: .I con
668: opens that name with
669: .I ipcopen
670: to place a call.
671: .PP
672: To turn on any network,
673: you must run
674: .I svcmgr .
675: Edit
676: .CW /usr/ipc/lib/serv
677: and
678: .CW auth
679: to contain the desired services
680: and authorization mappings.
681: The ones on the tape
682: are certainly wrong;
683: use them as examples.
684: .PP
685: To turn on Datakit,
686: you must have the right special files in
687: .CW /dev/dk ,
688: and must run
689: .I dkhup
690: and
691: .I dkmgr ;
692: see
693: .I dk (4)
694: and
695: .I dkmgr (8).
696: The device files on the tape are probably wrong.
697: Watch out for
698: .CW /dev/dk/dkctl ,
699: which should be linked to the common signalling channel;
700: this is channel 1 on production Datakits,
701: but not on most of our machines.
702: .PP
703: If you're using a KMC,
704: run
705: .CW /etc/kdiload
706: to load microcode into it,
707: after editing
708: .CW /etc/kmctab
709: to point at the appropriate KMC microcode:
710: .CW /etc/dkk.kdi
711: for the KMS11-K,
712: .CW /etc/dkk.dubhi
713: for the DUBHI.
714: .I Kmc (8)
715: explains some of this.
716: .PP
717: To turn on TCP/IP,
718: you must run an instance of
719: .I ipconfig (8)
720: for each IP network interface,
721: and one instance of
722: .I tcpmgr (8).
723: If you want to use UDP,
724: run
725: .I udpconfig
726: too.
727: .PP
728: Besides the hardware devices
729: (e.g. an Ethernet controller),
730: these special files are needed
731: for TCP/IP.
732: Channel numbers like that in
733: .CW /dev/tcp01
734: must always be two digits.
735: .KS
736: .TS
737: c c c
738: lFCW l l.
739: _
740: file maj,min
741: =
742: /dev/ip0 42,0 for general IP control
743: /dev/iptcp 42,6 for TCP
744: /dev/ip16 42,16 for \fIrouted\fP
745: /dev/ipudp 42,17 for UDP
746: /dev/tcp\fInn\fP 43,\fInn\fP TCP channels
747: /dev/udp\fInn\fP 50,\fInn\fP UDP channels
748: _
749: .TE
750: .KE
751: .PP
752: Most TCP/IP programs depend on the name service mechanisms
753: described in
754: .I qns (7)
755: and
756: .I ns (8).
757: You must run
758: .I ns ,
759: after adjusting
760: .CW /usr/ipc/lib/ns.db .
761: .PP
762: To turn on our kind of network file system,
763: you need to edit files in
764: .CW /usr/netb ,
765: and to run certain programs kept there;
766: see
767: .I netfs (8).
768: Our network file system protocol
769: is different from everyone else's.
770: Since our server is just a user program,
771: it is possible with some effort to make it run
772: under other operating systems,
773: making their files accessible
774: to the machine running our system
775: (but not vice versa).
776: For example, some of our machines
777: can see all the files on
778: the local Cray.
779: Look in the sources if you want to do this.
780: .NH
781: Bitmapped terminals
782: .PP
783: There is a fairly extensive set of programs
784: for the Teletype 5620 terminal;
785: see section 9 of the manual,
786: in particular
787: .I intro (9).
788: The programs live in
789: .CW /usr/jerq .
790: Some of the programs have been moved to the AT&T 630 terminal;
791: the 630 versions live in
792: .CW /usr/630 .
793: There is no documentation for the 630 versions,
794: but most are the same as their 5620 cousins.
795: .I 630mux
796: is the window multiplexer.
797: The name is deceptive;
798: .I 630mux
799: terminal windows
800: act like the ones in the 630 ROM,
801: not like those in
802: .I mux .
803: .NH
804: Miscellaneous hardware support
805: .PP
806: If you have a VAX-11/750
807: with a patchable control store
808: (most do),
809: .I ldpcs (8)
810: will load DEC's microcode patches.
811: .PP
812: The system doesn't replace bad blocks automatically
813: on MSCP disks,
814: but
815: .I rarepl (8)
816: will replace a particular block on request,
817: and
818: .I smash (8)
819: will often make it unnecessary.
820: In our experience,
821: bad block replacement is almost never appropriate on RA81s.
822: .PP
823: On a VAX-11/780,
824: .CW /dev/floppy
825: is the console disk;
826: it should be a character device
827: with major number 8,
828: minor number 0.
829: .I Arff (8)
830: attempts to understand the RT-11 file system format used by the console.
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.