FreeBSD 4.x uses vnconfig FreeBSD 5.x uses mdconfig

First, use DD to create an empty floppy image (1.44mb in size)

FreeBSD 4.x

        dd if=/dev/zero of=floppy.img bs=512 count=2880
        vnconfig vn0 floppy.img
        newfs_msdos -f 1440 /dev/vn0
        mount -t msdosfs /dev/vn0 /mnt/myfloppy

FreeBSD 5.x (note that memdisks are allocated dynamically, and the name is displayed after the mdconfig command. This assumes that "md0" is printed.)

        dd if=/dev/zero of=floppy.img bs=512 count=2880
        mdconfig -a -t vnode -f floppy.img
        newfs_msdos -f 1440 /dev/md0
        mount -t msdosfs /dev/md0 /mnt/myfloppy

To shut and image down, unmount and unconfigure it. FreeBSD 4.x

        umount /tmp/myfloppy
        vnconfig -c /dev/vn0

FreeBSD 5.x

        umount /tmp/myfloppy
        mdconfig -d -u md0