A coworker asked me to help mount a shared Windows 10 folder in an Arch Linux guest using VirtualBox. The system had been set up by another coworker who was out to lunch.
The folder to be shared was E:\virtual_shared\
. Guest Additions was installed and enabled. I could see the shared folder in /media/sf_virtual_shared/
and there existed a mount point at /mnt/share/
. An ls -al /mnt/share/
showed that the target directory was empty. The user was part of the vboxsf
group. All the permissions seemed to check out on both the host and the guest. Everything seemed to okay. However, I still couldn't mount it!
To mount it, I was using
# mount -t vboxsf /media/sf_virtual_shared/ /mnt/share/
and getting the error
"/sbin/mount.vboxsf: mounting failed with the error: Protocol error"
I tried mounting to a new folder (~/test/
) but received the same error.
Eventually, the person who set up the system came back from lunch. He simply ran
# mount /mnt/share
It turns out that fstab
contained the following:
#
# /etc/fstab :static file system information
#
# <file system> <dir> <type> <options> <dump> <pass>
# UUID=5392b506-dde2-4a21-9c7e-86a6f9f94907
/dev/sda2 / ext4 rw,relatime,data=ordered 0 1
# UUID=d6236258-9bea-446a-b38b-0244c048bb1
/dev/sda1 /boot ext2 rw,relatime 0 2
virtual_shared /mnt/share vboxsf defaults 0 0
My question is, why wouldn't the mount
call using absolute paths mount the directory? How does mount
use fstab
?
I know that mount
is called at boot and goes through fstab
sequentially. Even though /mnt/share/
was listed as empty, had something been mounted there, preventing the absolute path call from mounting? Why couldn't I still mount the shared folder to ~/test/
?
mount -t vboxsf source/ target/
. None of them seem to account for thefstab
.