Installing v7 on SIMH: Difference between revisions

From Computer History Wiki
Jump to navigationJump to search
Decuser (talk | contribs)
No edit summary
Decuser (talk | contribs)
Minor corrections and updated to boot directly from RP06
Line 1: Line 1:
This is the procedure I'm using to install [[Seventh Edition Unix|Research Unix v7]] on [[SIMH]]'s [[PDP-11]] emulator.
This is the procedure I'm using to install [[Seventh Edition Unix|Research Unix v7]] on [[SIMH]]'s [[PDP-11]] emulator.


I'm using the files from [[TUHS]] "/PDP-11/Distributions/research/Keith_Bostic_v7/" directory.  I've also uploaded the resulting tape to [https://sourceforge.net/projects/bsd42/files/Install%20tapes/Research%20Unix/Unix-v7-Keith-Bostic.tap.bz2/download here].
I'm using the files from [[TUHS]] "/Archive/Distributions/Research/Keith_Bostic_v7/" directory.  I've also uploaded the resulting tape to [https://sourceforge.net/projects/bsd42/files/Install%20tapes/Research%20Unix/Unix-v7-Keith-Bostic.tap.bz2/download here].


If you are going to build the tape then you'll need the [[Mkdisttap.pl#Research Unix v7|mkdisttap.pl]] script to output a v7.tap file.
If you are going to build the tape then you'll need the [[Mkdisttap.pl#Research Unix v7|mkdisttap.pl]] script to output a v7.tap file.
Line 16: Line 16:
=== tapei.ini ===
=== tapei.ini ===
<pre>
<pre>
cat > tapei.ini <<EOF
set cpu 11/45
set cpu 11/45
set cpu idle
set cpu idle
Line 21: Line 22:
att rp0 rp06-0.disk
att rp0 rp06-0.disk
att tm0 v7.tap
att tm0 v7.tap
boot tm0
EOF
boot tm0
boot tm0
</pre>
</pre>
Line 28: Line 31:
=== installation ===
=== installation ===
<pre>
<pre>
c:\temp\v7>pdp11.exe tapei.ini
pdp11 tapei.ini  


PDP-11 simulator V3.8-1
PDP-11 simulator V3.8-1
Disabling XQ
Disabling XQ
Overwrite last track? [N]             [## Just hit enter]
RP: creating new file
Overwrite last track? [N] [## Just hit enter]
Boot
Boot
:  
:
</pre>
</pre>
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.
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.
Line 56: Line 60:
Tape? tm(0,5)
Tape? tm(0,5)
Disk? hp(0,0)
Disk? hp(0,0)
Last chance before scribbling on disk.   [## Just hit enter]
Last chance before scribbling on disk. [## Just hit enter]
End of tape
End of tape
Boot
Boot
Line 63: Line 67:
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.
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 seems to get confused, and echo's everything back in uppercase, however all command are entered in lowercase.
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.
<pre>
<pre>
Boot
Boot
: hp(0,0)hptmunix
: hp(0,0)hptmunix
mem = 177344
mem = 177344
# MV HPTMUNIX UNIX
# STTY -LCASE NL0 CR0
# RM HP*IX
#
# LS *IX
</pre>
RPHTUNIX
 
RPTMUNIX
Copy the kernel to unix and remove the extra versions.
UNIX
<pre>
# RM RP*IX
# mv hptmunix unix
# CD /DEV
# rm hp*ix
# MAKE RP06
# rm rp*ix
/ETC/MKNOD RP0 B 6 0
# ls *ix
/ETC/MKNOD SWAP B 6 1
unix
/ETC/MKNOD RP3 B 6 7
#
/ETC/MKNOD RRP0 C 14 0
</pre>
/ETC/MKNOD RRP3 C 14 7
 
CHMOD GO-W RP0 SWAP RP3 RRP0 RRP3
Create the RP06 devices in /dev.
# MAKE TM
<pre>
/ETC/MKNOD MT0 B 3 0
# cd /dev
/ETC/MKNOD RMT0 C 12 0
# make rp06
/ETC/MKNOD NRMT0 C 12 128
/etc/mknod rp0 b 6 0
CHMOD GO+W MT0 RMT0 NRMT0
/etc/mknod swap b 6 1
# CD /
/etc/mknod rp3 b 6 7
# /ETC/MKFS /DEV/RP3 322276
/etc/mknod rrp0 c 14 0
ISIZE = 65496
/etc/mknod rrp3 c 14 7
M/N = 3 500
chmod go-w rp0 swap rp3 rrp0 rrp3
# DD IF=/DEV/NRMT0 OF=/DEV/NULL BS=20B FILES=6
#
202+80 RECORDS IN
</pre>
202+75 RECORDS OUT
 
# RESTOR RF /DEV/RMT0 /DEV/RP3
Create the TU10 devices in /dev.
LAST CHANCE BEFORE SCRIBBLING ON /DEV/RP3.     [## Hit enter here, this will take some time before the next line is printed]
<pre>
END OF TAPE
# make tm
# /ETC/MOUNT /DEV/RP3 /USR
/etc/mknod mt0 b 3 0
# DD IF=/USR/MDEC/HPUBOOT OF=/DEV/RP0 COUNT=1
/etc/mknod rmt0 c 12 0
0+1 RECORDS IN
/etc/mknod nrmt0 c 12 128
0+1 RECORDS OUT
chmod go+w mt0 rmt0 nrmt0
# SYNC
#
# SYNC
</pre>
# SYNC
 
# SYNC
Create an empty filesystem on the RP06 and check it.
#                                               [## Type CTRL-E (^E) here]
<pre>
# 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
#
</pre>
 
Fastforward the tape and restore the /usr filesystem to the RP06.
<pre>
# 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
#
</pre>
 
Mount /usr, copy the bootblock to the RP06, sync and exit the sim.
<pre>
# /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)
Simulation stopped, PC: 002306 (MOV (SP)+,177776)
sim> q
sim> q
Line 112: Line 151:
</pre>
</pre>


== Tape boot ==
== Normal boot ==
Sadly the rp06 doesn't seem to want to boot... I'll have to troubleshoot it more later, but for now I just boot from the tape, and execute the kernel from the hard disk.
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.


=== tboot.ini ===
=== nboot.ini ===
<pre>
<pre>
echo
echo
echo at the prompt type in
echo After Disabling XQ is displayed type boot
echo @ hp(0,0)unix
echo and at the : prompt type hp(0,0)unix
echo
echo
set cpu 11/70
set cpu 11/70
Line 126: Line 165:
set rp0 rp06
set rp0 rp06
att rp0 rp06-0.disk
att rp0 rp06-0.disk
att tm0 xx.tap
boot rp0
boot tm0
</pre>
</pre>


Line 133: Line 171:


<pre>
<pre>
c:\temp\v7>pdp11.exe tboot.ini
pdp11 nboot.ini  


PDP-11 simulator V3.8-1
PDP-11 simulator V3.8-1


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


Disabling XQ
Disabling XQ
boot                           [## Type boot here to get the actual boot prompt]
Boot
Boot
: hp(0,0)unix
: hp(0,0)unix
mem = 2020544
mem = 2020544
#                                           [## Hit CTRL-D (^D) here]
#                   [## Type CTRL-D (^D) here to enter multi-user mode]
 
RESTRICTED RIGHTS: USE, DUPLICATION, OR DISCLOSURE
RESTRICTED RIGHTS: USE, DUPLICATION, OR DISCLOSURE
IS SUBJECT TO RESTRICTIONS STATED IN YOUR CONTRACT WITH
IS SUBJECT TO RESTRICTIONS STATED IN YOUR CONTRACT WITH
WESTERN ELECTRIC COMPANY, INC.
WESTERN ELECTRIC COMPANY, INC.
WED DEC 31 19:02:48 EST 1969
WED DEC 31 19:03:27 EST 1969


login: root
login: root
Password:
Password:
You have mail.
You have mail.
#
#                   [## Type CTRL-E (^E) here]
 
Simulation stopped, PC: 002306 (MOV (SP)+,177776)
sim> q
Goodbye
</pre>
</pre>



Revision as of 22:52, 4 November 2017

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.