Virtual machine VirtualBox shared mounting problem: mount: /mnt/xxx: wrong fs type, bad option, bad superblock on xxx
After setting up the shared folder, create a wwwroot folder under /mnt, and then go to mount it happily,
mount -t vboxsf www /mnt/wwwroot
The result system prompts:
mount: /mnt/wwwroot: wrong fs type, bad option, bad superblock on www, missing codepage or helper program, or other error.
First of all, we saw the error, don't panic, first read the meaning of it. The translated words are:
Wrong fs type, wrong option, wrong superblock on wwwroot, missing code page or helper, or other errors.
What does this mean?
Considering that you are trying to mount NFS, then we need some helper programs to complete it.
Step 1: Install our helper:
sudo apt install nfs-common
On the other hand, if you are trying to mount CIFS, an auxiliary program is provided cifs-utils
. You can install it:
sudo apt install cifs-utils
Then try again, if it still doesn’t work, then we go to the second step
Step 2: Because I am building an environment in Virtualbox, let's install virtualbox-guest-utils
sudo apt-get install virtualbox-guest-utils
Then we remount it again and it’s ok, then
cd /mnt/wwwroot
ls -al
touch demo.sh
There will be a demo.sh file in the computer folder we shared.
virtualbox-guest-utils is the VirtualBox Guest user space utility. If you want to study in depth, here is its documentation link