segunda-feira, 26 de abril de 2010

How to mount VirtualBox shared folder?

How to mount VirtualBox shared folder?

« Reply #5 on: February 06, 2010, 03:08:59 PM »

Even though I use VirtualBox frequently to run TC, I never wanted to install VBox-OSE-additions.tcz just to be able to use vboxfs. This is due to the amount of dependencies (incl. Xorg) for which I typically have no need or use.

I therefore had a bit a poke around and found the following minimalistic way just to use the VirtualBox shared folders feature:

(1) Install the VBox-OSE-additions-modules-2.6.29.1-tinycore extenison (containg just the kernel modules), e.g.
tce-load -wi VBox-OSE-additions-modules-2.6.29.1-tinycore.tcz

(2) Extract /usr/local/sbin/mount.vboxsf from VBox-OSE-additions.tcz. This file will have to be copied to /usr/local/sbin with the suitable ownership (i.e. root:root) and permission (i.e. 755)

(3) Ensure that the vboxvfs module is loaded, e.g.
lsmod | grep -q vboxvfs || sudo modprobe vboxvfs

After this you can mount VirtualBox shared folders with a command like
sudo mount -t vboxsf -o nodev d-drive-rw /mnt/d-drive-rw
or
sudo mount.vboxsf d-drive-ro /mnt/d-drive-ro

Please note that these steps do not use the additional user (i.e. vboxadd) and group (i.e. daemon) that the VBox-OSE-additions extension creates. But according to my (limited) testing this does not appear to be a requirement.

I guess this could be put into an additional extension. Or the current extension could be split into a vboxsf and a video driver related extension. But I don't consider this to be my call. I was just curious to find a different way and thought I share the information here so that others might benefit from it.

Nenhum comentário: