Difference between revisions of "Installing UNIX v6 (PDP-11) on SIMH"

From Computer History Wiki
Jump to: navigation, search
Line 87: Line 87:
 
</pre>
 
</pre>
  
 +
=== Booting up to single user mode ===
 
And this will boot us up to the bootloader, to which we just tell it to load the 'unix' kernel.
 
And this will boot us up to the bootloader, to which we just tell it to load the 'unix' kernel.
 
<pre>
 
<pre>
Line 110: Line 111:
 
</pre>
 
</pre>
  
 +
=== Fixing the Terminal ===
 +
The first thing we are going to do with UNIX loaded is set the terminal back to lowercase...  Enter the following command in lower case, it'll echo back in upper case, but that's just the way it works.
  
 +
<pre>
 +
# STTY -LCASE
 +
</pre>
 +
 +
=== Rebuilding the kernel ===
 +
We are going to rebuild the kernel to support the appropriate hardware that SIMH provides.  First we must build the mkconf program
 +
<pre>
 +
chdir /usr/sys/conf
 +
cc mkconf.c
 +
mv a.out mkconf
 +
</pre>
 +
 +
With the mkconf program built, we then feed it a basic configuration file.  To do this we just run mkconf, then type in the list of devices we want.
 +
<pre>
 +
rk
 +
tm
 +
tc
 +
8dc
 +
done
 +
</pre>
 +
 +
And you'll get this:
 +
<pre>
 +
# ./mkconf
 +
rk
 +
tm
 +
tc
 +
8dc
 +
done
 +
#
 +
</pre>
 +
 +
Now we can compile the config, and link in the rest of the kernel, and copy it to the root.
 +
 +
<pre>
 +
as m40.s
 +
mv a.out m40.o
 +
cc -c c.c
 +
as l.s
 +
ld -x a.out m40.o c.o ../lib1 ../lib2
 +
mv a.out /unix
 +
</pre>
  
 
[[Category:SIMH Tutorials]]
 
[[Category:SIMH Tutorials]]

Revision as of 22:30, 15 November 2010

I'm going to try to describe the install procedure used by Tim Newsham for Unix v6 on the PDP-11/40.

Materials

I'm going to expect you to have the SIMH emulator, 3.8-1 or higher, and a Unix v6 tape Unix-v6-Ken-Wellsch.tap

Tape boot

Here we load the bootblock and load up the root partition onto the rk disk file...

First the tboot.ini file:

set cpu 11/40
set tm0 locked
attach tm0 dist.tap
attach rk0 rk0
attach rk1 rk1
attach rk2 rk2
d cpu 100000 012700
d cpu 100002 172526
d cpu 100004 010040
d cpu 100006 012740
d cpu 100010 060003
d cpu 100012 000777
g 100000

Once this is run, the simulation will 'lock', hit CTRL+E to break the emulation, and then execute the stand alone program to prepare the hard disk. Type in:

g 0

And the stand alone program will be ready to respond. Here is my install session:

PDP-11 simulator V3.8-1
sim> set cpu 11/40
Disabling XQ
sim> set tm0 locked
sim> attach tm0 dist.tap
sim> attach rk0 rk0
RK: creating new file
sim> attach rk1 rk1
RK: creating new file
sim> attach rk2 rk2
RK: creating new file
sim> d cpu 100000 012700
sim> d cpu 100002 172526
sim> d cpu 100004 010040
sim> d cpu 100006 012740
sim> d cpu 100010 060003
sim> d cpu 100012 000777
sim> g 100000

Simulation stopped, PC: 100012 (BR 100012)
sim> g 0
=tmrk
disk offset
0
tape offset
100
count
1
=tmrk
disk offset
1
tape offset
101
count
3999
=
Simulation stopped, PC: 137300 (BGE 137274)
sim> q
Goodbye

disk install

Here is our dboot.ini for booting from the hard disk:

set cpu 11/40
set tto 7b
set tm0 locked
attach tm0 dist.tap
attach rk0 rk0
attach rk1 rk1
attach rk2 rk2
dep system sr 173030
boot rk0

Booting up to single user mode

And this will boot us up to the bootloader, to which we just tell it to load the 'unix' kernel.

PDP-11 simulator V3.8-1
sim> set cpu 11/40
Disabling XQ
sim> set tto 7b
sim> set tm0 locked
sim> attach tm0 dist.tap
sim> attach rk0 rk0
sim> attach rk1 rk1
sim> attach rk2 rk2
sim> dep system sr 173030
sim> boot rk0
@unix
mem = 1030
RESTRICTED RIGHTS

Use, duplication or disclosure is subject to
restrictions stated in Contract with Western
Electric Company, Inc.
#

Fixing the Terminal

The first thing we are going to do with UNIX loaded is set the terminal back to lowercase... Enter the following command in lower case, it'll echo back in upper case, but that's just the way it works.

# STTY -LCASE

Rebuilding the kernel

We are going to rebuild the kernel to support the appropriate hardware that SIMH provides. First we must build the mkconf program

chdir /usr/sys/conf
cc mkconf.c
mv a.out mkconf

With the mkconf program built, we then feed it a basic configuration file. To do this we just run mkconf, then type in the list of devices we want.

rk
tm
tc
8dc
done

And you'll get this:

# ./mkconf
rk
tm
tc
8dc
done
#

Now we can compile the config, and link in the rest of the kernel, and copy it to the root.

as m40.s
mv a.out m40.o
cc -c c.c
as l.s
ld -x a.out m40.o c.o ../lib1 ../lib2
mv a.out /unix