Looks like makefs(8) tools creates incorrect image with UFS2 file system. UFS1 is ok, for example: # makefs /tmp/test1.img /bin # file -s /tmp/test1.img /tmp/test1.img: Unix Fast File system [v1] (little-endian), last mounted on , last written at Sat Nov 12 21:34:57 2011, clean flag 1, number of blocks 1296, number of data blocks 1255, number of cylinder groups 1, block size 8192, fragment size 1024, minimum percentage of free blocks 8, rotational delay 0ms, disk rotational speed 60rps, TIME optimization All fine. Try to use makefs for UFS2: # makefs -t ffs -o version=2 -o label=ROOTFS /tmp/test1.img /bin # file -s /tmp/test1.img /tmp/test1.img: data Try use mdconfig and newfs instead of makefs: # truncate -s 100m /tmp/testme # newfs -L ROOTFS `mdconfig -a -t vnode -f /tmp/testme` # file -s /tmp/testme /tmp/testme: Unix Fast File system [v2] (little-endian) last mounted on , volume name ROOTFS, last written at Sat Nov 12 17:38:29 2011, clean flag 1, readonly flag 0, number of blocks 25600, number of data blocks 25095, number of cylinder groups 4, block size 32768, fragment size 4096, average file size 16384, average number of files in dir 64, pending blocks to free 0, pending inodes to free 0, system-wide uuid 0, minimum percentage of free blocks 8, TIME optimization All fine. With this problem it is impossible to create UFS2 (which support LABEL) image which it is possible to use as mfsroot image at loading on UFS Label through rootfs_type="mfs_root" rootfs_name="/boot/mfsroot" vfs.root.mountfrom="ufs:/dev/ufs/ROOTFS"
Bulk taking makefs bugs.
jmg fixed an issue affecting UFS in head@r266930 and I just MFCed it in stable/9 and stable/10 as r290599 and r290600, respectively. Part of the annoyance that I have with the ffs images is that it doesn't have a lower bound on the free space, so it fails if there isn't enough space allocated to the memory disk (but that can be ameliorated through `-M <some-value>`. Closing because I can't repro the issue described in comment # 0 anymore.