Skip to content

afs floppy_unix

Thorsten Otto edited this page Feb 6, 2018 · 1 revision

Under Linux (and maybe other Unices)

From a real floppy disk

Creating a floppy image from a real floppy disk is dead simple:

  $ dd if=/dev/fd0 of=/path/to/floppy.img

From scratch (top l33t!)

First, we create an empty file, which has the same size as a 1.44 MB floppy.

  $ dd if=/dev/zero of=/path/to/floppy.img bs=1024 count=1440

Then, we format it (using either vfat or msdos file system):

  $ /sbin/mkfs.msdos /path/to/floppy.img

If you do not have mkfs.msdos on your system (like on Mac OS X) and you have setup TOS, then you can simply run ARAnyM and format the floppy image using "Format Floppy Disk...".

It was easy to put files from an Atari system from a floppy disk to a floppy image. But if we already have the Atari files on the host system, how can we put them on the floppy image? On Mac OS X, you can simply double click the floppy image and the system will mount it for write access. On Linux, we have to mount it using the special loopback device:

  # losetup /dev/loop0 /path/to/floppy.img
  # mount -t msdos /dev/loop0 /mnt

Note: only root user can create this special mapping, and now, your floppy image is mounted in /mnt on your host system. You can copy your Atari files to it. Important: When you are finished with this transfer task, unmount the floppy image, and unset the loop device:

  # unmount /mnt
  # losetup -d /dev/loop0
Clone this wiki locally