Installing v7 on SIMH

From Computer History Wiki
Jump to: navigation, search

This is the procedure I'm using to install Research Unix v7 on SIMH's PDP-11 emulator.

I'm using the files from TUHS "/Archive/Distributions/Research/Keith_Bostic_v7/" directory. I've also uploaded the resulting tape to here.

If you are going to build the tape then you'll need the mkdisttap.pl script to output a v7.tap file.

NOTE: Comments at the end of a line of the form:

[## Comment]

are just to tell you what to do when there is ambiguity; please do not type them in literally!

Tape Install

tapei.ini

cat > tapei.ini <<EOF
set cpu 11/45
set cpu idle
set rp0 rp06
att rp0 rp06-0.disk
att tm0 v7.tap
boot tm0
EOF
boot tm0

with the config in hand, then let's install.

installation

pdp11 tapei.ini 

PDP-11 simulator V3.8-1
Disabling XQ
RP: creating new file
Overwrite last track? [N]	[## Just hit enter]
Boot
:

I just hit enter to the "Overwrite last track" question, then the bootloader will appear. We are going to load the 3rd program on the tape, mkfs and format the 'a' partition.

Boot
: tm(0,3)
file sys size: 5000
file system: hp(0,0)
isize = 1600
m/n = 3 500
Exit called
Boot
:

The block size comes out of pre-compiled disk sizes in the kernel. Unix back then wasn't as dynamic as what we like in these modern times...

Boot
: tm(0,4)
Tape? tm(0,5)
Disk? hp(0,0)
Last chance before scribbling on disk.	[## Just hit enter]
End of tape
Boot
:

Once the formatting is complete, then it'll drop back to the bootloader, and we are going to load the 4th program which is the restore program, and we'll restore the root partition.

Now we can boot up UNIX from the hard disk, and setup the OS. The console driver echoes everything in upper case letters, however all command are entered in lowercase. We'll set stty to lowercase and speed up carriage returns and linefeeds.

Boot
: hp(0,0)hptmunix
mem = 177344
# STTY -LCASE NL0 CR0
#

Copy the kernel to unix and remove the extra versions.

# mv hptmunix unix
# rm hp*ix
# rm rp*ix
# ls *ix
unix
#

Create the RP06 devices in /dev.

# 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
#

Create the TU10 devices in /dev.

# 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
#

Create an empty filesystem on the RP06 and check it.

# cd /
# /etc/mkfs /dev/rp3 322278
isize = 65496
m/n = 3 500
# icheck /dev/rp3
/dev/rp3:
files      2 (r=1,d=1,b=0,c=0)
used       1 (i=0,ii=0,iii=0,d=1)
free  314088
missing    0
# 

Fastforward the tape and restore the /usr filesystem to the RP06.

# dd if=/dev/r#nrmt0 of=/dev/null bs=20b files=6
202+80 records in
202+75 records out
# restor rf /dev/rmt0 /dev/rp3
Last chance before scribbling on /dev/rp3.	[## Just hit enter]
End of tape
#

Mount /usr, copy the bootblock to the RP06, sync and exit the sim.

# /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
# sync
#		                   [## Type CTRL-E (^E) here]
Simulation stopped, PC: 002306 (MOV (SP)+,177776)
sim> q
Goodbye

Normal boot

Create a normal boot ini file for booting directly from the RP06. Note that SIMH will display Disabling XQ and wait for you to type boot to start the actual boot process on the RP06.

nboot.ini

echo
echo After Disabling XQ is displayed type boot
echo and at the : prompt type hp(0,0)unix
echo
set cpu 11/70
set cpu 2M
set cpu idle
set rp0 rp06
att rp0 rp06-0.disk
boot rp0

And let's boot up!

pdp11 nboot.ini 

PDP-11 simulator V3.8-1

After Disabling XQ is displayed type boot
and at the : prompt type hp(0,0)unix

Disabling XQ
boot	                           [## Type boot here to get the actual boot prompt]
Boot
: hp(0,0)unix
mem = 2020544
#		                   [## Type CTRL-D (^D) here to enter multi-user mode]

RESTRICTED RIGHTS: USE, DUPLICATION, OR DISCLOSURE
IS SUBJECT TO RESTRICTIONS STATED IN YOUR CONTRACT WITH
WESTERN ELECTRIC COMPANY, INC.
WED DEC 31 19:03:27 EST 1969

login: root
Password:
You have mail.
#		                   [## Type CTRL-E (^E) here]

Simulation stopped, PC: 002306 (MOV (SP)+,177776)
sim> q
Goodbye

The default root password is 'root'.

Additional Information

A longer tutorial describing the installation and configuration process in additional detail is available online here and as a printable PDF here. As of October, 26, 2017, version 1.6 of the tutorial covers the basic installation from tape to disk, booting from the disk, reconfiguring the system, rebuilding the kernel, logging in as root, and as dmr, sending and reading system mail, and enabling the V7 instance and SimH to allow multiple sessions from the host machine to the instance via Telnet.

See also