PDP-11 running UNIX v6 in Google Compute Platform (GCP) using SIMH

Wow!  This post is months overdue!  I blame work, more work, Destiny2, other work, Edinburgh Fringe Festivalother other work, and beer.

This post is a quick overview of my GitHub repo (pdp-11-in-gcp) and how it works to create a fully functional UNIX system from 1976 (UNIX V6) “in the cloud”. It has everything you need to run your own piece of UNIX history.

For the most part, this is an automation of the instructions from http://gunkies.org/wiki/Installing_Unix_v6_(PDP-11)_on_SIMH

This assumes that you have a functioning GCP account with billing enabled, and have at least skimmed earlier posts in this series.

This repo includes several scripts and configuration files:

* launch-pdp11.sh – The master script creates a place to run the SIMH emulator, and builds the emulator. Part of this process is loading another script on to the GCP instance.

* update-os-build-simh.sh – This script is copied on to the GCP Ubuntu instance and gets the SIMH PDP-11 emulator running in the instance. When this script completes, you have a running Ubuntu system with a PDP-11 emulator ready to install v6 UNIX.

The end of the launch-pdp11.sh script provides instructions on how to install V6 UNIX into the emulator. This requires manually running three commands while logged into the GCP Ubuntu instance. Due to limitations of EXPECT, there are a few places where you will need to manually halt the emulator (^E).

* simh-master/BIN/pdp11 tboot.ini – This starts the emulator and does a “tape boot” from an emulated tape image and copies the minimal root filesystem on to the emulated RK disk (which is a file on the Ubuntu host).

* simh-master/BIN/pdp11 buildunix.ini – This script uses extreme expect hackery to do LOTS of customization of the kernel to support an RK disk 

* simh-master/BIN/pdp11 normalboot.ini – boots the fully functional PDP-11 with all software. Use this for all subsequent boots of the UNIX guest

One of the most fun parts of this project was dealing with SIMH’s internal EXPECT function. In the “olden days” you had to change the kernel source code to configure tables for each device driver that you wanted included in a new kernel.  I’ll show some of that in the next post.

, , , ,