Open Genera VLM on Linux
There are some existing guides to setting up the (unauthorized) Open Genera VLM on x86-64 Linux, but I wanted to tweak them a bit, and came up with a couple of items that diverge from the existing advice. Note that a bunch of URLs on that link should point to https://archives.loomcom.com/ not the static.loomcom.com address.
My general goals were to avoid having to run the genera binary as root, and run as a distinct user to have some sense of security (even if the sense is misplaced). I also wanted to change the network addresses, and don't want to use the standard pathnames for the Unix system files and the user directories, and the changes to do so were only in screenshots.
Here's some checksums (unverified)
Copy the dot.VLM file to .VLM and edit the networking and world search paths (substitute your own HOME directory)
In /etc/exports add (again, substituting your own HOME and the UID and GID for the genera user.)
Open Genera only supports NFS version 2 out of the box, so we have to edit the NFS server options to allow it (though see below for possible v3 support).
Edit /etc/default/nfs-kernel-server
Edit /etc/hosts.deny
In /etc/hosts.allow, open the NFS service to the virtual Lisp machine network.
In /etc/inetd.conf add
This should emit messages such as
And launch the Open Genera window, including a banner which announces This machine is Distribution DIS-LOCAL-HOST, a Symbolics Virtual Lisp machine, running on Distribution DIS-EMB-HOST, a DEC Alpha workstation.
This is because the world is a "distribution world" which has not been configured for the local site, and has only one user, named lisp-machine. Log in as that user, then we will begin to configure the Genera world for our set up.
Show Directory GENERA-UBUNTU:/home/myuser/Symbolics/genera/lib
In addition, I want to create a Lisp Machine user lispmuserid, whose home machine is the Lisp Machine, with a home directory accessed over NFS. Without this, the genera binary wants to access a DEC path like /home/lispmuserid and authenticate using traditional UNIX /etc/passwd which does not work on Linux. RPC-UID and RPC-GID should match a Linux UID and GID with permissions on the directory. Somehow, this does not seem to require any authentication, which seems scary, but helpful in that Open Genera wants to use ancient authentication protocols which I don't know how to set up.
See http://bitsavers.org/pdf/symbolics/software/genera_8/Symbolics_Network_File_System__NFS__User_s_Guide.pdf
Logging in as that user should now be possible, and it will attempt to load a lispm-init file without any errors.
Now you should be in a position to Save World into a a new file, edit your .VLM file to refer to that saved world, and after you Halt Genera the next time you start the genera binary, it should be working in your world.
My general goals were to avoid having to run the genera binary as root, and run as a distinct user to have some sense of security (even if the sense is misplaced). I also wanted to change the network addresses, and don't want to use the standard pathnames for the Unix system files and the user directories, and the changes to do so were only in screenshots.
My setup
- Ubuntu 18.04.4 LTS, amd64
- My Linux machine is named ubuntu
- I want all this simulated Genera stuff to happen on
- subnet 10.0.10.x with
- my Linux host under the name genera-ubuntu at 10.0.10.1 and
- the virtual Lisp machine genera at 10.0.10.2 (TODO: figure out Chaos network address scheme).
- The Linux interface is tap0, and I am not yet setting up any routing to even my local network. (Aside: Open Genera of course has no idea about Linux, and wants to treat the Linux box as operating under some flavor of Digital Unix. We should probably patch it.)
Download
First, create a directory to hold all this stuff and download the binary materials. Add a new user and group genera to own it. I thought about making the binary suid ($ sudo chmod 4755 ./genera) but didn't.
$ mkdir ${HOME}/Symbolics/genera
$ cd ${HOME}/Symbolics/genera
$ curl -O https://archives.loomcom.com/genera/genera
$ chmod a+x genera
$ sudo adduser genera --no-create-home --disabled-login
$ chown genera ./genera
$ curl -O https://archives.loomcom.com/genera/worlds/Genera-8-5-xlib-patched.vlod
$ curl -O https://archives.loomcom.com/genera/worlds/VLM_debugger
$ curl -O https://archives.loomcom.com/genera/worlds/dot.VLM
$ curl -O https://archives.loomcom.com/genera/var_lib_symbolics.tar.gz
Here's some checksums (unverified)
$ md5sum ./genera
f9ee7c8cc2648b36ffb144a22599d7d8 ./genera
$ md5sum Genera-8-5-xlib-patched.vlod
95995142e0032ea53121fa2d6f267511 Genera-8-5-xlib-patched.vlod
$ md5sum VLM_debugger
462c04f54ae273960760104487df3a62 VLM_debugger
$ md5sum var_lib_symbolics.tar.gz
f89870328d41bd27ef029dc3635bae20 var_lib_symbolics.tar.gz
Unpack the Symbolics files
~/Symbolics/genera$ mkdir lib $ mkdir user $ mkdir user/mylispmuserid $ sudo chown genera lib $ sudo chgrp genera lib$ cd ${HOME}/Symbolics/genera/lib $ sudo -u genera bash genera@ubunutu:~/Symbolics/genera/lib$ tar xvf ../var_lib_symbolics.tar.gz symbolics/ symbolics/rel-8-5/ symbolics/rel-8-5/sys.sct ....[snip]..... genera@ubunutu$ exit
Assign network addresses
In /etc/hosts, add the following lines# genera-ubuntu is the TAP interface on this host (pretending to be a DEC # Alpha), genera the Virtual lisp machine 10.0.10.1 genera-ubuntu 10.0.10.2 genera
Copy the dot.VLM file to .VLM and edit the networking and world search paths (substitute your own HOME directory)
genera.network: tap0:INTERNET|10.0.10.2;gateway=10.0.10.1 genera.worldSearchPath: HOME/Symbolics/genera
Install and setup NFS to share the Symbolics files
$ sudo apt-get install nfs-common nfs-kernel-server $ id genera uid=1001(genera) gid=1001(genera) groups=1001(genera)
In /etc/exports add (again, substituting your own HOME and the UID and GID for the genera user.)
# NFS access for virtual lisp machine network HOME/Symbolics/genera 10.0.10.0/24(rw,sync,root_squash,no_subtree_check,anonuid=1001,anongid=1001)
Open Genera only supports NFS version 2 out of the box, so we have to edit the NFS server options to allow it (though see below for possible v3 support).
Edit /etc/default/nfs-kernel-server
RPCMOUNTDOPTS="--nfs-version 2 --manage-gids" RPCNFSDOPTS="--nfs-version 2"Also, (TODO) I would like to change the export so that it does not have to include the long path prefix but would appear as GENERA-UBUNTU:/symbolics/ or something, but that appears not to be a feature of NFS?
Set up hosts_access to restrict NFS access
Here I am following advice from https://help.ubuntu.com/community/SettingUpNFSHowTo#Portmap_Lockdown-2Edit /etc/hosts.deny
# Restrict port access for NFS and associated SunRPC services. rpcbind: ALL portmap: ALL lockd:ALL mountd:ALL rquotad:ALL statd:ALL
In /etc/hosts.allow, open the NFS service to the virtual Lisp machine network.
# Allow virtual lisp machine network access to NFS, LOCAL access to permit showmount rpcbind: LOCAL, 10.0.10.0/24 portmap: LOCAL, 10.0.10.0/24 lockd: LOCAL, 10.0.10.0/24 rquotad: LOCAL, 10.0.10.0/24 mountd: LOCAL, 10.0.10.0/24 statd: LOCAL, 10.0.10.0/24
Install other network services
$ sudo apt-get install inetutils-inetd $ sudoedit /etc/inetd.conf
In /etc/inetd.conf add
# Services used by Open Genera time stream tcp nowait root internal time dgram udp wait root internal daytime stream tcp nowait root internal daytime dgram udp wait root internal
Restart networking and install the TAP interface
The restart commands should not be needed after a reboot, but are needed to bring the system in line with the configuration files.$ sudo systemctl restart nfs-kernel-server $ sudo systemctl restart inetutils-inetd.service $ sudo ip tuntap add dev tap0 mode tap $ sudo ip addr add 10.0.10.1/24 dev tap0 $ sudo ip link set dev tap0 up
Launch a compatible X server
The Open Genera system currently relies on old X protocol behavior. Apparently Xephyr supports it, so we use that to create a target for the Genera display.$ Xephyr -br -reset -terminate -ac -noreset -screen 1280x1024 :3 &
Launch the Genera binary
Now we are finally ready to start up the Open Genera, with a distribution world.$ sudo -u genera bash genera@ubunutu:~/Symbolics/genera/$ DISPLAY=:3 genera@ubuntu:~/Symbolics/genera$ ./genera -coldloadgeometry 640x480+0+0 -geometry 1280x1000+0+0
This should emit messages such as
genera (cold_load_init): using Xlib with xcb genera (cold load): Your Hyper(_R) key now is on (right) Menu genera (cold load): Your Meta key now is on ALT genera (cold load): NumLock will not be functional in genera genera (net init): xhost +10.0.10.2 10.0.10.2 being added to access control list genera (net tx): ch0: trying to send from wrong mac address. fixing it for now. genera (net tx): for a longer term solution, you should patch your Genera system. genera (net tx): ch0 : fixing arp.
And launch the Open Genera window, including a banner which announces This machine is Distribution DIS-LOCAL-HOST, a Symbolics Virtual Lisp machine, running on Distribution DIS-EMB-HOST, a DEC Alpha workstation.
This is because the world is a "distribution world" which has not been configured for the local site, and has only one user, named lisp-machine. Log in as that user, then we will begin to configure the Genera world for our set up.
Command: Login lisp-machine Command: Define Site Ubuntu-Site Namespace Server name: genera Unix Host Name: genera-ubuntu Default User: Lisp-Machine System File Directory: HOST:/home/myuser/Symbolics/genera/lib/symbolics/sys.sct/site Namespace Descriptor File: HOST:/home/myuser/Symbolics/genera/lib/symbolics/sys.sct/site Standalone Site: Yes Edit Namespace Object HOST GENERA-UBUNTU Site: UBUNTU-SITE Machine Type: DEC-AXP System Type: UNIX42 Address: INTERNET 10.0.10.1 Save Object Edit Namespace Object HOST GENERA Machine Type: VLM System Type: LISPM Address: INTERNET 10.0.10.2 tap0 User Property: EMBEDDED-IN GENERA-UBUNTU Save ObjectAt this point, you should be able to
Show Directory GENERA-UBUNTU:/home/myuser/Symbolics/genera/lib
In addition, I want to create a Lisp Machine user lispmuserid, whose home machine is the Lisp Machine, with a home directory accessed over NFS. Without this, the genera binary wants to access a DEC path like /home/lispmuserid and authenticate using traditional UNIX /etc/passwd which does not work on Linux. RPC-UID and RPC-GID should match a Linux UID and GID with permissions on the directory. Somehow, this does not seem to require any authentication, which seems scary, but helpful in that Open Genera wants to use ancient authentication protocols which I don't know how to set up.
See http://bitsavers.org/pdf/symbolics/software/genera_8/Symbolics_Network_File_System__NFS__User_s_Guide.pdf
Edit Namespace Object USER lispmuserid Login Name: lispmuserid GENERA Lispm Name: lispmuserid Home Host: GENERA-UBUNTU Mail Address: lispmuserid@genera GENERA User Property: RPC-UID 1000 User Property: RPC-GID 1000 User Property: RPC-HOMEDIR /home/myuser/Symbolics/genera/user/lispmuserid/ Save Object
Logging in as that user should now be possible, and it will attempt to load a lispm-init file without any errors.
Now you should be in a position to Save World into a a new file, edit your .VLM file to refer to that saved world, and after you Halt Genera the next time you start the genera binary, it should be working in your world.
Comments
Post a Comment