Solved X11 socket vanishes after onestop/onestart the jail

I have a jail called “rockpro64-sdk” into which I mount the directory containing the X11 unix domain socket via an fstab file:
Code:
/tmp/.X11-unix          /jail/rockpro64-sdk/tmp/.X11-unix      nullfs         rw        0       0

After the following sequence of commands on the host the X11 socket in /tmp/.X11-unix vanishes both on the host and inside the jail:
Code:
# service jail onestop rockpro64-sdk
# service jail onestart rockpro64-sdk

After that the X-server still runs but I can (understandably) no longer start any applications, because they cannot communicate with the X-server.

What is going on here?

Here is my full jail config from /etc/jail.conf:
Code:
rockpro64-sdk {
        host.hostname="rockpro64-sdk.schattenwelt.org";
        ip4="inherit";
        ip6="inherit";
        path="/jail/rockpro64-sdk";
        mount.devfs;
        allow.raw_sockets=1;
        allow.chflags=1;
        exec.clean;
        exec.start="sh /etc/rc";
        exec.stop="sh /etc/rc.shutdown";
        mount.fstab="/jail/rockpro64-sdk/etc/fstab.jail";
}
 
dont use an fstab with a jail

i found that using an fstab and then stopping the jail
resulted in the mountpoints not being unmounted

the solution is to put the mount points in the jails config
that way the jail "knows" about the mountpoints and they will be unmounted when you stop the jail

 
dont use an fstab with a jail

i found that using an fstab and then stopping the jail
resulted in the mountpoints not being unmounted

the solution is to put the mount points in the jails config
that way the jail "knows" about the mountpoints and they will be unmounted when you stop the jail

You should use the mount.fstab option in your jail.conf(5) instead of the host's fstab(5).
 
Back
Top