Attempting to create a thin jail on a Raspberry Pi using 13-2-REL, I had trouble with the handbook's skeleton formulation 17.5.2. Creating a Thin Jail Using NullFS. While searching for solutions, I stumbled upon Scott Robbins's method for creating thin jails using unionfs(8) which worked but failed with a no tty error when I tried to
I was able to workaround this error by:
Furthermore, this comment under the "Thin jail woes" forum post advises against using unionfs(8) due to warnings about bugs in the man page, along with some scary notes elsewhere in the discussion about the possibility of a corrupted file system. However, the current version of the man page no longer contains a bug warning!
My questions:
Thanks.
ssh
into it.I was able to workaround this error by:
AddingI was wrong about this (see here).add path 'ttyv*' unhide
to[devfsrules_unhide_login=3]
in /etc/defaults/devfs.rules and reboot- Using
ls
to tickle the device file system before jail start (in jail.conf:exec.prestart += "ls /usr/local/jails/containers/${name}_/dev"
) which tricks the mount system into including the devices (/dev/ttyv*
)
ssh
worked correctly after that. The idea for (2) came from these forum posts — Thin jail woes and devfs not mounting in nullfs jail — and this workaround for the still unfixed bug 186360.Furthermore, this comment under the "Thin jail woes" forum post advises against using unionfs(8) due to warnings about bugs in the man page, along with some scary notes elsewhere in the discussion about the possibility of a corrupted file system. However, the current version of the man page no longer contains a bug warning!
My questions:
- Is unionfs now stable and safe to use in general?
- Is unionfs now stable and safe to use for thin jails?
- Is the device mount bug indicative of continued unionfs problems or just a difficult to fix decade old bug?
- Should the thin jail section of the handbook be updated to reflect the simpler method of thin jail set up (vs. the more complex skeleton links that are created)? Or, wait until Bug 186360 is fixed so no one has to workaround the ssh problem?
- Should Raspberry Pi base image include an entry for /dev/ttyv? I know very little about the intricacies of devices or if ttyv* is the common terminal on the Pi.
- Given that touching the device system somehow magically works around the mount problem, should unionfs be used for thin jail mounts?
Thanks.
sh:
$ # Using a Raspberry Pi 4b (2MB)
$ uname -a
FreeBSD pc-base 13.2-RELEASE FreeBSD 13.2-RELEASE releng/13.2-n254617-525ecfdad597 GENERIC arm64