Super User is a question and answer site for computer enthusiasts and power users. 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've installed Ubuntu 10.04 as a Virtualbox VM. I'd like to make my entire C drive an always-enabled shared folder under ~ (/home/). I've seen this tutorial but I'm unsure of the differences between the commands they give. After creating a new virtual folder called "C" under Virtualbox Settings -> Shared folders, I tried, inside ~,

mkdir C
sudo mount -t vboxsf share ~/C

but I get

/sbin/mount.vboxsf: mounting failed with the error: Protocol error

What is the correct command to achieve what I want to do?

share|improve this question
up vote 5 down vote accepted

According to this blog post, the first argument after vboxsf (share in this case) should be the label you've given the folder in the Virtualbox Manager. Since I called my folder "C" in the Virtualbox Manager, I was able to mount the folder with:

mkdir C
sudo mount -t vboxsf C ~/C

However, this method requires the drive to be remounted after start-up. This excellent post suggests putting the command in the /etc/rc.local script, which is run on start-up:

sudo mount -t vboxsf -o uid=1000,gid=1000 virtualbox_share_name /home/my_username/folder_name

The full path is required since it's running as root.

share|improve this answer
Worked for me using Ubuntu Server 14.04 on VirtualBox 5.0.20. – mrgloom May 13 at 9:15

In the past when I ran into a protocol error while mounting a VirtualBox share, I just went into the shared folders configuration in the VirtualBox UI, removed the share configuration that wasn't mounting properly and re-created it with exactly the same settings, then retried the mount and it worked.

share|improve this answer

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .