17

So in the setting of virtualbox shared folder, I already has the click the set-up: auto mount and make permanent. My shared folder is named as VM-share

Then I log into the terminal of guest linux to type in the following commands:

$ sudo mount -t vboxsf VM-share ~/share/

It gives me the following error message:

mount: wrong fs type, bad option, bad superblock on VM-share,
       missing codepage or helper program, or other error

       In some cases useful info is found in syslog - try
       dmesg | tail or so.

So I googled it and follow the instructions on this page: Why do I get "wrong fs type, bad option, bad superblock" error?

to install both the "sudo apt install nfs-common" and "sudo apt install cifs-utils"

However,when I repeat the command "$ sudo mount -t vboxsf VM-share ~/share/" It still gives me the same error message as before. I typed in "dmesg | tail", the following is the message:

[    8.743003] IPv6: ADDRCONF(NETDEV_UP): enp0s3: link is not ready
[    8.745374] e1000: enp0s3 NIC Link is Up 1000 Mbps Full Duplex, Flow Control: RX
[    8.752152] IPv6: ADDRCONF(NETDEV_CHANGE): enp0s3: link becomes ready
[    9.633147] floppy0: no floppy controllers found
[    9.633209] work still pending
[ 3128.376259] vboxsf: Successfully loaded version 5.1.16_Ubuntu (interface 0x00010004)
[ 3128.376457] sf_read_super_aux err=-22
[ 5762.008076] sf_read_super_aux err=-22
[ 6052.591669] sf_read_super_aux err=-22
[ 6138.926441] sf_read_super_aux err=-22

So How should I do to mount the shared folder?

3 Answers 3

17

As of now (version 6.0.10 of VirtualBox) there are make permanent and auto-mount options for shared folder, also mount point (At) in GUI of virtualbox. For me the following worked:

  1. On guest Ubuntu: sudo apt-get install virtualbox-guest-utils
  2. Add shared folder in GUI of VirtualBox.
  3. Restart guest OS

Folder on mount point specified in GUI was created automatically and ls showed files located on host Windows PC.

3
  • 3
    sudo apt-get install virtualbox-guest-utils helps me Sep 23, 2019 at 9:14
  • I could see the sf_ folder in /media/ right after running sudo apt-get install virtualbox-guest-utils Jun 8, 2020 at 6:57
  • sudo apt-get install virtualbox-guest-utils along with sudo mount -t vboxsf ... did the job
    – bloody
    Nov 13, 2020 at 11:24
8

It turns out the reason that I could not mount is because I did not install the vboxguestaddition version. So if you follow the steps here:

  1. https://www.howtogeek.com/189974/how-to-share-your-computers-files-with-a-virtual-machine/

  2. Ignore the windows part above, then follows the step here to install the guest additon: https://virtualboxes.org/doc/installing-guest-additions-on-ubuntu/

  3. Then the file will be automatically there, but you might come across permission issue, check this page : https://askubuntu.com/questions/189200/getting-access-to-var-www.

I hope it helps people who might come across the same issue as I did.

2

cd to the /media folder and create a dir with the same name as the folder you created/shared in the host machine shared folder:

cd /media
sudo mkdir nameOfMySharedFolder

mount the folder with the following command:

sudo mount -t vboxsf nameOfMySharedFolder /media/nameOfMySharedFolder

watch a video for full description of process https://www.youtube.com/watch?v=I5cV0V7vLJw p.s. the sudo may or may not be necessary

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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