[go: up one dir, main page]

0% found this document useful (0 votes)
45 views21 pages

Unix Programmer Man71 PDF

The document describes the boot procedures and initialization processes for UNIX systems running on PDP-11 computers. It explains how the bootstrap operating system (bos) is used to load either warm or cold versions of UNIX from a read-only disk. The cold boot process involves loading a special boot program from a DECtape to initialize the disk. It also describes how the initialization tape is created and the files it contains to initialize a new system.

Uploaded by

JeandelaSagesse
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
45 views21 pages

Unix Programmer Man71 PDF

The document describes the boot procedures and initialization processes for UNIX systems running on PDP-11 computers. It explains how the bootstrap operating system (bos) is used to load either warm or cold versions of UNIX from a read-only disk. The cold boot process involves loading a special boot program from a DECtape to initialize the disk. It also describes how the initialization tape is created and the files it contains to initialize a new system.

Uploaded by

JeandelaSagesse
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 21

11/3/71

NAME
SYNOPSIS
DESCRIPTION
FILES
SEE ALSO
DIAGNOSTICS
BUGS
OWNER
/ETC/AS 2 (VII)
as2 assembler pass 2
as2 is invoked by the assembler ~ to perform its
second pass.
see as
s ~
dmr
11/3/71
NAME
SYNOPSIS
DESCRIPTION
FILES
SEE ALSO
DIAGNOSTICS
BUGS
OWNER
/ETC/BA (VII)
ba B assembler
I etc/ba name
ba is invoked by the command in order to turn
the intermediate code into assembly language

name.i (input), name.s (output)
R command, /etc/be
At the moment, the B command is defunct, and ba
is invoked via a command file.
ken
11/3/71
NAME
SYNOPSIS
DESCRIPTION
FILES
SEE ALSO
DIAGNOSTICS
BUGS
OWNER
be -- J B compiler
/etc/be name.b name.i
/ETC/Be (VII)
be is the compiler proper; it turns source
into intermediate code. It is invoked from the
command.
name.b (input), name.i (intermediate output)
b (command), /etc/ba
The b command is defunct at. the moment; be is
called from a command file.
ken
11/3/71
NAME
SYNOPSIS
DESCRIPTION
FILES
SEE ALSO
DIAGNOSTICS
BUGS
OWNER
/ETC/BILIB (VII)
bilib B interpreter library
bilib is the library of runtime operators. It
is searched during the loading of as-compiled
program.
Standard B subroutines are contained in
/etc/libb:a.
b (command); ar, ld
The following assignment binary operators are
missing: b102 (=1), b103 (=&), b104 (===), b105
(=1=), b106 (=<=), b107 (=<), b110 (=>=), b111
( = >) , b1 1 2 ( = > >) , b11 3 ( =< <) , b1 20 (=I)
ken, dmr
11/3/71
NAME
SYNOPSIS
DESCRIPTION
173700:
173740:
BOOT PROCEDURES (VII)
bos, maki, rom, vcboot, msys, et al
On the RF disk, the highest 16K words are
reserved for stand-alone programs. These 16K
words are allocated as follows:
bos (1K)
Warm UNIX (6K)
Cold UNIX (6K)
unassigned (3K)
The UNIX read only memory (ROM) is home cut with
2 programs of 16 words each. The first (address
173700) reads bos from the RF disk into_core
location 54000 and transfers to 54000. The other
ROM program (address 173740) reads a DECtape sit-
ting in the end-zone on drive 0 into core loca-
tion 0 and transfers to 0. This latter operation
is compatible with part of DEC's standard ROM.
The disassembled code for the UNIX ROM follows:
mov $177472,r0 12700;177472
mov $3,-(rO) 1 27 40; 3
mov $140000,-(rO) 1 2740; 1 40000
mov $54000,-(rO) 1 2740; 54000
mov $-2000,-(rO) 1 27 40; 1 7 6000
mov $5,-(rO) 12740;5
tstb (rO) 105710
bge .-2 2376
jmp *$54000 137;54000
mov $1 773 50, rO 12700;177350
clr -(rO) 5040
mov rO,-(rO) 10040
mov $3,-(rO) 12740;3
tstb ( ro) 105710
bge .-2 2376
tst *$177350 5737;177350
bne

