You are not logged in.
Pages: 1
I using VirtualBox in Windows and I have installed Arch Linux on it.
I have set a shared folder that can be accessed by both Windows and Arch Linux. I want to set virtualbox shared folder /media/sf_www on /home/~/public_html.
So after boot make manualy this.
sudo mount -t vboxsf /media/www /home/petr/public_htmlBut i would like make automount on /home/~/public_html after boot, or after login on my virtual system.
So try this:
[Unit]
Description=My script
[Service]
Type=simple
ExecStart=/usr/bin/autoshare.service
#[Install]
#WantedBy=multi-user.targetand
#!/usr/bin/sh
cd /media/
mount -t vboxsf www /home/petr/public_htmlIf i try make this
systemctl enable autoshare.servicehave a problem, because linux mounting virtualbox dev after my script, so i have error no device:(
If i start manualy
systemctl start autoshare.serviceworks perfect:)
So my question is, what is the right way to make this automaticly? I trying found solution 3 weeks:(
Thanks
Offline
Why not just make a symlink in your home directory that points to the shares location?
ln -s /media/vboxsf /home/petr/public_htmlOffline
Hello, thank you for your respond. If i using symlink have problem with file rights look here
[link]http://superuser.com/questions/640027/w … red-folder[/link]
Why not just make a symlink in your home directory that points to the shares location?
ln -s /media/vboxsf /home/petr/public_html
Offline
So i tried fstab too, but without success"(
Offline
Hello nobody who can help?
Offline
Are you sure that the folder is available/can be accessed when this is running on boot?
In your service script make it do a lsmod | grep -i vbox > /tmp/vboxshare.log to check to see if the vbox kernel module is actually already loaded when your service is running? You should be able to do this in fstab as well? If it's running before the kernel modules are loaded that are needed for vbox shared folders then it's not going to work.
Last edited by bryan.paradis (2016-12-13 10:42:16)
Offline
Try to add your shared folder in VM Settings (Settings -> Shared Folders -> Auto-mount=YES
Then you should see your shared folder in /media folder.
Offline
Pages: 1