Small Linux Virtual Box Image - NUbots/robocup GitHub Wiki

How to make a small virtual box image?

I have made a small virtual box image capable of compiling the code for the NAO. The steps I used to make the image are as follows:

  1. Download the “Alternate Install” CD for Ubuntu, and attached it to the virtual box’s CD drive.
  2. At the welcome screen press F4, and select install command line system.
  3. Following the on screen installation instructions.
  4. Run the following command sudo aptitude update.
  5. Run the following command sudo aptitude install fluxbox xorg slim xfe. You can skip this step if you don’t want any graphics. You can also swap xfe for nautilus for a more familiar interface.
  6. Run the following command sudo aptitude install avahi-daemon.

Now we have an awesome Linux OS, we need to set up Aldebaran’s SDK and the cross-compiler.

  1. Download the SDK and the cross-compiler from Aldebaran’s website.
  2. Put the cross-compiler in side the sdk in a new directory called crosstoolchain
  3. Copy the sdk and cross-compiler with a command like scp -rC robocupcomputer.local:/Desktop/aldebaran-sdk-v1.6.0-linux naoqi@. The sdk and cross compiler combined are about 1GB.
  4. Add the export AL_DIR=/home/robocup/naoqi to your .profile.

Now we need to install the following things to work with the code

  1. Install cmake with sudo aptitude install cmake cmake-curses-gui

At this stage you have everything you need to compile code for the NAO. The image will be about 2.6GB.

A handy feature to have is to use the VirtualBox’s shared folders to mount the source directory on the host inside the guest. To do this means you need to install the VirtualBox’s guest additions. This means you will need to install a bunch of packages, and this will take up a fair amount of disk space. Decide for your self whether you want to use this feature.

  1. To compile the guest additions you will need to run sudo aptitude install build-essential linux-headers-2.6.31-14-generic
  2. Mount the guest additions iso with mount /dev/disk/by-label/VBOXADDITIONS_3.. This will mount the cd-rom in /cdrom.
  3. Run sudo sh /cdrom/VBoxLinuxAdditions-x86.run.
  4. Now edit your fstab with sudo nano /etc/fstab and add the following line at the bottom sharedname /home/robocup/code vboxsf rw,uid=1000,gid=1000 0 0.

This will increase the image size up to about 3GB. But now you don’t have to use scp to copy you local source directory to the virtual machine.

How to use the small virtual box image?

  • To open a very basic file manager run the following: startx and then xfe.
⚠️ **GitHub.com Fallback** ⚠️