Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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

1 Answer 1

up vote 3 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

Your Answer

 
discard

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.