Here is the sequence of commands I use on Linux to create a fs from a file... Is this possible in BSD? And, if so, how do I do it?
# head -c $SIZE < /dev/zero > myfilename
# losetup /dev/loop0 myfilename
# mke2fs /dev/loop0
# mount -o loop /dev/loop0 /mnt/myfilename
I would like the FS to be read-only.