Ok, good eye-openers here,
SirDice 
You were right, this
vnode-based mdmfs actually DOES write changes back to the file system. Too bad...
However! I've just tired various other options and finally came up with this modified
/etc/fstab that seems to solve those problems:
Code:
/dev/gpt/Root / ufs ro 1 1
/dev/gpt/USR /usr ufs ro 0 0
#/dev/gpt/HOME /home ufs rw,noatime 0 0
devfs /dev devfs rw 0 0
md /var mfs rw,-s60m 2 0
tmpfs /tmp tmpfs rw,mode=1777,size=300M 0 0
What does that (seem to) achieve?
1.
Read-only root and other disk-based fs.
2.
Read-write mounted
devfs(5) for which there is a special fstab entry. Thought that WAS necessary since our root is read-only and so is everything on it... not sure though. But this way it works (see below)
3.
Read-write CLEAN
/var which is populated on boot by system itself, so the necessary stuff is there, it seems. At least my Freeradius3 and
isc-dhcp-server work fine with this configuration. I run a WiFi AP with EAP-TLS Radius-based auth.
So far, everything on the disk is mounted read-only, which was the original idea.
And when we need to install additional packages? Well I keep the original
/var as
/var.save, which in that case can be renamed to
/var and mounted
read-write, together with
/usr and whatever else is needed. Once this done, bring things back to
read-only.
The general idea is to make it look as much as possible like an
embedded system.
Of course, I didn't try this with many apps, just my basic setup including (1) system itself, (2) isc-dhcpd, (3) Freeradius3 serving EAP-TLS for Wifi AP, (4) hostapd.
An OpenVPN server can run there as well. But for more complicated things like X --- I don't think that a USB memstick installation can be expected to bring us very far... my idea was to use it as OS for a home/small office router with some networking apps. Or a rescue disk... but for that I would rather use a USB with FreeBSD + SysRescCD (linux). Which is not complicated at all, but goes beyond the scope of this document.