fail to mount of virtualbox shared folder from init daemon to systemd
before
first. I wrote on the mount command to /etc/rc.local
mount -t vboxsf -o uid=1000,gid=1000,dmode=0755,fmode=0755 Dropbox /home/murase_syuka/Dropbox
but, it is fail when change from init to systemd
now
it is success when run on terminal.
but is not automatic is a manual
after
make the systemd unit for auto mount to vbox shared folder.
reinstall vbox guest addition disk
first, I check to the running of virtualbox service.
$ systemctl list-units ... [[1;31mvboxadd-service.service ^[[0m loaded ^[[1;31mfailed failed ^[[0m LSB: VirtualBox Additions service vboxadd.service loaded active exited LSB: VirtualBox Linux Additions kernel modules virtualbox-guest-utils.service loaded active running LSB: VirtualBox Linux Additions virtualbox-guest-x11.service loaded active exited LSB: VirtualBox Linux X11 Additions ...
make a service
first. cd /etc/systemd/system/ and
make /etc/systemd/system/vboxadd-sharedfolder.service
[Unit] Description=VBox Shared Folder Mount After=vboxadd.service [Service] Type=oneshot ExecStart=/etc/rc.local [Install] WantedBy=multi.user.target
second. load the service.unit
$ sudo systemctl load vboxadd-sharedfolder.service $ systemctl list-unit-files
third. enable service
$ sudo systemctl enable vboxadd-sharedfolder.service ln -s '/etc/systemd/system/vboxadd-sharedfolder.service' '/etc/systemd/system/multi.user.target.wants/vboxadd-sharedfolder.service' $ systemctl list-units
fourth. start service
$ sudo systemctl start vboxadd-sharedfolder.service
if fail to start service
$ sudo systemctl start vboxadd-sharedfolder.service Job for vboxadd-sharedfolder.service failed. See 'systemctl status vboxadd-sharedfolder.service' and 'journalctl -xn' for details.you check the status.
by the way, the following description was the failure of the vbox bug #12879$ sudo systemctl status vboxadd-sharedfolder.service vboxadd-sharedfolder.service - VBox Shared Folder Mount Loaded: loaded (/etc/systemd/system/vboxadd-sharedfolder.service; enabled) Active: failed (Result: exit-code) since 木 2014-05-15 10:03:55 JST; 1min 24s ago Process: 2279 ExecStart=/etc/rc.local (code=exited, status=32) 5月 15 10:03:55 debian rc.local[2279]: mount: wrong fs type, bad option, bad superblock on Dropbox, 5月 15 10:03:55 debian rc.local[2279]: missing codepage or helper program, or other error 5月 15 10:03:55 debian rc.local[2279]: (for several filesystems (e.g. nfs, cifs) you might 5月 15 10:03:55 debian rc.local[2279]: need a /sbin/mount.<type> helper program) 5月 15 10:03:55 debian rc.local[2279]: In some cases useful info is found in syslog - try 5月 15 10:03:55 debian rc.local[2279]: dmesg | tail or so 5月 15 10:03:55 debian systemd[1]: vboxadd-sharedfolder.service: main process exited, code=exited, status=32/n/a 5月 15 10:03:55 debian systemd[1]: Failed to start VBox Shared Folder Mount. 5月 15 10:03:55 debian systemd[1]: Unit vboxadd-sharedfolder.service entered failed state.
last
reboot and check mount shared folder
last. you reboot and it would have been automatically mounted to vbox shared folder.