I posted this over on VCFED (https://forum.vcfed.org/index.php?threads/mtc … 03/post-1354721) copying it here:
I setup my FreeBSD server to mount my drive images into its local filesystem so it's easy to add stuff to them. Here's how I did it - steps are probably very similar in Linux but using different programs/commands.
First, I had to enable linux compatibility.
sysrc linux_enable="YES"
now reboot your machine or run:
service linux start
Go to the directory where you'll be storing your disk images. I haven't picked a good place yet so it's all in root's home directory (boo! hiss!)
create a FAT16 2GB hard disk image:
newfs_msdos -C 2047M -F 16 drive0.img
attach a "memory disk" (although really we're just mounting the hard drive image I just made)
mdconfig drive0.img
(this will return something like /dev/md0 - use that in the next steps)
mount the image under /mnt
mkdir /mnt/dos0
mount -t msdos /dev/md0 /mnt/dos0
share the drive(s)
./netdrive serve
I can now navigate directly into my drive0.img at /mnt/dos0 and add/remove/manage whatever I need to like any other local filesystem. I connect to it from my MS-DOS machine via:
netdrive connect 192.168.1.66:2002 drive0.img d:
It's probably a really bad idea to try and write to it from the MS-DOS system while you're doing this but I like to live dangerously. Next I'll export it via samba so I can just load whatever I want onto it from a workstation, and will probably setup multiple disk images based on what they contain.