Page 1 of 1

cannot mount shared folder

Posted: 26. May 2010, 04:50
by whimsica
I cannot seem to mount the shared folder I created. I'm using mac as host and linux in virtualbox

I added guest additions
I created a folder called vbshared on the mac desktop
I went into shared folders on virtualbox and chose vbshared it is now in the list
I go into my directory
root@dan-laptop:/opt/lampp/htdocs#
and type mount -t vboxsf vbshared /htdocs
That didn't work.

Then I tried making a directory called shared in htdocs mkdir shared
and type mount -t vboxsf vbshared /htdocs/shared
That doesn't work either.

So what am I doing wrong?

Thanks,

Dan

Re: cannot mount shared folder

Posted: 26. May 2010, 16:13
by Perryg
You need the full path in the mount statement See example below

Code: Select all

mount -t vboxsf vbshared /opt/lampp/htdocs

unknown filesystem

Posted: 26. May 2010, 17:41
by whimsica
at root I typed

mount -t vboxsf vbshared /opt/lampp/htdocs

and get unknown filesystm type 'vboxsf'
?
I tried the same thing by moving to the /opt/lampp/htdocs directory
and that didn't work either same error.

Dan

Re: cannot mount shared folder

Posted: 26. May 2010, 17:57
by Perryg
Are you sure that you installed the guest additions (in the guest)?
Did you see any errors while installing?
What exactly is the guest?

Re: cannot mount shared folder

Posted: 26. May 2010, 20:13
by whimsica
You mean all of this???

4.3.2.1 Installing the Linux Guest Additions
The VirtualBox Guest Additions for Linux are provided on the same ISO CD-ROM
as the Additions for Windows described above. They also come with an installation
program guiding you through the setup process, although, due to the signi?cant dif-
ferences between Linux distributions, installation may be slightly more complex.
Installation involves the following steps:
1. Before installing the Guest Additions, you will have to prepare your guest system
for building external kernel modules. This works similarly as described in chap-
ter 2.3.2, The VirtualBox kernel module, page 36, except that this step must now
be performed in your Linux guest instead of on a Linux host system, as described
there.
Again, as with Linux hosts, we recommend using DKMS for Linux guests as well.
If it is not installed, use this command:
sudo apt-get install dkms
68
4 Guest Additions
Install DKMS before installing the Linux Guest Additions.
2. Mount the VBoxGuestAdditions.iso ?le as your Linux guest’s virtual CD-ROM
drive, exactly the same way as described for a Windows guest in chapter 4.3.1.1,
Installation, page 65.
3. Change to the directory where your CD-ROM drive is mounted and execute as
root:
sh ./VBoxLinuxAdditions-x86.run
In a 64-bit Linux guest, use VBoxLinuxAdditions-amd64.run instead.
The VirtualBox Guest Additions contain several different drivers. If for any reason
you do not wish to set them all up, you can install the Guest Additions using the
following command:
sh ./VBoxAdditions.run no_setup
After this, you will need to at least compile the kernel modules by running the
command
/usr/lib/VBoxGuestAdditions/vboxadd setup
as root (you will need to replace
lib
by
lib64
on some 64bit guests), and on older guests without the udev service you will need
to add the
vboxadd
service to the default runlevel to ensure that the modules get loaded.
To setup the time synchronization service, run the command
/usr/lib/VBoxGuestAdditions/vboxadd-service setup
and add the service vboxadd-service to the default runlevel. To set up the X11 and
OpenGL part of the Guest Additions, run the command
/usr/lib/VBoxGuestAdditions/vboxadd-x11 setup
(you do not need to enable any services for this).
To recompile the guest kernel modules, use this command:
/usr/lib/VBoxGuestAdditions/vboxadd setup
After compilation you should reboot your guest to ensure that the new modules are
actually used.
69

Re: cannot mount shared folder

Posted: 26. May 2010, 20:27
by Perryg
What is the guest?

