I have windows 7 (host), virtual box, and BioLinux6 (a varient of Ubuntu) as the guest OS.

how can i set up the shared folders to be usable for read and write in both OS without having to re-mount them every time i start up.

I'm quite familiar with windows, but totally new to Linux, the virtual box documentation didn't make sense for me as a non-linux user, it was just a couple of lines of commands, which i think only mounted the shared folders until the next re-boot.

link|improve this question

36% accept rate
feedback

2 Answers

up vote 2 down vote accepted

First, you have to install the VirtualBox Guest additions in your host system. You shouldn't be able to use shared folders without them, if you didn't do that yet.

Second, add the the shared folder as a permanent Folder.

On the guest system, add the /etc/fstab file. You will need to open it via sudo to have edit rights.

Now, add a line to the bottom of that file. If your shared folder has the name "shared", and you want to mount it to the location /home/bec/shared, add the following line (although normally folders should be mounted to /mnt/...):

shared /home/bec/shared vboxsf defaults 0 0

Now, after rebooting the machine, the mounted folder should be accessible in the /home/bec/shared folder you supplied.

link|improve this answer
thanks, that seems to have worked – Kirstin Jan 5 '11 at 4:06
thanks, that seems to have worked, but the two folders i tried to share seem to have both mounted as read only, when i wanted one read only and one full access, do i need to change the access privileges on the folder from the guest OS side, if so, how? – Kirstin Jan 7 '11 at 6:57
In the "Shared Folders" option of VirtualBox you should be able, when adding or editing a specific share, to set the "Read-only"-flag. On the guest-system, when mounting the way I mentioned in my answer, the access rights should be set to "Full access" automatically. If, for whatever reason, it does not mount with write privileges, you can add mount options instead of defaults (comma separated, no-whitespace). To see what mount options are available, consult the man pages to "mount", most likely on line 296ff. You probably need auto,rw,user, but just look it up. – private_meta Jan 10 '11 at 10:52
feedback

adding that line in the file fstab worked and now I am able to share files between the guest and the host OS I would like to know what difference that line makes and what does it mean to include that and not include that.. or else if there is any reference in there

link|improve this answer
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.