Page 1 of 1

Shared Folders-- Invalid Argument-- Ubuntu 10.04

Posted: 1. Mar 2011, 13:38
by EzioAuditore
Hello,

I know that many topics regarding shared folders have already been discussed here but none matches/solved my problem.

I'm using Ubuntu 10.04 32bit on VirtualBox 4.0.2 on windows 7 ultimate x64 host. Whenever I try to mount a shared folder named "Multimedia" to a folder "Host" on Ubuntu using the command

Code: Select all

mount-t vboxsf Multimedia ./Host
I get an error -- "Invalid Argument". I tried changing mountpoint's name and location too to no avail. Also tried the below but no joy:

Code: Select all

mount.vboxsf Multimedia ./Host
Would appreciate any help regarding this. I'm fairly new to ubuntu.. So, pls bare with me on this one..

Re: Shared Folders-- Invalid Argument-- Ubuntu 10.04

Posted: 1. Mar 2011, 17:13
by Perryg

Code: Select all

mount-t vboxsf Multimedia ./Host
Is in fact invalid
Steps to create the shared folder
  • (1) Use the guests settings to select the folder you want to share from the host.
    (2) Give the shared folder an easy name. Example: share
    (3) start the guest
    (3) Using a terminal create your mount point. Example: sudo mkdir /mnt/winshare
    (4) Map the share using the following example: sudo mount -t vboxsf share /mnt/winshare
Remember Linux is case sensitive.

Re: Shared Folders-- Invalid Argument-- Ubuntu 10.04

Posted: 2. Mar 2011, 00:14
by EzioAuditore
Hello Perryg,
Thanks for your reply. :)
I'll try that tomorrow morning and update you on as how it goes..
But one thing i don't understand, the steps which i posted about in main post worked for a friend of mine who's also having the same configuration as mine.. So, how come it work for him and not me?

Re: Shared Folders-- Invalid Argument-- Ubuntu 10.04

Posted: 2. Mar 2011, 00:59
by Perryg
I have no idea. But where would you think ./Host is located on you file structure?

Re: Shared Folders-- Invalid Argument-- Ubuntu 10.04

Posted: 2. Mar 2011, 14:17
by EzioAuditore
(3) Using a terminal create your mount point. Example: sudo mkdir /mnt/winshare
(4) Map the share using the following example: sudo mount -t vboxsf share /mnt/winshare
Tried this, it worked but when I restarted ubuntu, they were gone, the folder 'winshare' was empty. I tried the mount command again but got the same invalid argument error. Could it be due to the fact that root is owner of the file and not me?

And that ./Host folder is located at /home/<username>/Host.

Re: Shared Folders-- Invalid Argument-- Ubuntu 10.04

Posted: 2. Mar 2011, 15:52
by Perryg
Use ~ instead of . ~/Host
The mount statement only works to load the shared folder and it is not saved on reboot. Put the mount statement in the /etc/rc.local file

Re: Shared Folders-- Invalid Argument-- Ubuntu 10.04

Posted: 2. Mar 2011, 20:42
by EzioAuditore
When I try ~host, it says no such file or directory and when I try ~/host it says Invalid argument.. But leave this host folder for now.

I'd like to mount it in the /mnt/winshare folder, i tried the command, got the same error-- Invalid argument. What to do next Perryg?

Re: Shared Folders-- Invalid Argument-- Ubuntu 10.04

Posted: 2. Mar 2011, 20:51
by Perryg
Something did not translate properly. Let's try it again

Code: Select all

~ the tilde first key to the left of the number 1
Sorry for the confusion. I had to put it in code blocks to actually show right.

Anyway if you want to keep it where it is not problem. Post the exact command that you used. Also when you created the share did you set it to permanent?

Re: Shared Folders-- Invalid Argument-- Ubuntu 10.04

Posted: 2. Mar 2011, 22:07
by EzioAuditore
I want to mount it at /mnt/winshare folder, so i used the following command but got invalid argument error-

Code: Select all

sudo mount -t vboxsf Share /mnt/winshare
.
And by make permanent you mean those 3 check boxes at the time of creating the share which reads as read-only, make permanent, auto-mount no? Yes, all 3 are checked.

Re: Shared Folders-- Invalid Argument-- Ubuntu 10.04

Posted: 2. Mar 2011, 22:18
by Perryg
Well if all 3 are checked then you can have problems.
Automount mounts the share in /media/sf_<name of share> and you can not mount it manually after that.
To be able to use automount (in Linux) you need your user name in the vboxsf group.

Re: Shared Folders-- Invalid Argument-- Ubuntu 10.04

Posted: 2. Mar 2011, 22:50
by EzioAuditore
So, i should uncheck auto-mount and then try, huh?

Re: Shared Folders-- Invalid Argument-- Ubuntu 10.04

Posted: 2. Mar 2011, 22:58
by Perryg
That's your choice. You can have it one way or the other but not both.

(1) select the share and make it permanent. Then use the mount command to mount the share in the guest
(2) select the share, mark it permanent and automount, put your user name in the vboxsf on the guest and reboot.
All of this is explained in Chapter 4.3 Shared folders of your VirtualBox users manual.

Re: Shared Folders-- Invalid Argument-- Ubuntu 10.04

Posted: 2. Mar 2011, 23:17
by EzioAuditore
Okay okay.. Will try both ways tomorrow.
Would also read the manual throughly as my exams will end tomorrow (how good this feeling is... :p ) so I'll be having lots of spare time.. ;)
Thanks for your help Perryg,

Re: Shared Folders-- Invalid Argument-- Ubuntu 10.04

Posted: 3. Mar 2011, 11:12
by EzioAuditore
Ok, Deleted the previous share and re-added it w/ the auto-mount option un-checked, removed the old winshare directory and recreated it also, mounted the share, put the command in rc.local file and it works great now. :D

Thank you very much for your help and time Perryg. Appreciate that.