balanga please re-read what has T-Daemon said above; he answered your question.
Let's say though your image is one of these: 13.2-RELEASE-i386-memstick.img. You do this:
It depends on what "img" is. Simplified: mdconfig creates a layer for you (backing store), you can mount it as if it was a disk and hence treat it as such.
Again, ".img" can be anything. But with these images it is exactly this.
Let's say though your image is one of these: 13.2-RELEASE-i386-memstick.img. You do this:
Code:
mkdir /a
mdconfig -a -t vnode -f FreeBSD-13.2-RELEASE-i386-memstick.img
gpart show md0
=> 1 2021584 md0 MBR (987M)
1 2021584 1 freebsd [active] (987M)
mount -t ufs /dev/md0s1a /a
echo new file > /a/afile
umount /a
mdconfig -d -u 0
It depends on what "img" is. Simplified: mdconfig creates a layer for you (backing store), you can mount it as if it was a disk and hence treat it as such.
Again, ".img" can be anything. But with these images it is exactly this.