Creating img files under linux for DOS virtualization

I gave virtualBox a try and needed a way to pass files from linux to dos. Here’s the method I found in a forum.

1. creating a file of 1.44 MB full of zeros which will later serve as image file:
$ dd if=/dev/zero ibs=1024 count=1440 of=$IMGFILE
2. creating a filesystem in it with mkfs.msdos:
# mkfs.msdos $IMGFILE
3. mounting the file on a loop device:
# mount -o loop -t msdos $IMGFILE /mnt/floppy
4. copy data to /mnt/floppy
5. unmount the file:
# umount /mnt/floppy

Laisser un commentaire

Votre adresse de messagerie ne sera pas publiée. Les champs obligatoires sont indiqués avec *