Alright... Let's attempt an answer to this question.
The setup and master/skeleton directories
The "root" directory of the jail system is /home/j
. It contains 3+ subdirectories:
/home/j/
|- mroot/ # The master (read-only) root directory
|- skel/ # The master (read-write) directory
|- js/ # Each jail will have a subdirectory here
# where its writable directories point to
|- <jail>/ # Each jail will have its own directory
Now the mroot/
directory contains the base system as you've done a make installword to it. It will keep the read-only directories such as bin/
and dev/
. All writable directories (e.g. etc/
) will be moved to the skel/
directory. This is done in step 3 of section 14.5.1.
As of now, there is no /home/j/mroot/etc/
folder (since you moved it), so we'll create a symlink for it. First we'll create a new subdirectory s/
(short names can be too short and thus become confusing too easily). This is done in step 5. The setup of the mroot/
folder will now look a bit like this.
/home/j/mroot/
|- s/ # Empty directory for writing to
|- etc # Symlink to s/etc/
|- home # Symlink to s/home/
|- ... # More symlinks are created
These symlinks will now be broken as those directories do not exist. They will be created when a jail is created.
Creating a jail
Now the third folder (/home/j/js/
) will come into play. In here we will create a subdirectory for each jail to contain the writable content.
/home/j/js/
|- mail/
|- ns/
|- www/
The skeleton directory (skel/
) is copied to each of these subdirectories.
Using nullfs mounts we'll now tie everything together. Each jail gets another directory. These are nullfs (read-only) mounts to /home/j/mroot
(step 1 of 15.5.2).
/home/j/
|- mail/
|- ns/
|- www/
As they are mounts, going into such a directory will bring you to /home/j/mroot/
instead, though your path won't change. Each jail will have a writable /etc/
folder which seems to be /home/j/mail/etc/
but due to the above created mount, it will actually be /home/j/mroot/etc/
.
However, remember from the very beginning that this folder doesn't exist anymore. It was moved and instead a symlink was created. This symlink pointed to a not-yet-existing subfolder of /home/j/mroot/s/
. The second nullfs mount will fix this.
When creating a mount for /home/j/ns/s
to point to /home/js/ns
. This destination contains the copy of the skeleton directory containing all writable files. The source, /home/j/ns/s
, will actually be /home/j/mroot/s
due to the first mount.
Example
When a jail accesses a file in /etc/
(which should be writable), it is actually accessing /home/j/<jail>/etc/
on the host. However, this is a mount to /home/j/mroot/etc/
due to the first mount. But this "directory" is not a directory at all, it's a symlink to /home/j/mroot/s/etc
which is, due to the second mount, in fact /home/js/ns/etc/
.
Conclusion
I hope I succeeded in clarifying the setup a bit. I will reread my own answer once I've cleared my mind again because my head is still spinning from trying to figure this one out myself!
Best Answer
From what I can find, UFS support seemed to be problematic and/or unreliable in Linux. Most of the articles I found were from years ago.
You didn't say whether this was a USB drive or an actual hard disk, and one thing some recommended was to check your USB speed.
Another option might be to use virtualization or a bootable disk to run a variant of FreeBSD, which should natively support UFS. I don't know if you're just looking to get files off the drive or if you are trying to share the drive with another system, but if you're just looking to pull data, using a bootable *BSD variant may be the best go-between. Or you can set up a BSD VM or small BSD machine to act as a SAMBA server so you can read and write with that filesystem.