25

i'm new to this forum but i've been a occasional vbox user. I had windows 7 host and ubuntu 9.10 guest which works fine with vboxadditions installed, share folder and everything perfect. Now for some simulations i needed to have the ubuntu server 10.04 intall with x-window. what i did and so far so good.

now the problem i'm having now is that for the server i seem not to be able to mount a share folder.following the same process :

-install dkms
-update
-upgrade
-mount the vboxadditions iso in the host virtual drive and have it mounted in the guest as well
-install vboxadditions (sudo sh ./VBoxLinuxAdditions-x86.run)
-restart the guest os
- created ubuntu_share folder under /media/ubuntu_share

any time i'm trying to mount the folder ubuntu_share on my drive D (D:/Ubuntu_Share) with this command :

 mount -t vboxsf ubuntu_share /media/ubuntu_share

i always get :

/sbin/mount.vboxsf mouning failed with error: no such device


locate mount.vboxsf output this:
/opt/VBoxGuestAdditions-3.2.6/lib/VBoxGuestAdditions/mount.vboxsf
/sbin/mount.vboxsf

is there any problem with ubuntu server 10.04? or i'm just missing the mark somewhere? thanks for reading this and helping me out.

black sensei
  • 6,528
  • 22
  • 109
  • 188
  • Possible duplicate of [VirtualBox: mount.vboxsf: mounting failed with the error: No such device](http://stackoverflow.com/questions/28328775/virtualbox-mount-vboxsf-mounting-failed-with-the-error-no-such-device) – kenorb Jun 08 '16 at 16:24

10 Answers10

27

On Ubuntu, I still couldn't get it to mount even after installing the guest additions. These two commands fixed it for me:

    apt-get install dkms
    /etc/init.d/vboxadd setup

Good luck.

Robert Bruce
  • 681
  • 1
  • 5
  • 10
  • +1. It's worth noting that the suggested way here is available when you installed `Guest Additions` via `ISO` (multiple ways of how to install it is well elaborated here http://askubuntu.com/questions/22743/how-do-i-install-guest-additions-in-a-virtualbox-vm). – IsaacS Jun 08 '14 at 23:05
  • More recently, this works: sudo /etc/init.d/virtualbox-guest-utils restart – emsr Oct 03 '18 at 18:07
13

i've found out that the kernel version and the kernel headers version were different.I got latest kernel and kernel headers from synapic and rebuilt the Guest addition.works fine.thanks for at least reading :D

black sensei
  • 6,528
  • 22
  • 109
  • 188
  • 1
    thank you. I used this same answer to solve the same error message I started getting after updating the Ubuntu guest OS kernel (via auto-update). A simple matter of re-running "sudo ./VBoxLinuxAdditions-x86.run". – James A Wilson Oct 25 '10 at 14:16
  • In my case it looks like those extensions are not compatible with the 32bit 13.10... Too bad. But the compile generates errors. – Alexis Wilke Jan 01 '14 at 11:42
  • To install the headers: `sudo apt-get install linux-headers-$(uname -r)` – OozeMeister Apr 16 '14 at 19:31
5

The following command worked for me -

modprobe -a vboxguest vboxsf vboxvideo

I am unsure but I think this uses the VirtualBox shared folders kernel module to redetect the available share. Credit to the following link -

VirtualBox: mount.vboxsf: mounting failed with the error: No such device

Community
  • 1
  • 1
Bob Ajob
  • 51
  • 1
  • 3
4

Some important detail. Before installing VirtualBox guest additions, ensure you've done this:

sudo apt-get install make gcc
tumick
  • 41
  • 1
2

I solved this problem by installing the guest additions from the ubuntu repository.

Thiago Cardoso
  • 725
  • 1
  • 5
  • 19
1

I had the same thing on Ubuntu Lucid, and I used VirtualBox 4.1.12.

Try to find a shell script in VirtualBox additions CD-ROM, it is called VBoxLinuxAdditions****.run

I have resolved this issue by running sudo ./VBoxLinuxAdditions.run.

It was like James A Wilson has done.

John_West
  • 2,239
  • 4
  • 24
  • 44
elhadi dp ıpɐɥןǝ
  • 4,763
  • 2
  • 30
  • 34
1

Even though I already had guest additions installed, installing it again (the exact same version) fixed it.

look
  • 667
  • 10
  • 17
0

Try this for OpenGL

yum update -y
...
yum install dkms binutils gcc make patch libgomp glibc-headers glibc-devel kernel-headers kernel-devel -y

#export MAKE='/usr/bin/gmake -i'
#./VBoxLinuxAdditions.run
David
  • 208,112
  • 36
  • 198
  • 279
HankerPL
  • 21
  • 4
0

I am running VirtualBox 5.1.20, and had a similar issue. Here is a url to where I found the fix, and the fix I implemented:

# https://dsin.wordpress.com/2016/08/17/ubuntu-wrong-fs-type-bad-option-bad-superblock/
if [ "5.1.20" == "${VBOXVER}" ]; then
  rm /sbin/mount.vboxsf
  ln -s /usr/lib/VBoxGuestAdditions/mount.vboxsf /sbin/mount.vboxsf
fi

The link had something similar to /usr/lib/VBoxGuestAdditions/other/mount.vboxsf, rather than what I have in the script excerpt.

For a build script I use in vagrant for the additions:

https://github.com/rburkholder/vagrant/blob/master/scripts/additions.sh

Seems to be a fix at https://www.virtualbox.org/ticket/16670

-4

the folder and the shared folder cant have the same name

Marco
  • 1