Tiny Core Linux
		Tiny Core Extensions => TCE Talk => Topic started by: bmarkus on January 28, 2010, 04:27:20 AM
		
			
			- 
				How can I mount a VirtualBox shared folder? VBox-OSE-additions.tcz is installed. VirtualBox is running on WINDOWS XP, TC is 2.8 Folder is C:\111 it is named 111 in VB, destination folder exists. 
 
 Tried
 
 sudo mount -t vboxsf 111 /mnt/111
 sudo mount -t vboxsf c:\111 /mnt/111
 
 with no success. Error message:
 
 unknown mount option `' 
 
 
- 
				Hi bmarkus,
 
 Don't know if this works in your case, this works for me on a Linux Machine running VB XP:
 Add share folder in Virtualbox
 ==============================
 1. installed VirtualBox Guest Additions
 2. Under Windows XP, my shared_folder(in this case in fedora is A4G's "Documents") is simply mapped to a drive letter using the following command:
 C:\> net use s: \\vboxsvr\Documents
 
 Please let us know if it works.
- 
				Thanks, but unfortunately it is the opposit direction. You are running WINDOWS on LINUX while I'm running LINUX on WINDOWS host.
			
- 
				try this
 1. Install Guest Additions… from the Devices menu, then run mount /media/cdrom.
 2. Run # sh /cdrom/VBoxLinuxAdditions.run mount -t vboxsf
 reboot
 # mount.vboxsf [the_name_of_the_shared_folder] /media/[name_of_mount_point]
 
 
- 
				Thanks it works:
 
 sudo mount.vboxsf 111 /mnt/111 
 Regards... Béla
- 
				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-... extension (containing just the kernel modules), e.g.
 tce-load -wi VBox-OSE-additions-modules-$(uname -r)
 
 (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 (for TC 2.x) or 'vboxsf' module (for TC 3.x) is loaded, e.g.
 for TC 2.x:    lsmod | grep -q vboxvfs || sudo modprobe vboxvfs
 for TC 3.x:    lsmod | grep -q vboxsf || sudo modprobe vboxsf
 
 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.
 
 
 EDIT: Made corrections for the fact that according to the changelog for VBox v3.1.8 "... renamed the guest kernel module from vboxvfs to vboxsf ...". Therefore for TC 2.x (where the additions were based on VBox v3.0.12) the module name is 'vboxvfs' whilst for TC 3.x it is now 'vboxsf'. Plus another minor adjustment to avoid a "hard-coded" kernel version.
- 
				(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)
 
 
 Hi
 
 Sorry for digging up this old thread, but I'm a Linux beginner and am having problems following these instructions. Could you explain exactly how I extract this specific file from this extension?
 
 I'm running Micro Core 3.5.1 and have so far downloaded and installed the required virtualbox-ose-additions-modules-2.6.33.3-tinycore.tcz successfully. I'm only looking to be able to read and write a few files in the shared folder on my host, nothing advanced.
 
 Any help is appreciated. Thanks.
 
- 
				Well, it has been while since I wrote that so I just wanted to make sure that it's still working. Hence I did a fairly quick (and superficial) test to confirm that.
 
 To extract a file from an extension I know of two ways: (1) use the 'unsquashfs' tool from the 'squashfs-tools-4.x.tcz' extension or (2) via a temporary loop-mounting of the extension. As an example for the latter you could do the following:
 tc@box:~$ tce-fetch.sh virtualbox-ose-additions.tcz
 tc@box:~$ mkdir extr
 tc@box:~$ sudo mount virtualbox-ose-additions.tcz extr
 tc@box:~$ sudo cp -p extr/usr/local/sbin/mount.vboxsf /usr/local/sbin
 tc@box:~$ umount -d extr
 tc@box:~$ rm -rf virtualbox-ose-additions.tcz extr
 tc@box:~$ ls -l /usr/local/sbin/mount.vboxsf
 -rwsr-xr-x    1 root     root         11260 Feb 19 21:39 /usr/local/sbin/mount.vboxsf
 
 Furthermore I've found that for TC 3.x the command used in (3) needed a little "tweak": lsmod | grep -q vboxsf || sudo modprobe vboxsf (and have now amended the other post), but the rest seems to still work.
 
 Obviously you'll need to ensure that the '/usr/local/sbin/mount.vboxsf ' file "survives" the next re-boot. So by adding it to the backup "white-list" (e.g. via echo usr/local/sbin/mount.vboxsf >> /opt/.filetool.lst) and ensuring that a backup is performed (e.g. via filetool.sh -b) this should be taken care of.
 
 
 EDIT: Minor correction in light of the small change to reply #5.
- 
				tc@box:~$ umount extr
 
 
 Preferably
 umount -d extr
 to prevent leaking of loop device   ;)
- 
				I've got the folder sharing working perfectly now. Thanks a lot for your help maro, and for your advice as well tinypoodle.
 
- 
				Just to clarify the above posts:
 
 All references to vboxfs should be vboxsf (why are the 's' & 'f' this way round - surely fs means filesystem?)
 
 /usr/local/sbin doesn't exist in the base system so you might want to use /usr/local/bin instead.
 
 My simple setup has:
 1.   virtualbox-ose-additions-modules-2.6.33.3-tinycore.tcz (or current from repository) as an on-boot extension
 
 2.   mount.vboxsf is stored in /home/tc (this way it is backed up or persistently available)
 
 3. bootlocal.sh has the lines:
 ln -s /home/tc/mount.vboxsf /usr/local/bin/mount.vboxsf
 modprobe vboxsf
 mkdir /mnt/win
 mount.vboxsf win-share /mnt/win
win-share is the name of the shared folder on the windows machine as set from the shared folders menu option in VirtualBox
 
 
- 
				@andrewb: Thanks for noting that the spelling in reply #7 was incorrect. I've now updated reply #5 (and #7) to ensure that the information is valid for TC 2.x as well as TC 3.x.