FreeBSD 13.2 virtualbox guest: If the host's root directory is mounted as a shared folder, the contents are randomly there or not there. Not actually random, but it depends on the order of access. It seems like a subdir path can not be used (successfully) unless the parent directories are first accessed by themselves. WTF?
Here's my setup:
* Shared folder name in Vbox is "ROOT", host path is "/", read-only, NO automount
* In freebsd guest:
BUT...
What the heck could be causing this ??
----
There's nothing obvious in /var/log/messages, just the following when the mount is done:
IIRC, I did this during installation:
(started with the pre-built .vmdk machine image)
Here's my setup:
* Shared folder name in Vbox is "ROOT", host path is "/", read-only, NO automount
* In freebsd guest:
Code:
sudo mount -t vboxvfs -o uid=1001,gid=1001 ROOT /mnt # 1001 is my uid
ls /mnt
(shows bin, etc, home, etc.)
ls /mnt/home
(shows user homedirs, including mine ("jima")
ls /mnt/home/jima
(shows expected files)
Code:
sudo umount /mnt
sudo mount -t vboxvfs -o uid=1001,gid=1001 ROOT /mnt # [I]exactly same as before[/I]
ls /mnt/home/jima
ls: /mnt/home/jima: No such file or directory
ls /mnt
(looks correct)
ls /mnt/home
SHOWS CONTENTS OF MY HOME DIRECTORY, not contents of /home on the host
ls /mnt/home/jima
----
There's nothing obvious in /var/log/messages, just the following when the mount is done:
Code:
Jun 14 17:39:21 freebsd kernel: VBOXVFS[1]: sfprov_mount: Enter
Jun 14 17:39:21 freebsd kernel: VBOXVFS[1]: sfprov_mount: path: [ROOT]
Jun 14 17:39:21 freebsd kernel: sfprov_mount(ROOT): error=0 rc=0
(started with the pre-built .vmdk machine image)
Code:
pkg install emulators/virtualbox-ose-additions
sysrc vboxguest_enable="YES"
sysrc vboxservice_enable="YES"
pw groupmod wheel -m test # 'test' is my username