Create and build a FAT partition of arbitrary size and selecting files without mounting

By Ryan Romanchuk
On
brew install mtools
dd if=/dev/zero of=disk.img bs=512M count=2
mformat -i disk.img ::
mcopy -i disk.img demo.bin ::
mdir -i disk.img ::

Volume in drive : has no label
 Volume Serial Number is 5F2F-08F8
Directory for ::/

demo     bin  11075648 2022-10-01  23:54 
        1 file           11 075 648 bytes
                      1 062 354 944 bytes free
talk