I have the following Upstart script saved as /etc/init/automount.conf
:
description "SOME DESCRIPTION"
start on startup
task
exec mount -t vboxsf WebApps -o rw,dmode=777,gid=GROUP_ID,uid=USER_ID /var/virtual/some_folder_name
where GROUP_ID and USER_ID is some number I took from /etc/passwd
Previously before I upgraded my ubuntu from 12.10 to 14.04, this was working. After I upgraded it, I also upgraded the virtual box from 4.3.8 to 4.3.10. Subsequently, I think there was an issue with 4.3.10. So I downgraded the virtual box back to 4.3.8.
Now everything is working with the shared folders. Unfortunately, this script is not executed, I believe. The reason is because, the mount is not happening on start up.
I can still execute the command without any problem whatsoever. Why isn't Upstart able to run this any more? How can I tell what the problem is?
By default Upstart should be logging what it's doing to
/var/log/upstart/automount.log
. That will show you output from it trying to run (and in doing so, should let you know roughly what the problem is).Nothing in there? Try a
sudo start automount
and see what that does for things. If that works (and things are mounted), it's likely yourstart on startup
line needs to change. It's possible that something else hasn't started up (I'm not sure what vboxsf requires) so delaying it until later might work.However, in your case I'd be tempted to drop the script completely and just use the more regular method of mounting things
/etc/fstab
. We already have a question with an answer that goes down this route:That's much more logical way of handling this (IMO). You can still pass in all the options, it's just rearranged to something (I haven't tested so you might need to jumble things) like: