
Had this Evernote’d, seems incomplete (and I don’t know how accurate it is) but I’ll post this anyway, might become useful one day…
To save my non geek readers, of which I don’t believe I have any (readers that is…) from having to scroll through blocks of useless code/jargon. Click the link below for what should be a fairly accurate step-by-step guide on how to install VirtualBox guest additions in Ubuntu Server 12.04, along with how to auto mount your shared folders.
Installing VirtualBox Guest Additions on Ubuntu Server 12.04
- sudo apt-get install dkms
- sudo apt-get install build-essential
- sudo apt-get install linux-headers-
uname -r
- sudo reboot
- cd /media
- sudo mkdir cdrom [if doesn’t exist]
- sudo mount /dev/cdrom /media/cdrom
- cd cdrom
- ls
- Run the relevant installer:
- sudo ./VBoxLinuxAdditions.run
Auto mount shared folder
- comment out the share mounting lines in /etc/fstab
- edit the /etc/rc.local file [not the /etc/init.d/rc.local file] to add the mount points in the form of: mount.vboxsf -w HOST_FOLDER /MOUNT_POINT
e.g. my original /etc/rc.local file contained the following:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 |
#!/bin/sh -e # # rc.local # # This script is executed at the end of each multiuser runlevel. # Make sure that the script will "exit 0" on success or any other # value on error. # # In order to enable or disable this script just change the execution # bits. # # By default this script does nothing. # exit 0 |
It now looks like this:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 |
#!/bin/sh -e # # rc.local # # This script is executed at the end of each multiuser runlevel. # Make sure that the script will "exit 0" on success or any other # value on error. # # In order to enable or disable this script just change the execution # bits. # # By default this script does nothing. # auto mount VirtualBox shared folders mount.vboxsf -w sites /mnt # end of VirtualBox shared folders # exit 0 |