1377
movb $5, ( rO) 112710;5
tstb (rO) 105710
bge .-2 2316
clr pc 5007
The program bos (Bootstrap Operating System)
examines the console switchs and executes one of
several internal programs depending on the set-
ting. If no setting is recognizable, bos loops
waiting for a recognizable setting. The follow-
ing settings are currently recognized:
173700
73700 Will read Warm UNIX from the RF into core
location 0 and transfer to 400.
11/3/71
1
2
10
0
57500
BOOT PROCEDURES {VII)
Will read Cold UNIX from the RF into core
location 0 and transfer to 400.
Will read the unassigned 3K program into
core location 0 and transfer to 400.
Will dump 12K words of memory from core
location 0 onto DECtape drive 7.
Will load a standard UNIX binary paper
tape into core location 0 and transfer to
o.
Will load the standard DEC absolute and
binary loaders and transfer to 57500.
Thus we come to the UNIX warm boot procedure: put
173700 into the switches, push load address and
then push start. The alternate switch setting of
73700 that will load warm UNIX is used as a sig-
nal to bring up a single user system for special
purposes. See /etc/init.
Cold boots can be accomplished with the Cold
program, but they're not. Thus the Cold UNIX
slot on the RF may have any program desired.
This slot is, however, used a cold boot.
Mount the UNIX INIT DECtape on drive 0
tioned in the end-zone. Put 173740 into the
switches. Push load Put 1 into the
switches. Push start. This reads a program
called vcbgot from the tape into core location 0
and transfers to it. vcboot then reads 16K words
from the DECtape and copies the
data to the highest 16K words of the RF. Thus
this initializes the read-only part of the RF.
vcboot then reads in bos and executes it. bos
then reads in Cold UNIX and executes that. Cold
UNIX halts for a last chance before it completely
initializes the RF file system. Push
and Cold UNIX will initialize the RF. It then
sets into execution a user program that reads the
DECtape for initialization files starting from
block 33. When this is done, the program exe-
cutes /etc/init which should have been on the
tape.
The INIT tape is made by the program maki running
under UNIX. maki writes vcboot on block 0 of
/dey/taQ1 copies the RF 16K words
(using /dev/rfQ) onto blocks 1 thru 32. It has
internally a list of files to be copied from
block 33 on. This list follows:
/etc/init
/bin/chmod
11/3/71
FILES
SEE ALSO
DIAGNOSTICS
BUGS
OWNER
/bin/chown
/bin/ cp
/bin/ln
/bin/ls
/bin/mkdir
/bin/mv
/bin/rm
/bin/rmdir
/bin/ sh
/bin/stat
/bin/tap
BOOT PROCEDURES (VII)
Thus this is the set of programs available after
a cold boot. /etc/init and /bin/sh are mandato-
ry. /bin/tap and /bin/mkdir are used to load up
the file system. The rest of the programs are
frosting. As soon as possible, an s ~ t e should
be done.
The last link in this incestuous daisy chain is
the program msy.
msys char file
will copy the file file onto the RF read only
slot specified by the characacter char. Char is
taken from the following set:
_9 bos
_y Warm UNIX
1 Cold UNIX
l unassigned
Due to their rarity of use, maki and ~ ~ are
maintained off line and must be reassembled be-
fore used.
/dev/rfO, /dev/tapn
/etc/init, /bin/tap, /bin/sh, /bin/mkdir, bppt
format
The files /bin/mount, /bin/sdate, and /bin/date
should be included in the initialization list of
maki.
ken
11 /3/71
NAME
SYNOPSIS
DESCRIPTION
FILES
SEE ALSO
DIAGNOSTICS
BUGS
OWNER
/ETC/BRT1, BRT2 (VII)
brt1, brt2 runtime routines
The first of these routines must be loaded first
in an executable B program; the second must be
loaded la.st, after all other routines. They are
not in /etc/bilib only because having them
separate is the easiest way to assure the order
of loading.
b command, bilib
k.en
11/3/71
NAME
SYNOPSIS
DESCRIPTION
FILES
SEE ALSO
DIAGNOSTICS
BUGS
OWNER
/ETC/F1, F2, F3, F4 (VII)
f1 ' f2; f3' f4
Fortran compiler
These programs represent the four phases of a
Fortran compilation:
f1: specification statements
f2: common and equivalence allocation
f3: executable statements
f4: cleanup
Each ~ s the next; the first is called py the
for command.
f.tmp1, f.tmp2, f.tmp3
for
Besides the fact that there is a good deal of the
Fortran language missing, there is no for
command; Fortran is invoked via a command file.
ken, dmr
11/3/71
NAME
SYNOPSIS
DESCRIPTION
FILES
SEE ALSO
DIAGNOSTICS
BUGS
OWNER
/ETC/GLOB (VII)
glob global
glob is exeaod arguments to the shell
containing * or ? It is passed the
list containing the metacharacters; glob expands
the list and calls the command itself.
sh
" "
no command
load a command from /bin. Also if
* ? fails to generate
matches, No match is typed and the command is
not executed.
dmr
11 /3/71
NAME
SYNOPSIS
DESCRIPTION
/ETC/INIT (VII)
init process initialization
init is invoked inside UNIX as the last step in
the boot procedure. It first carries out several
housekeeping duties: it must change the modes of
the tape files and the RK disk file to 17, be-
cause if the system crashed while a ta2 or rk
command was in progress, these files would be
inaccessible; it also truncates the file
/tmp/utmp, which contains a list of UNIX users,
again as a recovery measure in case of a crash.
Directory is assigned via as
resident on the RK disk.
init then forks several times so as to create one
process for each typewriter channel on which a
user may log in. Each process changes the mode
of its typewriter to 15 (read/write owner,
write-only non-owner; this guards against random
users stealing input) and the owner to the
super-user. Then the typewriter is opened for
reading and writing. Since these opens are for
the first files open in the process, they receive
the file descriptors 0 and 1, the standard input
and output file descriptors. It is likely that
no one is dialled in when the read open takes
place; therefore the process waits until someone
calls. At this point, init types its "login:"
message and reads the response, which is looked
up in the password file. The password file con-
tains each user's name, password, numerical user
ID, default directory, and default shell.
If the lookup is successful and the user can sup-
ply his password, the owner of the typewriter is
changed to the appropriate user ID. An entry is
made in /tmp/utmp for this user to maintain an
up-to-date list of users. Then the user ID of
the process is changed appropriately, the current
directory is set, and the appropriate program to
be used as the Shell is executed.
At some point the process will terminate, either
because the login was successful but the user has
now logged out, or because the login was unsuc-
cessful. The parent routine of all the children
of init has meanwhile been waiting for such an
event. When return takes place from the
wait, init simply forks again, and the child pro-
cess again awaits a user.
There is a fine point involved in reading the
login message. UNIX is presently set up to han-
dle automatically two types of terminals: 150
baud, full duplex terminals with the line-feed
11/3/71
FILES
SEE ALSO
DIAGNOSTICS
BUGS
OWNER
/ETC/INIT (VII)
function (typically, the Model 37 Teletype termi-
nal), and 300 baud, full duplex terminals with
only the line-space function (typically the GE
TermiNet terminal). The latter type identifies
itself by sending a line-break (long space) sig-
nal at login time. Therefore, if a null charac-
ter is received during reading of the login line,
the typewriter moge is ~ t to accommodate this
terminal and the login: message is typed again
(because it was garbled the first time).
Init, upon first entry, checks the switches for
73700. If this combination is set, init will
open /dev/tty as standard input and output and
directly execute /bin/sh. In this manner, UNIX
can be brought up with a minimum of hardware and
software.
/tmp/utmp, /dev/ttyO /dev/ttyn
sh
" " " "
No directory , No shell There are also some
halts if basic I/O files cannot be found in /dev.
ken, dmr
11/3/71
NAME
SYNOPSIS
DESCRIPTION
FILES
SEE ALSO
DIAGNOSTICS
BUGS
OWNER
/ETC/KBD (VII)
kbd keyboard map
cat /etc/kbd
kbd contains a map to the keyboard for model 37
Teletype terminals with the extended character
set feature. If kbd is printed on such a termi-
nal, the following will appear:
<[1234567890-_]-\ )qwertyuiop@ asdfghjkl;: zxcvbnm, ./

