Note

Following a national ballot, the union, UCU, that represents staff in the higher education sector has called a strike on three days in late November, and also "action short of a strike" during a period that starts on Wednesday, 23 November. During this period, colleagues are invited to take various actions, including abstaining from voluntary activities. I view the maintenance of Spivey's Corner as an activity I undertake voluntarily and not part of any contract of employment, and I cannot guarantee that it will remain accessible during the period of the dispute. In addition, some materials on the site may pertain to lectures that are cancelled by myself or others as part of the strike, and we are asked not to make them available online. Further details of the reasons for the strike and how it affects teaching in Oxford are on a brief FAQ page.

Making a VirtualBox image

From Spivey's Corner
Jump to navigation Jump to search

This page describes the steps needed to prepare a 'virtual appliance' containing Debian Linux with the Raspberry Pi desktop and software to support the Digital Systems and Compilers courses. The procedure is largely automated by a TCL script that can be found on GitHub.

  1. In Virtual Box make a virtual machine called Oxenv-base, containing a 20GB disk with a minimal Debian installation, but no desktop environment.
    • Use the entire disk for the root filesystem, and don't allocate a swap partition.
    • Make the first user have name guest and password guest.
    • Install an SSH server, and use port forwarding in VirtualBox to make port 22 on the VM accessible on the host.
    • From the host, install an SSH key using ssh-copy-key to make the automated steps below go smoothly.
    • Install the file sudoers as /etc/sudoers to permit the guest user passwordless sudo commands.
    • Halt the VM so it is ready for cloning.
  2. Now invoke the script oxenv.tcl on the host. This automates the rest of the process of preparing a virtual appliance. The script can be invoked directly from the command line to perform all the steps below, or can be sourced into an interactive TCL session to invoke individual steps at will. The script performs the following actions.
    • Clone the virtual machine as Oxenv and boot it.
    • Add an entry and a key to APT for the Raspberry Pi repository.
    • Install the Raspberry Pi desktop and VirtualBox guest additions.
    • Install software for the Digital Systems and Compilers courses.
    • Tweak user preferences to suit (my taste and) the VirtualBox environment.
    • Clear caches and copy the installation to a fresh virtual disk to reduce its size.
    • Export the virtual machine as an Open Virtualisation Archive (OVA) file.

The goal is a final file that is less than 4GB in size, so as to save download time, and to facilitate copying it via media that have a limit on file sizes.