I've been able to do this as a hack job in arch, but I am having trouble doing to it a more proper way in slackware. I have added the following to rc.local:
/etc/rc.d/init.d/functions
/etc/rc.d/init.d/vboxadd start
/etc/rc.d/init.d/vboxvfs start
/etc/rc.d/init.d/vboxadd-timesync start
/sbin/modprobe vboxvfs
/sbin/mount -t vboxsf -o uid=1000,gid=100,rw userfolder /home/userfolder
Userfolder is a folder on my Windows XP system. If I do the above manually it works perfectly, but it won't let me do it at boot time. I did a similar method with arch but stuck it in a different file. I also tried sticking similar to the above in other files in the rc.d folder. Also tried a cleaner method using fstab but that didn't work either.
Any ideas? Thanks.
how to mount shared folder as home on boot
Re: how to mount shared folder as home on boot
I had the same experience with a script to automatically set up Host Interface Networking. I got an error telling me that a module wasn't loaded, but when I checked, it was.hedron wrote:/sbin/modprobe vboxvfs
/sbin/mount -t vboxsf -o uid=1000,gid=100,rw userfolder /home/userfolder
What happens is the operating system reads the script and executes the commands in quick succession. But the actual tasks the operating system must do in response to those commands can take a few seconds. So, it is probably trying to use the module before the module's code has been read, loaded into memory, and exectued!
So, add a sleep command, and a message echoed to the screen like this:
Code: Select all
/sbin/modprobe vboxvfs
echo "Loading vboxfs..."
sleep 3
/sbin/mount -t vboxsf -o uid=1000,gid=100,rw userfolder /home/userfolder
/sbin/modprobe vboxvfs
/sbin/mount -t vboxsf