(I'm still on 5.1.30 because I need working sound).
>VBoxManage --version
5.1.30r118389
$ /usr/bin/VBoxClient --version
5.1.30r118389
$ uname -a
Linux tabitha 4.4.0-116-generic #140-Ubuntu SMP Mon Feb 12 21:23:04 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux
The setup is fairly simple: the guest is set to auto-login, and I invariably have a terminal open in one of the VB shared folders, as well as a file manager window, which are restored at that time by the session manager.
I've been using rc.local to mount my shared folders since 2010, and this arrangement has worked 100% of the time until a few months ago. Since then, an ls in the terminal has occasionally shown it as empty on startup (which it isn't), and following an update from 14.04 to 16.04 today that's now always the case.
Where this gets interesting is that if I just "cd ." in that directory and then ls it again, all the files that are actually there show up. So, clearly this is a race of some kind.
The rc.local is obviously +x and being run, the mountpoints are all set up correctly, etc, etc. In the interests of debugging, I split the mount out into a separate bash script:
Code: Select all
#!/bin/bash
# use fmode=666 to fix text files etc on ntfs folders being considered executable
for tries in {1..5}
do
mount -t vboxsf -o rw,fmode=666 xfer /xfer
if [[ $? -eq 0 ]] ; then
echo VBox mount attempt $tries succeeded >> /tmp/rclocal.log
ls -l /xfer/ >> /tmp/rclocal.log
break;
fi
echo VBox mount attempt $tries failed >> /tmp/rclocal.log
sleep 1
done
rc.local should be run LONG before X starts, let alone the DE, so the mountpoint should be usable by the time the terminal starts. of course, systemd may well have broken even that, since it seems to be intent on breaking pretty much everything , but AFAICT it got it right:
Code: Select all
(/var/log/syslog)
Mar 18 06:19:43 tabitha systemd[1]: Starting /etc/rc.local Compatibility...
Mar 18 06:19:43 tabitha systemd[1]: Started /etc/rc.local Compatibility.
Mar 18 06:19:48 tabitha systemd[1]: Reached target Multi-User System.
Mar 18 06:19:48 tabitha systemd[1]: Reached target Graphical Interface.
AFAICT, using VB's AUTO-mount *doesn't* have this problem, though I've only tried that a couple of times so far. The downside with that of course is that the folders aren't where I want them. (Obviously I could potentially symlink them, but I'd rather get this problem sorted out if at all possible).
Any ideas? I'm happy to provide more info if I missed anything, and can try out test builds if one of the devs has a potential fix.
Thanks.