Re: cannot mount shared folder

Posted: 26. May 2010, 20:34
by whimsica
Guest is Linux 2.6. Host is mac os x

I installed guest additions as per the instructions.
But not sure how to verify that.

Also now when I try the command above I get
mounting failed with the error Invalid Agrugment

sudo mount -t vboxsf vbshared /opt/lampp/htdocs
vbshared is on the mac desktop
and it is listed in the shared folders in devices.

What next?

Thanks,

Dan

Re: cannot mount shared folder

Posted: 26. May 2010, 20:44
by ChipMcK
I am asking an obvious question

You did issue the mount on/in the guest, yes?

Re: cannot mount shared folder

Posted: 26. May 2010, 21:04
by Perryg
AFAIK Linux 2.6 is a kernel. What is the guest or did you build this guest yourself from the raw kernel and adding your own packages.
Either way so far you have not told me anything. I asked for errors you sent instructions to install the guest. I need to know what the guest really is to be able to tell you how to proceed.
Also tell me step-by-step how you installed the guest additions.

Depending on the guest here is a guide Howto: Install Linux Guest Additions + Xorg config

Re: cannot mount shared folder

Posted: 26. May 2010, 23:46
by whimsica
I don't understand (obviously) what you mean by guest.

Here's what I did.

I installed virtualbox on Mac os x opened it up.
It asked me what guest I wanted to add and I chose the latest ubuntu linux disk image.iso that I downloaded on my desktop.
I followed the virtualbox instructions in the application.
I installed apache xampp on it. That also worked fine and I could access it from localhost within the linux virtualbox.
I installed the guest additions using the instructions I pasted in the last message which were under how to install linux guest additions.
No errors came up during the process.

Maybe you can give me some more instruction on where to look for what you need to know. Obviously I'm stuck on either the terminology
or what you need to know to help me.

Thanks,
Dan

Re: cannot mount shared folder

Posted: 27. May 2010, 00:14
by Perryg
OK Ubuntu that is what I needed. You have the main PC (Host) your MAC, and any Virtual Machine you create is called a guest. (reason they call it guest additions)
Now did you follow the link I sent you on my last post? It tells you what you need to do for the guest additions to be able to install (in the guest).
Question; can you adjust your guests screen with you mouse (click and drag) and it actually adjust to the size without scroll bars or black areas around the edges?

Re: cannot mount shared folder

Posted: 27. May 2010, 20:22
by whimsica
Yeah I can drag the corner and it fills up the box.
Does that mean that guest Additions are successfully installed?

but
sudo mount -t vboxsf vbshared /opt/lampp/htdocs still gives the error invalid argument

Dan

Re: cannot mount shared folder

Posted: 27. May 2010, 20:57
by Perryg
Yes if this works then the guest additions are installed.

Where exactly are you running this? On the host or the guest? Does the /opt/lampp/htdocs actually exist on the guest?

You setup a share in the guest settings by selecting a folder to share from the host.
you start the guest and create the mount point (Guest)
you run the mount statement in the guest (Guest)

Re: cannot mount shared folder

Posted: 28. May 2010, 07:59
by whimsica
I'm running the command on the guest.
The directory does exist on the guest
The shared folder exists on the host and is listed in the devices

You mention set up a mount point?

I think I am doing this
setting up the shared folder
writing the mount statement?

Am I skipping a step?

Thanks,

Dan

Re: cannot mount shared folder

Posted: 28. May 2010, 15:20
by Perryg
OK let's take this back to basics.
on the guest and in a terminal type sudo -i and press enter <password> and enter. [Puts you in sudo mode]
Now type mkdir /mnt/share <press enter> [creates a mount point]
then using your above information and what you say you have for a shared folder type mount -t vboxsf vbshared /mnt/share [mounts the share]
Now type cd /mnt/share <press enter> then type ls <press enter>
What do you see?