Page 1 of 1

Shared folders (Linux guest OS)

Posted: 30. Nov 2012, 20:35
by longtalker
Hello everyone,

I just installed VirtualBox (Xubuntu Xfce 4 running on host OS WIndows XP SP3) in order to be able to run the software FreeSurfer. I would like to have access, from within my VirtualBox, to my computer's hard drive. This seems like an extremely complicated process for someone who's only used Windows so far, and I apologise in advance if this question has been asked before, but after following the steps from the documentation (as well as after following some existing forum threads), I cannot get this seemingly basic functionality to work, which is very frustrating indeed.

In short, I have added my whole hard-drive as a shared folder from the properties of the virtual machine, and then tried mounting it with the command

Code: Select all

mount -t vboxsf dell /mnt/share
This gives a "only root can do that" error, so i tried installing guest additions using

Code: Select all

sh /etc/init.d/vboxadd setup
however I get:

Code: Select all

Building the VirtualBox Guest Additions kernel modules/etc/init.d/vboxadd: 480: cannot create /var/log/vboxadd-install.log: Permission denied
 ...fail!
(Your system does not seem to be set up to build kernel modules.
Look at /var/log/vboxadd-install.log to find out what went wrong)
The log file contains a lot of text which I cannot seem to be able to paste in here.

Any help would be really appreciated!

Re: Shared folders (Linux guest OS)

Posted: 1. Dec 2012, 15:18
by mpack
Adding your entire host hard drive a shared folder is rather unwise, unless of course it's your intention to give malware easy access to your hosts \Windows folder plus personal info. If I was you I would create a single folder which will be used solely for sharing files on a network - and then lets see what your problems are from there.

Re: Shared folders (Linux guest OS)

Posted: 1. Dec 2012, 17:04
by Perryg
I agree with Don that sharing the entire hard drive is a mix for disaster but that is not your issue.
Even with a single folder (from what I see) you are not doing it properly and will see the same error message.

Type man sudo in the guests terminal and read it.

Re: Shared folders (Linux guest OS)

Posted: 3. Dec 2012, 14:22
by longtalker
Many thanks for your replies. Is it really a security concern if it's just me using this computer, including the Virtual Box and everything that runs in it? Anyway, it's not a problem to just share the actual folder that I'll need, I just thought that it would be handy to have access to all the files on my computer (since it is, after all, on this computer that I am running the host OS).

I read through the sudo help, however it seems quite complicated - again, all I want to do is have access to the shared folder that I've defined in the VB GUI. Isn't there a standard command that I can use to mount that folder within the host OS?

Re: Shared folders (Linux guest OS)

Posted: 3. Dec 2012, 15:28
by Perryg
Actually the sudo command isn't that complicated. It elevates the normal Linux user to be able to complete higher commands.

So you just type sudo at the beginning of the command. See as an example below:

Code: Select all

sudo mount -t vboxsf dell /mnt/share
By the way the share is from the host to the guest so you will not actually "mount that folder within the host OS" . Hopefully a typo and you meant guest.

Oh and the security issue for an individual user is to protect you. Even when in a single user environment you must deal with key loggers, and other malware that the Windows host could comes in contact with. Linux however is not effected with most of these things anyway, but you never know what could happen. Since Linux can not use Windows files, only data is useful anyway but you do what you think is proper.

Re: Shared folders (Linux guest OS)

Posted: 3. Dec 2012, 16:50
by longtalker
Got it fixed, thanks very much for your help.