I have recently installed Ubuntu 10.10 as a VM to check out the Android SDK. After the basic install, I find the Shared Folder feature doesn’t work, even though I have installed the Guest Additions. I keep get the following error: /sbin/mount.vboxsf: mounting failed with the error: No such Device
I checked and under /sys/modules/ there is no vboxsf module, so obviously something in the VBoxLinuxAdditions-amd64.run script is not working.
After digging around I was told the simple way is to install the Guest Additions OSE version from apt-get. However since I am using the Closed Source edition (differences between versions can be found here). I thought there must be a better solution.
What happened is VBoxLinuxAdditions-amd64.run doesn’t do a sanity check for the existence of 3 components that Ubuntu needs to compile the modules, namely dkms, build-essential and linux-headers-generic. It requires a different set of packages for other Linux distributions. To solve the problem, run sudo apt-get install dkms build-essential linux-headers-generic. Then run VBoxLinuxAdditions-amd64.run, the modules will be compiled. Do a reboot to make sure the modules are loaded.
Once reboot, when you do lsmod | grep vbox. You should have something like this:
vboxvideo 1956 2
drm 206161 3 vboxvideo
vboxsf 34612 0
vboxguest 176030 9 vboxsf
To mount the folder (example):
- Create the Shared Folder on the Guest Window toolbar. For me I created a Folder Name with the name vb.
- In Ubuntu create the directory /mnt/vb
- Then run sudo mount -t vboxsf vb /mnt/tmp
Remember the files will not have the user’s ownership, so it is a good idea to cp the files into another folder, then do a chown user * to correct the ownership. The files will belong to root and root ownership group.
For more information : This post on VirtualBox forum