Here you go (found on the web):
1. Create a filesystem image:
# dd if=/dev/zero of=mdimage -bs=1024 count=4096
# mdconfig -a -t vnode -f mdimage -s 4096k -u 4
# disklabel -r -w md4 auto
# newfs /dev/md4c
# mount /dev/md4c /mnt
.
. put stuff on it
.
# umount /mnt
# mdconfig -d -u 4
2. Make su
I am having problems building an embedded kernel +
root filesystem image for FreeBSD-5.3. I had
previously succeeded on 4.11.
For 4.11 I created a filesystem using vnconfig,
disklabel, newfs, etc. and installed it into the
kernel using write_mfs_in_kernel. I built a kernel
with MD_ROOT and MD_R