Wednesday, 26 July 2017

Installing Raspbian x86 under Virtual Box on macOS host

I failed in my first attempt to install Raspbian x86 under Virtual Box hosted macOS. The problem was I hadn't enable PAE/NX for the virtual processor. I learnt this from Andrew Cotswold Jam Oakley's excellent instructions

Although written for installing Raspbian on a Windows-hosted Virtual Box, the instructions apply equally to a macOS.

One thing that Andrew's instructions didn't cover was sharing folders between the host and Raspbian. To do this you need to have installed the Virtual Box guest additions as described in Andrew's instructions and then setup the shared folder(s) in the Virtual Box settings for your Raspbian VM. The last thing is to set the correct permissions so that you can access the folders from the VM.

All that is needed is to add yourself to the group which controls the shared folder(s). Assuming your username is pi, you would need to run the following command:

  sudo adduser pi vboxsf

You will find your shared folders in the /media folder. The prefix sf_ will have been added to their names. 

Wednesday, 19 July 2017

Running Rebol under FreeBSD 11


Whilst it has not been updated for a long time, the FreeBSD version of Rebol will run under FreeBSD 11. You do have to install the system libraries that were current when the Rebol FreeBSD version was last updated. FreeBSD has a complete set of "compatibility" libraries. Rebol requires version 6. Here is the command to install them:

pkg install misc/compat6x
 

Sharing Folders between macOS and FreeBSD under Virtual Box

I use VirtualBox to host a number of guest operating systems on a Mac, mainly for testing. I write a few tests for the emerging Red programming language. Although still in the Alpha phase, Red runs under Windows, macOS, Linux and FreeBSD.

Windows and Linux are well supported by VirtualBox and after installing the VirtualBox Guest Additions you can share folders between the host and guest operating systems. (The additions also provide mouse integration, clipboard sharing and other sharing features). This allows me to keep a single copy of the Red git repository and access it from the different virtual machines.

Virtual Box support of FreeBSD is not quite at the level of the others operating systems. Specifically, the guest additions on FreeBSD don't support folder sharing. In the current alpha, the Red GUI is not implemented for FreeBSD. However, I found that there is a simple method to share folders between the macOS host and the FreeBSD guest using NFS. I was able to get it working quickly and reliably, thanks to lionoceros's clear and thorough post on the FreeBSD forums. 

Note: Installing the VirtualBox additions under FreeBSD is straightforward as there is a package available. Be aware that installing the package requires 1GB of disk space. If you plan to install the additions, these instructions should help.