Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm trying to automount VirtualBox Shared Folders in Ubuntu, the Sharenames are *_DRIVE, whereas * is D,E, etc. to then share them again via samba. If i

mount -t vboxsf D_DRIVE /media/shares/D 

it works, but that's of course only until the next reboot.

So then I tried to mount them via fstab, which mounts them (as I see in 'sudo mount') but the mountpoints remain empty. I tried adding vboxsfv and vboxadd in /etc/modules/ but to no avail. I do, however, see that the vboxservice auto-mounts all shares to /media/sf_*_DRIVE and they are available. It's no problem to double mount a share though since I can manually mount them and they both work.

While I could share all /media/sf_*_DRIVE's I'd like to just share /media/shares/ which contains all mountpoints instead.

share|improve this question
The mount command unfortunately only dumps the contents of /etc/mtab, and not the actual current kernel mount table which is seen via /proc/mounts. The two do not necessarily match. Next time you see an empty mount point, do a cat /proc/mounts to see the real deal. – Kaz Apr 3 '13 at 16:36
Can you show your /etc/fstab entries? – Kaz Apr 3 '13 at 16:36

You could do a kludge, and add the mount -t vboxsf D_DRIVE /media/shares/D to /etc/rc.local, as rc.local is run on each boot as root.

share|improve this answer

If you want to be able to get read & write permissions over that share, please do this

mount -t vboxsf -o uid=<your uid>,gid=<Your gid> D_DRIVE /media/shares/D

You can get your user id and group id from /etc/passwd file. This is how my user's entry looks like in my /etc/passwd file. First 1000 is my UID and the second 1000 is my GID.


If you dont want to execute the mount command each and every time you boot up, just add that command in /etc/rc.local file, as mentioned by @Yet Another User.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.