next_inactive up previous


VTserver: Installing a PDP-11 UNIX with No Tape Drive

Warren Toomey

wkt@cs.adfa.edu.au

Version 2.0, 30th February,2001

Caveat

Before you even start looking at this software, there are some caveats which go with it.

  1. The VTserver software should be considered in alpha release. Your feedback is most definitely requested, to fix any bugs and to improve the software.

  2. I have never owned or used a real PDP-11. The VTserver software was developed using a number of PDP-11 emulators. For this reason, there may be hardware-specific bugs in the software which were not found using the emulators. As well, the terminology in this manual may not be correct PDP-11 speak. Again, please send me your suggestions and improvements!

Introduction

Several members of the PUPS mailing list (see http://minnie.cs.adfa.edu.au/PUPS/) have wanted a way of installing UNIX onto a PDP-11 which has no tape drive. One solution, if the PDP-11 has software already installed (RT-11, RSX etc.) is to leverage from the installed software to download and write UNIX onto a spare disk. This approach is not covered here, and someone who has done this should be encouraged to write it up.

The approach here has been to modify the initial UNIX tape loading software so that bits can be downloaded from a nearby computer over a serial cable. The modified boot straps thus perceive a Virtual Tape drive; hence the name of the software.

The VTserver software comes as two components: a set of PDP-11 software which acts as the client, and the server which is hosted on a second machine, running Unix.

The two computers are connected via an RS-232 null modem with hardware handshaking. A KL/DL-11 unit on the PDP-11 is used as the serial port: the highest transfer rate is 9,600 bps. Although this is a way to install UNIX on a PDP-11, its a pretty slow way.

Manifest

The VTserver software is available from ftp://minnie.cs.adfa.edu.au/pub/PDP-11/Vtserver as the file
vtserver2.0.tar.gz. You should have received the following files as part of the VTserver software:

vtreadme.txt:
This document in plain ASCII. There may be an equivalent PostScript file, vtreadme.ps.
vtserver.c:
The source code to the server program.
.vtrc:
The server's configuration file.
vtboot.pdp:
The machine code to bootstrap using the vtserver.
tinyboot:
Second stage bootstrap.
copy:
Essentially a standalone copying program.

You will also need a root disk image for your PDP-11, one that is known to work for your model. I recommend that you use one of the available PDP-11 emulators plus the versions of UNIX in the UNIX Archive to create one of these. Don't bother reading any further until you know that your disk image will work.

Compiling vtserver

The first thing to do is to compile vtserver.c:

  $ cc -o vtserver vtserver.c

The code is pretty vanilla ANSI C. The only system-specific section is that on setting the serial port to raw mode, and select(). I have used the Posix termios system calls, and you may need to port this if your system isn't Posix-compatible. Please send patches back to me for this.

The file .vtrc is the server's configuration file. Lines beginning with hashes are ignored. The first (non-hashed) gives a shell command to set the correct speed and parity of the serial line. The second line names the serial device. Remaining lines name the fictitious tape's records, and should be tinyboot, copy, and the name of your disk image.

You will most likely need to change the name of the serial port device and the shell command to set it up.

Connecting the PDP-11 to the vtserver

The console KL-11 unit needs to be connected via RS-232 to the serial port on the Unix server where you compiled vtserver.c. Ok, I have no experience here as I don't have a real PDP-11. I'd strongly recommend using a null modem cable with full hardware handshaking lines (RTS/CTS and DTR/DSR).

You should configure the KL-11 for 9600 baud, 8 bits, no parity, and you should do the same for the Unix server. On my FreeBSD box, the shell command in my .vtrc is:

  $ stty -f /dev/ttyid1 9600 cs8 clocal -crtscts

If you are using hardware handshaking lines (and you should), change this to

  $ stty -f /dev/ttyid1 9600 cs8 -clocal crtscts

I'd also recommend having a copy of Kermit on the Unix server end. If no communication seems to be taking place, open the serial line with Kermit, and see if characters are being received from the PDP-11. An RS-232 breakout box here could also be useful.

Starting vtserver

vtserver is started with no arguments, and reads its configuration file .vtrc. You should have done the serial port settings before this. vtserver starts up with a short description of the tape's contents:

  Virtual tape server, $Revision: 2.0 $ 
  Running command stty -f /dev/ttyid1 9600 cs8 clocal -crtscts

  Tape records are:
     0 tinyboot
     1 copy
     2 root.img

  Opening port /dev/ttyd1 .... Port open

It will then sit there waiting for commands from the PDP-11. When commands are being performed, you will see something like the following:

  Opened tinyboot
   rrrrrrrrrrrrrr EOF

  40tinyboot from virtual tape server
  Load tape record: 1

  Opened copy
   rrrrrrrrrrrrrrrrrrrrrrrrrrrrrrcopy
  Infile: vt(0,0,2)
  Outfile: rk(0,0,0)

  Opened root.img
   rrrrrrrrrr ...

As each file is opened, it is shown on the screen. `r' signifies a read of 512 bytes. If the PDP-11 tries to read past the file's end, an EOF is shown. Finally, a progress message is shown every 100K of a file's download.

vtserver is terminated by two consecutive ESC keys at the console.

Booting via vtserver

The first stage of the boot process is to enter the boot code which retrieves the file boot from the vtserver. This code should be entered at address 070000 onwards. The code is given in the vtboot.pdp, and in octal below.

0070000: 010706 005001 012703 177560 012704 070102 112400 100406
0070020: 105763 000004 100375 110063 000006 000770 005267 000046
0070040: 004767 000024 001401 005007 012702 001000 004767 000010
0070060: 110021 005302 001373 000750 105713 100376 116300 000002
0070100: 000207 025037 000000 000000 177777

Help! It would be nice for the server to send ODT commands to the PDP-11 to make this easier. Any ideas?

Toggle in the code, and start execution at address 70000. If all goes well, you will see ``40tinyboot from virtual tape server'' from vtserver, and you will receive the following on the PDP-11 console.


Second-Stage Bootstrap

Once tinyboot is loaded you will see the following on the PDP-11 console:

  40tinyboot from virtual tape server
  Load tape record:

This is the tinyboot. Enter the number of the tape record that you wish to load (most likely 1 for copy).

When copy loads, you will be prompted for the input file and the output file. copy uses the 2.11BSD terminology for devices, units and partitions, and you should probably read the 2.11BSD setup documentation here.

Available devices are:

br
RP03-like disk driver, modified to handle BR 1537 and 1711 controllers with T300, T200, T80 and T50 drives.
hk
RK06/07 disk driver.
ra
MSCP disk device driver (rx23, rx33, rx50, rd??, ra??, rz??).
rk
RK disk driver.
rl
RL disk driver.
rx
RX02 disk driver.
si
SI 9500 CDC 9766 disk driver.
vt
Virtual Tape drive.
xp
SMD disk driver.

Use the device vt(0,0,x) to read from virtual tape record x.

Other Comments

The vtboot directory holds the source code for the PDP-11 side of things: vtboot.pdp, tinyboot and copy. To compile all of this, you'll need a 2.11BSD system. Place this directory in /usr/src/sys, and run make. See the RCS comments for details.

I have `ported' some of the standalone 2.11BSD commands, which get made by make. I also want to port the V6 and V7 standalone commands.