>
v
..
' . I
' .
< {!
"
1$%&'()
} -,
)QWERTYUIOP' ASDFGHJKL+*
=- I
ZXCVBNM,.?
<
!'' # $ %& , ( )
ae
jfo
11/3/71
NAME
SYNOPSIS
DESCRIPTION
FILES
SEE ALSO
DIAGNOSTICS
BUGS
OWNER
/ETC/LIBA.A (VII)
l i b a ~ assembly language library
This library is the standard location for
assembly-language subroutines of general use. A
section of this manual is devoted to its con-
tents.
This library is searched when the link editor ld
" "
encounters the -1 argument.
ld; library manual
dmr, ken
11/3/71
NAME
SYNOPSIS
DESCRIPTION
FILES
SEE ALSO
DIAGNOSTICS
BUGS
OWNER
/ETC/LIBB.A (VII)
libb.a B library
This library contains all B-callable subroutines
of general utility. Its contents are detailed in
the library section of t h ~ manual. At present
its contents are:
b
char
getchr
putchr
exit
printf
seek
setuid
stat
time
unlink
wait
lchar
chdir
chmod
chown
close
creat
ex eel
execv
fork.
fstat
getuid
intr
link
makdir
open
read
write
ctime
ken, dmr
11/3/71
NAME
SYNOPSIS
DESCRIPTION
FILES
SEE ALSO
DIAGNOSTICS
BUGS
OWNER
LIBF.A (VII)
/etc/libf.a Fortran library
This library contains all the Frotran runtime
routines. Many are. missing.
f1, f2, f3, f4
Will be renamed, and libf.a reserved for
subroutines and functions.
ken, dmr
11/3/71
NAME
SYNOPSIS
DESCRIPTION
LOGIN, LOGOUT (VII)
logging in and logging out
UNIX must be called from an appropriate terminal.
The two general classes of terminals which UNIX
supports are typified by the 37 Teletype on the
one hand and the GE TermiNet 300 and Memorex 1240
on the other. The principal difference is the
baud rate {150 vs. 300) and the treatment of the
carriage return character. Most terminals
operating at 150, 300, or 1200 baud using the
ASCII character set either work (more or less) at
the moment or can be used by special arrangement.
In particular, special arrangement is necessary
for terminals which do not generate lower-case
ASCII characters.
It is also necessary to have a valid UNIX user ID
and (if desired) password. These may be ob-
tained, together with the telephone number, from
the system administrators.
The same telephone number serves terminals
operating at both the standard speeds. When a
connection is established via a 150-baud terminal
(e.g. TTY 37) UNIX types out "login:"; you
respond with your user name, and, if a mask is
typed, with a password. If the login was sue-
" "
cessful, the @ character is typed by the Shell
to indicate login is complete and commands may be
issued. A message of the day may be typed if
there are Also, if there is a
file called mailbox , you are notified that
someone has sent you mail. (See the mail com-
mand.)
From a 300-baud terminal, the procedure is
slightly different. Such terminals often have a
full-duplex switch, which should be turned on (or
conversely, half-duplex should be turned off).
When a connection with UNIX is established, a few
sarbage .. characters are typed (these are the
login: message at the wrong speed). You should
" "
depress the break key; this is a speed-
independent signal to UNIX that a 300-baud termi-
nal is in use. It will type "login:" (at the
correct speed this time) and from then on the
procedure is the same as described above.
Logging out is simple by comparison (in fact,
sometimes too simple). Simply generate an end-
of-file at Shell level by using the EOT
" ..
character; the login: message will appear again
to indicate that you may log in again.
11/3/71
FILES
SEE ALSO
DIAGNOSTICS
BUGS
O W ~ R
LOGIN, LOGOUT (VII)
It is also possible to log out simply by hanging
up the terminal; this simulates an end-of-file on
the typewriter.
Hanging up on programs which never read the type-
writer or which ignore end-of-files is very
dangerous; in the worst cases, the programs can
only be halted by restarting the system.
ken, dmr
11/3/71
NAME
SYNOPSIS
DESCRIPTION
FILES
SEE ALSO
DIAGNOSTICS
BUGS
OWNER
/ETC/MSH {VII)
msh mini-shell
~ is a heavily simplified version of the Shell.
It reads one line .from the standard input file,
interprets it as a command, and calls the com-
mand.
The mini-shell supports few of the advanced
features of the Shell; none of the following
characters is special:
> < $ \ ; &
"*" .. "
However, and ? are recognized and glob is
called. The main use of msh is to provide a
command-executing facility for various interac-
tive sub-systems.
sh, glob
" "
?
ken, dmr
11/3/71
NAME
SYNOPSIS
DESCRIPTION
FILES
SEE ALSO
DIAGNOSTICS
BUGS
OWNER
/ETC/SUFTAB (VII)
suftab suffix table
suftab is a table of suffixes used to guide
hyphenation in roff. Its first 12 words are not
used (see a.out Its next 26 words point
to the beginning of the subtables for each of the
26 initial letters of a suffix. The first entry
for each suffix is a count of the number of bytes
in the suffix. The second byte of each entry is
a flag indicating the type of suffix. The suffix
itself follows; the high bits of each letter
indicate where come. The table for
each initial suffix letter ends with a zero count
byte.
jfo, dmr, ken
11/3/71
NAME
SYNOPSIS
DESCRIPTION
FILES
SEE ALSO
DIAGNOSTICS
BUGS
OWNER
tabs tab stop set
cat /etc/tabs
/ETC/TABS (VII)
When printed on a suitable terminal, this file
will set tab stops at columns 8, 16, 24, 32,
Suitable terminals include the Teletype model 37
and the GE TermiNet 300.
Since UNIX times delays assuming tabs set every
a, this has become a defacto 'standard.'
ken

You might also like