Monday, October 19, 2020

Installing MIT Project Athena 4.3BSD onto a VAX

Athena 4.3BSD is an MIT modification of 4.3BSD for their Project Athena distributed computing environment. Although it is designed to work in such an environment, it can be installed and used on a single machine. A few things do break, but there are ways around that.

First, you need the Athena 4.3BSD srvd tree, and a way to boot the VAX into a minimal environment. Both are available via http at those links, though if you want proper Unix permissions and ownerships, you should download srvd via AFS if possible.

You also may need a VAX. I have successfully installed on a VAXstation 2000, MicroVAX II, and VAXstation 3100 m38, but I have not successfully installed in simh yet. Though the RD53 drive image from the MicroVAX II does work in simh.

Export the srvd tree read-only via NFS, using a server which accepts version 2 NFS and mountd protocols. In Linux you can add --nfs-version 2,3,4 to nfsd and mountd options. In Ubuntu and probably also Debian, in /etc/default/nfs-kernel-server add --nfs-version 2,3,4 to both at the start of RPCNFSDCOUNT (because RPCNFSDARGS won't make any difference) and in RPCMOUNTDOPTS.

I have not mastered netbooting yet. The first stage seems to be etftp loaded via MOP, but then it seems you cannot simply TFTP load the kernel and expect it to run, and I'm not sure the kernel supports root over NFS. If interested take a look at the vax650 folder in bootkit and the LORE file there. In this case, I'm using an RX33 floppy image from bootkit, 61+.floppy, to boot a VAXstation 2000. That's an ordinary 5.25" 1.2 MB floppy image, which can be written on a PC using dd or rawritewin. Maybe you could netboot NetBSD/VAX on the same VAXstation 2000 and write from there, but I don't know which version has working floppy support.

If not using an attached display and keyboard, hook up the serial console. The VAXstation 2000 uses 9600 baud. The initial steps seem to be 8-N-1, but later on the OS switches to 7-E-1, meaning you'll see lots of characters with the high bit set if you don't reconfigure your terminal emulator.

After booting from the floppy, you'll see kernel output, a few lines from the startup script, a big warning that this destroys the contents of the hard disk, and a prompt for the hostname. I don't believe you can get past this prompt, because it relies on Athena infrastructure to query the hostname. So just control-C out of that. Then you get a prompt. It's a very minimal environment, without even ls.

Now you need to configure networking and mount the srvd tree via NFS. You need to use get_pack to mount via NFS, because mount doesn't seem to understand it. Change the network device name and IP addresses as needed. Note that the NFS server address and path are separate arguments, and not connected with a colon like you would use with mount.

# stty erase ^H
# ifconfig se0
# get_pack nfs /srv/nfs/vax/athena/srvd /srvd
/srv/nfs/vax/athena/srvd server ok
/srv/nfs/vax/athena/srvd mounted on /srvd

At this point you could run stuff from /srvd if you wanted and explore. Note that the root filesystem is on a floppy and there is little space and few inodes available there. To continue the installation, you need to set some variables and run the phase 2 installer.

# MACH=VS2000
# save_site_flag=false
# . /srvd/install/

Actually, you might want to first look at, because it assumes some things. For me it was a perfect fit because it assumed the disk was an RD32, but you might have a different hard disk. Also, if your VAX has multiple hard disks, and you want to install onto a particular one, be careful. Remember the front panel write protect buttons.

The installer worked fine, except umount didn't work, and at the end I got a "/dev/rrd0a: DIRECTORY /etc/athena: LENGTH 1040 NOT MULTIPLE OF 512 (ADJUSTED)" warning. This should put a bootable system on your hard disk, but some customizations are needed for a successful multi-user boot. If you try to boot you'll get errors which might be mostly unreadable over serial because new console output starts before old output is finished, making network configuration failure look like "Setticannot opeUnablePleaseHaltinsyncing disks... done". If you do end up in that situation, boot with "b/2 dua0" to enter single user mode and fix things from there.

Since /etc/athena/ relies on Athena infrastructure, I replaced that line in /etc/rc with just a simple "/etc/ifconfig se0". Also, change the configuration in /etc/athena/rc.conf. You can set everything false except for NFSCLIENT if you need it to mount srvd. In particular AFSADJUST takes a long time or maybe never completes, and needs to be disabled.

The installer only creates the root filesystem and a site filesystem for local storage. Most of the operating system is in the srvd tree, which will need to be read-only mounted at /srvd. If you don't have space to put it somewhere on the VAX, again mount it via NFS. Add the hostname of the server to /etc/hosts, and add the line for mounting it to /etc/fstab. You can't mount via IP address in fstab.

In /etc/ttys, there are lines which either start an X display manager or getty in text mode. Booting the VAXstation 2000 from serial, X fails to start. This means a wait for a timeout before getting a login prompt. Commenting out the /etc/athena/dm line for console and uncommenting the /etc/getty line fixes that.

You can get rid of the root password by removing the 2pEdLRdD8rMnk from /etc/passwd. (Documents about Athena say the root password of workstations is identical and not secret, but I don't know what it is.) Trying to set a new password via passwd doesn't work because it wants to talk to a Kerberos server.

That should be it. You now have a VAX which runs Athena 4.3BSD. You can even run X on a VAXstation or a KA630 MicroVAX with QDSS. (The KA650 kernel doesn't include QDSS support, though the bootkit one seems to have it.) It's leaner than NetBSD, even working fine on a VAXstation 2000 with 4 MB RAM.

No comments: