Virtualbox shared folder mount from fstab fails; works once bootup is complete
- by Ben
I've got Ubuntu 13.10 installed in Virtualbox 4.3. The host machine is Windows.
I have a couple of Virtualbox shared folders being mounted by /etc/fstab. Until recently this setup worked just fine, but after upgrading from Ubuntu 13.04 and Virtualbox 4.2 (at essentially the same time) the fstab mounting stopped working. I get the following error during boot:
An error occurred while mounting /home/benme/Documents.
keys:Press S to skip mounting or M for manual recovery
Pressing M for manual recovery and then trying to mount manually also fails:
root@benme-vb:~# cd /home/benme
root@benme-vb:/home/benme# mount Documents
/sbin/mount.vboxsf: mounting failed with the error: No such device
But if I instead skip mounting during boot, wait for Unity to start and then mount manually in a shell, everything works fine:
benme-vb ~ % ls Documents
benme-vb ~ % sudo mount Documents
[sudo] password for benme:
benme-vb ~ % ls Documents
# actual file list omitted
Note that when I mount manually I'm letting mount take all the options from /etc/fstab, and it works. This suggests to me that it's some sort of timing issue, where Virtualbox isn't "ready" to provide the shared file mounts at the point /etc/fstab mounts are run during bootup.
Here's the fstab line, just for completeness:
Documents /home/benme/Documents vboxsf uid=benme,gid=benme,dmode=774,fmode=664 0 0
Is there something I can do about this from the Ubuntu side? Or does anyone happen to know more about this from the Virtualbox angle?
I've found an old report on the Virtualbox bug-tracker with identical symptoms, but in that case the user had updated Virtualbox without updating their guest additions and resolving that fixed the problem; this isn't happening here, I've definitely got the 4.3 guest additions installed.