UNIX Seventh Edition
You can get the distribution files from
or from me
and use mkdisttap.pl
to create the distribution tape.
To do this,
gunzip the files and run
./mkdisttap.pl >dist.tap (pre-built).
You can get the documentation from the (mirrored) labs or from me where I have conveniently split the PDFs into the single documents.
You should at least read the Setting Up UNIX document (29_setup.pdf).
Installing the root file system
To install the root file system create an
set cpu 11/45 set cpu idle set rp0 rp06 att rp0 disk0.hp att tm0 dist.tap b tm0
Run simh and install the root file system according to the instructions:
% pdp11 install.ini PDP-11 simulator V3.9-0 Disabling XQ Overwrite last track? [N] Boot : tm(0,3) file sys size: 5000 file system: hp(0,0) isize = 1600 m/n = 3 500 Exit called Boot : tm(0,4) Tape? tm(0,5) Disk? hp(0,0) Last chance before scribbling on disk. End of tape Boot :
Still inside the boot prompt, boot UNIX from your new file system:
: hp(0,0)hptmunix mem = 177344 #
For now we're staying in single user mode, but we use
stty to get some
# STTY -LCASE CR0
If you want, change erase (default
#) and kill (default
to whatever you like using
stty, this is what I do:
# stty erase <press backspace> kill <press ^U>
Creating device files and extracting the rest of the tape
Now create the remaining device files:
# cd /dev # make rp06 /etc/mknod rp0 b 6 0 /etc/mknod swap b 6 1 /etc/mknod rp3 b 6 7 /etc/mknod rrp0 c 14 0 /etc/mknod rrp3 c 14 7 chmod go-w rp0 swap rp3 rrp0 rrp3 # make tm /etc/mknod mt0 b 3 0 /etc/mknod rmt0 c 12 0 /etc/mknod nrmt0 c 12 128 chmod go+w mt0 rmt0 nrmt0 #
Since we're using an RP06 drive, it might be a good idea to read hp(4). The disk is subdivided into eight partitions that we can use for our purposes. The minor number specifies the partition for which a device file stands. In our case, we're using p0 as /, p1 as swap and after the next step p7 as /usr. This way the partitions don't overlap. The size of p7 (rp3) is 771*418=322278 512-byte blocks, which we will now give to mkfs as an argument.
# /etc/mkfs /dev/rp3 322278 isize = 65496 m/n = 3 500 # dd if=/dev/nrmt0 of=/dev/null bs=20b files=6 202+80 records in 202+75 records out # restor rf /dev/nrmt0 /dev/rp3 Last chance before scribbling on /dev/rp3. End of tape #
To be able to boot UNIX from disk we have to copy the boot block, which is on our new partition, so we have to mount it first. After that we halt the system.
# /etc/mount /dev/rp3 /usr # dd if=/usr/mdec/hpuboot of=/dev/rp0 count=1 0+1 records in 0+1 records out # sync # sync # sync # ^E Simulation stopped, PC: 002306 (MOV (SP)+,177776) sim> q Goodbye
Recompiling the Kernel and System Configuration
set cpu 11/45 set cpu idle set rp0 rp06 att rp0 disk0.hp set dci en set dci lines=8 att dci 1107 b rp0
And boot from it, type
^D to get into multiuser mode
and login as
% pdp11 boot.ini PDP-11 simulator V3.9-0 Disabling XQ boot Boot : hp(0,0)hptmunix mem = 177344 # RESTRICTED RIGHTS: USE, DUPLICATION, OR DISCLOSURE IS SUBJECT TO RESTRICTIONS STATED IN YOUR CONTRACT WITH WESTERN ELECTRIC COMPANY, INC. WED DEC 31 19:43:39 EST 1969 login: root Password: You have mail. #
unix and remove the unused kernels:
# mv hptmunix unix # rm hphtunix rp*
The kernel configuration depends on the files
/usr/sys) or rather the object files.
Since the clock is not set up correctly, make will not recompile them,
so delete them before doing anything:
# cd /usr/sys/conf # rm l.o c.o
Let's configure the kernel to support 4 DC11 lines (the default maximum) and create the necessary tty files:
# cp hptmconf myconf # echo 4dc >>myconf # mkconf <myconf console at 60 clock at 100 clock at 104 parity at 114 tm at 224 hp at 254 dc at 300 dc at 310 dc at 320 dc at 330 # make as - -o l.o l.s as -o mch.o mch0.s mch.s cc -c c.c ld -o unix -X -i l.o mch.o c.o ../sys/LIB1 ../dev/LIB2 # mv unix /myunix # ed /etc/ttys 266 2,5s/./1/ w 266 q # /etc/mknod /dev/tty00 c 3 0 # /etc/mknod /dev/tty01 c 3 1 # /etc/mknod /dev/tty02 c 3 2 # /etc/mknod /dev/tty03 c 3 3
Now reboot the
myunix kernel and you'll be able to connect to your UNIX
telnet localhost 1107.
If you're sure the kernel is working,
you can delete the old one and rename the new kernel
That's all for now, have fun.