(NOTE: this a copypaste of the page at http://labs.aezenix.com/lispm/index.php?title=VLM_On_Linux&direction=prev&oldid=44205 which appears (as of 2008-10) submerged in sudo apt-get update
needs to be run after the sources have been enabled in order to refresh the local cache of package names.
The following packages are required in addition to the base system:
$ sudo apt-get install inetd nfs-common nfs-user-server
If “inetd” doesn't work for you, try “netkit-inetd”. If “nfs-user-server” doesn't work for you, you probably didn't uncomment the package sources in /etc/apt/sources.list as described above.
The Internet superserver is used to provide the VLM with the system date and time during startup. After installation, the following entries in /etc/inetd.conf need to be added or uncommented:
$ cat /etc/inetd.conf daytime stream tcp nowait root internal daytime dgram udp wait root internal time stream tcp nowait root internal time dgram udp wait root internal
After the file has been updated, restart inetd with
$ sudo /etc/init.d/inetd restart
The NFS file server is used to give the VLM access to a file system. In theory, the kernel mode NFS server should give better performance, but I had difficulties getting it to run. After installation, /etc/exports needs to be updated in order to export the host's file system to the VLM by adding a line like:
$ cat /etc/exports / 10.0.0.2(rw,no_root_squash)
Depending on NFS server flavour, you may want to add also the following options after the no_root_squash option to squelch some warnings
After this has been done, restart the NFS server using
$ sudo /etc/init.d/nfs-user-server restart
Now verify that your file system is properly exported:
$ showmount -e localhost
Note that the VLM now has full access to the hosts' file system and can overwrite or delete any file. You may restrict access by exporting only part file system, but I have not tried this. Also note that this example exports the file system to 10.0.0.2, which is the compiled-in address of the VLM. Other systems in the network have no access to the hosts' file system.
If you access files from the VLM through NFS using “anonymous” access, the uid 4294967294 and gid 4294967294 will be used. These ids are presumably meant to mean “nobody”. Add entries to /etc/passwd and /etc/group for this uid and gid in order to have something better than the numeric uid be displayed when listing files on the host system.
$ grep lispm /etc/passwd /etc/group /etc/passwd:lispm:x:4294967294:4294967294::/tmp:/bin/false /etc/group:lispm:x:4294967294:
You now have a basic setup that will allow you to start Genera. Skip to “Starting Genera and defining your site” if you are impatient.
If you want to set up log ins from the VLM to the NFS server on the host system, the VLM needs to get access to the mapping from user ids and group ids to user names and vice versa. When Genera was written, the NIS protocol was commonly used to provide this service within local networks. NIS basically exports the authentication files in the traditional unix format to a local area network.
To run NIS, you need the nis package:
$ sudo apt-get install nis
You need to decide what your NIS domain name will be. This domain name does not need to correspond to your DNS domain name. My NIS domain name is the same as my Genera site name (“pharmacy”), but anything else could be used instead. The NIS domain name must be put into the file /etc/defaultdomain:
$ cat /etc/defaultdomain pharmacy
You need to set up your system as NIS master in the file /etc/default/nis:
$ grep NISSERVER /etc/default/nis NISSERVER=master
Your password file needs to use “unix crypt” style passwords instead of the now-common md5 passwords. On Ubuntu with the default installation I use, this is configured in the file /etc/pam.d/common-password by commenting out the string “md5”:
$ grep md5 /etc/pam.d/common-password password required pam_unix.so nullok obscure min=4 max=8 # md5
Note that you will now have to re-set all passwords using the “passwd” command so that they appear in the correct format.
The VLM does not support shadow passwords, so you need to convert your password database:
$ sudo pwunconv $ sudo grpunconv
Once all this is done, you have to initialize your NIS database:
$ cd /var/yp $ sudo make
This should leave you with a NIS server that can be used for authentication from the Lisp machine. Starting Genera and defining your site
Once you have set up a suitable host environment, you need to configure the .VLM file in the snap4/ directory. (Note: Make sure you are using the .VLM file and not the dot.VLM file!) As distributed, it contains two wrong lines:
genera.world: ../symbolics/MIT.vlod genera.debugger: ../symbolics/VLM_debugger
These should read
genera.world: MIT.vlod genera.debugger: VLM_debugger
Fix the two lines and save the file. Now you are ready to start the VLM by changing your working directory to the snap4/ directory and type:
$ sudo ./genera
The VLM should start and present you with a welcome screen that asks you to log in. You will then have to define your site, please see the quickstart.text file in the OpenGenera distribution directory for information how to do that.
Once you have defined your site, save your world:
Command: Reset Network Command: Save World <your-host>:/tmp/my-genera.vlod
Replace <your-host> by the name of your Linux host, as defined in the Define Site process. The path you specify needs to be writable from the VLM through NFS. If it is not writeable, the VLM will crash and you'll loose the site definition.
As mentioned, the VLM has a fixed network configuration with a private IP address. In order to be able to access hosts in the Internet, your Linux host needs to do network address translation. I used the “firestarter” utility to get a basic configuration running, but this has the drawback that the firewall has to be manually started after the VLM had come up. firestarter creates interface-dependent firewall rules and the tun0 interface, which is used by the VLM, exists only while the VLM runs. I am sure that a better setup can be created by someone who knows more about Linux firewalls, and the best way would be to use a bridge interface in the VLM so that the Linux network stack would be fully circumvented. Maybe in the next release.
$ xmodmap -e "keysym Alt_L = Meta_L Alt_L" $ xmodmap -e "add mod1 = Meta_L"
if your left Alt key does not act as a Meta key.