4.3BSD on an emulated VAX with SIMH

2014/12/23
To dive a little into the history of UNIX, I wanted to try out some early UNIX operating systems. The original UNIX was developed on the DEC PDP-7 computer in 1969. The PDP-7's resources were so limited that the entire operating system had to be written in assembler, which was a common thing to do back then. A few years later it was rewritten in the then new programming language C. It ran on the DEC PDP-11 computers. BSD was derived from the original UNIX in the late 1970s and like the original UNIX it ran on PDP-11 computers. Later it was ported to the DEC VAX line of computers.

As it is not that easy to acquire such old hardware (and even if it was, those systems would take quite a lot of space, not to mention their power requirements), using an emulator to play with old operating systems is the obvious way to go here.
Here I am using SIMH for emulation. SIMH is a collection of emulators of several old mini computer systems including the PDP-11 and VAX series. It also emulates early micro computers like the MITS Altair 8800 micro computer. SIMH is portable and works fine on many operating system, including modern BSDs.

I have chosen 4.3BSD as the operating system I want to emulate, because it is one of the earliest UNIX systems that support TCP/IP networking and yet it is fairly easy to emulate. 4.3BSD runs on VAX computers. The Computer History Wiki has pretty good instructions on how to install 4.3BSD on a SIMH emulated VAX. There are even tape images available that can be used for the installation. I chose the Quasijarus release of 4.3BSD. Following the instructions easily leads to a working system. Only a few things are missing from those instructions, the most important thing for me was networking support. Fortunately, it is pretty easy to get TCP/IP networking to work. First the VAX network interface needs to be enabled in the emulators machine configuration file:
att xq em0
Once that's done the emulated machine's network interface (called qe0 in 4.3BSD) is linked to the host's network interface (em0 in my case). After following the installation instructions and logging in to the new BSD installation, the VAX' network interface can be configured with the 'ifconfig' command, like so:
ifconfig qe0 192.168.49.67
The a default route can be configured with 'route', e.g.:
route add default 192.168.49.1 1
Those commands can be added to the /etc/rc.local file to be run on each boot.

To be able to lookup hostnames a nameserver should be configured:
echo "nameserver 192.168.49.1" >/etc/resolv.conf
At this point the 4.3BSD system can access computers on the LAN (all computers on the LAN except the host machine; due to the way the emulated machine's network packages are injected into the hosts network interface the host system cannot see them) as well as the Internet.

This is all nice, but there is one more thing I wanted: Accessing the VAX through telnet from outside the emulator. The 4.3BSD installation runs telnetd (through inetd) by default, so this does not need to be configured manually. Unfortunately, when trying to connect with telnet to the machine, all I got was an error message and then the connection was closed:
telnetd: All network ports in use.
This message is somewhat misleading. There were no other users connected to the machine, so how can all ports be used? As it turned out, telnetd needs pty devices in /dev and there were none available. Creating those devices is easy:
cd /dev
./MAKEDEV pty0
./MAKEDEV pty1
./MAKEDEV pty2
Once that's done, telnetd allowed me to login to the machine.
$ telnet 192.168.49.67
Trying 192.168.49.67...
Connected to 192.168.49.67.
Escape character is '^]'.

4.3 BSD UNIX (myname.my.domain) (ttyp0)

login: j0n
To be able to login, an unpriviledged user needs to be configured first with a password (using the passwd command).

There was one little annoyance remaining with my emulated VAX machine. SIMH was using all CPU time it could (on one of my CPU's cores, that is) to run as fast as possible, even when there was no work to be done. Adding one line to the machine configuration file solves this issue (on my PC at least, some host environments do not seem to support this):
set cpuidle=32v
My entire SIMH machine configuration file (boot.ini) looks like this:
set cpu idle=32v
set cr dis
set lpt dis
set rl dis
set ry dis
set ts dis
att xq em0
set rq0 ra82
att rq0 quas.dsk
set rq1 dis
set rq2 dis
set rq3 dis
att tq0 4.3BSD-Quasijarus0c.tap
set tti 7b
set tto 7b
att nvr nvram.dat
dep bdr 1
boot cpu
If you have any questions or suggestions or you want to share some information, feel free to leave a comment.
j0n^sdf

Comments

Pascale (website) wrote:
2019-09-03 07:24:29
Hello, I have telnetd: All network ports in use.
I tried your solution, but not working.
./MAKEDEV pty0
-bash: ./MAKEDEV: Aucun fichier ou dossier de ce type
ySCe (website) wrote:
2024-01-01 05:46:28
gtGK
2024-01-01 05:46:30
gtGK
2024-01-01 05:46:31
gtGK
ySCe (website) wrote:
2024-01-01 05:46:31
gtGK
ySCe (website) wrote:
2024-01-01 05:46:32
gtGK
ySCe (website) wrote:
2024-01-01 05:46:33
gtGK
ySCe (website) wrote:
2024-01-01 05:46:34
gtGK
ySCe (website) wrote:
2024-01-01 05:46:34
gtGK(,)'."..,(
ySCe (website) wrote:
2024-01-01 05:46:35
gtGK'orFFrY<'">PpJGag
ySCe (website) wrote:
2024-01-01 05:46:35
gtGK
ySCe (website) wrote:
2024-01-01 05:46:35
gtGK
ySCe (website) wrote:
2024-01-01 05:46:36
gtGK
ySCe (website) wrote:
2024-01-01 05:46:36
gtGK
rZEg (website) wrote:
2024-01-03 00:32:07
irYl
2024-01-03 00:32:07
irYl
2024-01-03 00:32:07
irYl
rZEg (website) wrote:
2024-01-03 00:32:08
irYl
rZEg (website) wrote:
2024-01-03 00:32:08
irYl
rZEg (website) wrote:
2024-01-03 00:32:09
irYl
rZEg (website) wrote:
2024-01-03 00:32:09
irYl
rZEg (website) wrote:
2024-01-03 00:32:10
irYl,,.'."),.(
rZEg (website) wrote:
2024-01-03 00:32:11
irYl'AyEUyj<'">MCitWC
rZEg (website) wrote:
2024-01-03 00:32:11
irYl
rZEg (website) wrote:
2024-01-03 00:32:11
irYl
rZEg (website) wrote:
2024-01-03 00:32:12
irYl
rZEg (website) wrote:
2024-01-03 00:32:12
irYl

Leave a comment

Name
E-Mail
Website
Homepage
Comment