2

Installing a new VPN on a new workstation and it has been a year since I did my last Virtualbox setup. Everything works but I don't like how the shared folders in media are labeled as sf_folder. I was curious to know can I rename these folders or would it cause issues? I didn't see a solution or any documentation on it from a search. Setup is now Windows 7 and Ubuntu 12.04 running Virtualbox. This may be another question but after the initial install and setup of shared folders and Guest Additions I only see a folder in media and not mnt. I can get a shared folder in mnt with sudo ln -sf /media/folder /mnt/ but I don't know yet if there's a better way yet.

2 Answers 2

1

sf_ is alwasy prepended by VirtualBox to indicate that it's a shared folder. This is done by a vbox service, part of the Guest Additions. You can bind the shared folder directory to another of your choice in mtab if you desire.

Use this to open the mtab file:

sudo gedit /etc/mtab

In the mtab file enter a new line at the bottom. The format you want to use is:

/real/folder/location  /where/youwantit/toshow bind rw 0 0

Here's an example from one of mine:

/media/sf_IBM /opt/ibm bind rw 0 0

It's standard practice to hit [enter] when you've finished your edit so there is a new line entry at the end of the file.

3
  • 1
    Could you expand your answer on how to perform this "bind mount"?
    – gertvdijk
    Aug 15, 2013 at 19:50
  • 1
    Why are you proposing to use /etc/mtab? /etc/fstab is the file where configuration happens.
    – guntbert
    Aug 15, 2013 at 20:26
  • if he makes the edits in fstab, ubuntu will error when starting. The sf_ object to mount isn't available until the vbox services start, which is after fstab.
    – Colyn1337
    Aug 15, 2013 at 20:31
0

I figured out how to add a folder in the mnt location from the media location without having sf_.

I used this code:

sudo mount --bind /media/sf_folder /mnt/folder

1
  • While your command will work, it will only work for your existing session. When you reboot, the bind will be lost and you'll have to manually enter the command again.
    – Colyn1337
    Aug 19, 2013 at 20:17

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .