Shared Folder Help Needed

Discussions related to using VirtualBox on Windows hosts.
Post Reply
ctbuzzy
Posts: 3
Joined: 26. Mar 2013, 01:33

Shared Folder Help Needed

Post by ctbuzzy »

I'm about to have an aneurysm. I've been trying to set up a shared folder on VB for hours. Every step is an obstacle. I have a Windows 7 host & Ubuntu guest.

After dozens of tries, reboots & a complete reinstalling of Ubuntu, I finally got the Guest Additions iso properly mounted. I created the shared folder on Windows as instructed. But now I'm stuck again. I've run the following two commands, as instructed, to no apparent effect:

sudo mkdir /media/windows (or whatever I choose to call the shared folder on Ubuntu)
sudo mount -t vboxsf folder-name /media/windows (where my "folder-name" is "VBFolder")

At first, command #1 returned a message that the command wasn't recognized. I repeated it several times until it seemed to work, in the sense that the error messages stopped. I may have mistyped the first few times, but I doubt it. Now if I repeat this command it tells me the file already exists, so at that level it appears it worked.

Yet when I run the second command, nothing happens. I don't get an error message or anything else. And there is no shared folder to be found anywhere on my Ubuntu drive. Nothing.

Obviously I'm missing something important here, but I can't figure out what, & this is driving me absolutely batty. I've wasted a day on a task that seems like it should be relatively straightforward. Thanks for any help!
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 Folder Help Needed

Post by Perryg »

Mounting the iso is the first step in installing the guest additions (which are required for shared folders) how did you install them and are you sure it installed properly?
ctbuzzy
Posts: 3
Joined: 26. Mar 2013, 01:33

Re: Shared Folder Help Needed

Post by ctbuzzy »

Yes, first I ran the dksm command for kernel preparation. Then I dismounted the Ubuntu iso & mounted the Guest Additions iso. This took most of the day but finally succeeded after many repeats. Next I created the shared folder on the Windows host (using the "devices" pull-down menu on Ubuntu). Finally, following the most complete instructions I could find (which weren't very complete, as it turned out), I ran the two commands I mentioned above.

I ran these commands without first creating the /media/windows directory myself. Nonetheless, the terminal tells me I successfully created the file. But I can't find it or mount it. So I tried again after creating the directory myself, but this made no difference & didn't seem to affect the folder that I created. After checking other instructions, which are also incomplete, I added my profile to the vboxsf group & tried again. This made no difference.

I'm a noob to VMs & Ubuntu, so there are plenty of opportunities for missed steps & mistakes along the way. I'm guessing it's something ridiculously simple. It usually is.
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 Folder Help Needed

Post by Perryg »

Well the steps to mount the share are actually few and easy (if you know Linux cli commands)

Assuming the GAs are actually installed the two commands you ran are accurate

1) create the mount point ( I use /mnt but you can use /media )
  • sudo mkdir /mnt/share
2) mount the VBox share.
  • sudo mount -t vboxsf <share name> <mount point>
then in a terminal you simply cd to that folder.
cd /mnt/share and if there is anything in the shared folder it should show by using the ls command.

Once you finally get this to work let me know and I will tell you how to make the mount persistent.
ctbuzzy
Posts: 3
Joined: 26. Mar 2013, 01:33

Re: Shared Folder Help Needed

Post by ctbuzzy »

Thanks for the help! After several more wasted hours, I finally got it to work. I ended up using completely different commands. My final problem had nothing to do with mounting Guest Additions or setting up the shared folder on Win7. It was all about mounting the folder in Ubuntu. The instructions I was getting from the VB manual & numerous other sources were incomplete & simply wrong. Mounting the shared folder in the Ubuntu guest required completely different commands than those provided by the manual & at least one additional step. Oh well, at least I seem to have accomplished what I set out to do.
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 Folder Help Needed

Post by Perryg »

I'm glad you got it working, but I can assure you that the commands I posted are in fact the commands that you would use for Ubuntu.
Anthony[ELine]
Posts: 1
Joined: 2. Apr 2013, 01:09

Re: Shared Folder Help Needed

Post by Anthony[ELine] »

Perryg, if you would be so kind as to post those instructions on making the mount persistent, I'd be grateful. :)
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 Folder Help Needed

Post by Perryg »

edit /etc/rc.local and put the mount command in there ( above the exit 0 )
Post Reply