Shared Folders-- Invalid Argument-- Ubuntu 10.04

Discussions about using Linux guests in VirtualBox.
Post Reply
EzioAuditore
Posts: 8
Joined: 17. Feb 2011, 17:11
Primary OS: MS Windows 7
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Ubuntu 10.04, Vista

Shared Folders-- Invalid Argument-- Ubuntu 10.04

Post 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..
Perryg
Site Moderator
Posts: 34369
Joined: 6. Sep 2008, 22:55
Primary OS: Linux other
VBox Version: OSE self-compiled
Guest OSses: *NIX

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

Post 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.
EzioAuditore
Posts: 8
Joined: 17. Feb 2011, 17:11
Primary OS: MS Windows 7
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Ubuntu 10.04, Vista

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

Post 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?
Perryg
Site Moderator
Posts: 34369
Joined: 6. Sep 2008, 22:55
Primary OS: Linux other
VBox Version: OSE self-compiled
Guest OSses: *NIX

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

Post by Perryg »

I have no idea. But where would you think ./Host is located on you file structure?
EzioAuditore
Posts: 8
Joined: 17. Feb 2011, 17:11
Primary OS: MS Windows 7
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Ubuntu 10.04, Vista

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

Post 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.
Perryg
Site Moderator
Posts: 34369
Joined: 6. Sep 2008, 22:55
Primary OS: Linux other
VBox Version: OSE self-compiled
Guest OSses: *NIX

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

Post 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
EzioAuditore
Posts: 8
Joined: 17. Feb 2011, 17:11
Primary OS: MS Windows 7
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Ubuntu 10.04, Vista

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

Post 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?
Perryg
Site Moderator
Posts: 34369
Joined: 6. Sep 2008, 22:55
Primary OS: Linux other
VBox Version: OSE self-compiled
Guest OSses: *NIX

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

Post 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?
EzioAuditore
Posts: 8
Joined: 17. Feb 2011, 17:11
Primary OS: MS Windows 7
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Ubuntu 10.04, Vista

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

Post 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.
Perryg
Site Moderator
Posts: 34369
Joined: 6. Sep 2008, 22:55
Primary OS: Linux other
VBox Version: OSE self-compiled
Guest OSses: *NIX

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

Post 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.
EzioAuditore
Posts: 8
Joined: 17. Feb 2011, 17:11
Primary OS: MS Windows 7
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Ubuntu 10.04, Vista

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

Post by EzioAuditore »

So, i should uncheck auto-mount and then try, huh?
Perryg
Site Moderator
Posts: 34369
Joined: 6. Sep 2008, 22:55
Primary OS: Linux other
VBox Version: OSE self-compiled
Guest OSses: *NIX

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

Post 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.
EzioAuditore
Posts: 8
Joined: 17. Feb 2011, 17:11
Primary OS: MS Windows 7
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Ubuntu 10.04, Vista

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

Post 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,
EzioAuditore
Posts: 8
Joined: 17. Feb 2011, 17:11
Primary OS: MS Windows 7
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Ubuntu 10.04, Vista

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

Post 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.
Post Reply