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. 

2 comments:

Anonymous said...

When I run sudo adduser pi vboxsf on a freshly installed instance of Stretch running under VirtualBox on a Windows 10 machine (after installing VBox extensions, it locks out 'root' and doesn't boot to the GUI. I can't seem to recover after this.

Peter W A Wood, Programmer said...

I no longer have any VMs on my own machines, so I can only guess at what is causing your problem. From looking at Alan Oakley's instructions, it seems the process to install the Virtual Box extensions are now different and somewhat more complicated. Did you encounter any problems when following them?

The other thing that I can think of is have you set-up any shared folders in Virtual Box?