Running NetBSD on a VAX-11/780
What you do when 4.3BSD is too hard to compile on
Why?
Because it sounds fun! I was working on setting up my VAX-11/780 to display in the booth for
my museum MoBATCH at the
SC25 conference in St. Louis, Missouri, and was running into limitations with 4.3BSD on it missing some things, like unistd.h and stdlib.h while trying to compile a webserver to run on it, so I thought I'd put some effort into getting NetBSD going on it. If you want to see the VAX in person, and happen see this in time - we'll be at booth 3328 near the main SCinet NOC.
Getting NetBSD installed
I used NetBSD 1.6.1, and
have a copy up on my website. Unfortunately, due to a catastrophic disk failure, most older copies of NetBSD were lost a few years ago. I happened to have this copy. NetBSD 1.5 - 1.6 seems to be the best version to run on a VAX, before things got too bloated.
I first built and compiled the
latest OpenSIMH, and used the
vax780 simulator to install it.
I created a simulator startup file, based on the start-up file for 4.3BSD Quasijarius
from this guide, but modified it to work with the 11/780 simulator. I have the one I used
available here. You may want to adjust the type of the
rq0 disk to match the hardware you'll end up running it on.
My simulator example has a fairly minimal system, with 16MB of RAM configured, a single TMSCP tape device, a few MSCP disks for for the system image (rq0 as an RA92 - netbsd.dsk) somewhere you can send output to (rq1 as an RA80 - output.dsk), and the CDROM image (rq2 as an rrd40), a set of 8 terminal mux lines that accept connections from tcp port 8023, and a DELUA ethernet controller that simh will try to connect to a physical device using libpcap, which I connect to "br0", but you may want to change to your actual network interface.
To start simh, just:
$ vax780 netbsd.ini
At the sim> prompt, you can do this to boot the install tape:
sim> boot rq2
Just run through the NetBSD installer as you normally would.
When you're done, you can do this to boot the installed system:
sim> boot rq0
The emulator file has an "rq1" device, which I used to make it easier to get files out of the simulated environment without doing the work to get the networking going.
The next thing I did was to dd the disk image (netbsd.dsk) to a real SCSI disk, which I have attached to an Emulex UC17 SCSI controller in the VAX's UNIBUS, and booted that. Unlike 4.3BSD, NetBSD uses a bootblock on the disk for booting, so it'll boot using VMB.EXE. I modified a script on the console disk that was used to boot VMS to boot NetBSD. The main change that needed to be done is setting R5 to be 8 instead of the default, which tells VMB.EXE to boot using the boot block instead of trying to look for an ODS filesystem. I booted my machine off of RA2 (the 3rd device on the MSCP SCSI controller), you will need to adjust that to the device number you're using.
You can
download the console boot script, but here's a copy as well. Note that NetBSD doesn't have a way to access the console floppy, so you'll probably need to boot VMS, 4.3BSD, or edit the floppy another way to put this on the disk. You can also enter the commands by hand. Note that you can abbreviate most of these; you'll figure that out after you've typed them a few times:
!
! DU2 BOOT COMMAND FILE - DU2OO.CMD
!
!
HALT
UNJAM
INIT
DEPOSIT/I 11 20003800 ! SET UP SCBB
DEPOSIT R0 11 ! UDA-MSCP DISK
DEPOSIT R1 3 ! UBA TR=3
DEPOSIT R2 3F468 ! CSR ADDRESS OFFSET = 3F468
DEPOSIT R3 2 ! CONTROLLER UNIT = 2
DEPOSIT R4 0 ! BOOT BLOCK LBN (UNUSED)
DEPOSIT R5 8 ! SOFTWARE BOOT FLAGS
DEPOSIT FP 0 ! SET NO MACHINE CHECK EXPECTED
START 20003000 ! START ROM PROGRAM
WAIT DONE ! WAIT FOR COMPLETION
!
EXAMINE SP ! SHOW ADDRESS OF WORKING MEMORY+^X200
LOAD VMB.EXE/START:@ ! LOAD PRIMARY BOOTSTRAP
START @ ! AND START IT
You can likely use the same script to boot off an MSCP attached CD-ROM drive, or disk with the install CD dd'd to it, but I didn't try that. I wanted to iron out the wrinkles on the (much faster) simulated VAX before I did it on the real thing.
Next steps
Configure things as you want. By default, you get ipv6. Just imagine running ipv6 on a machine from 1978!
I added a few things to /etc/rc.conf, mostly to speed up boot:
rc_fast_and_loose=YES
hostname=vax780
savecore=NO
You'll want to make an /etc/ifconfig.de0 for the network interface, add the hostname to /etc/hosts, and the other usual network configuration, and probably enable inbound telnet and ftp by editing /etc/inetd.conf. I can't imagine how slow ssh would be, so I do not recommend trying. Note that you may want to go through and disable more services. When booted on my system with 12MB of RAM, I had about 5.5MB available after the system booted.