create floppy images

34,024

Solution 1

You can create a blank floppy image with the command:

mkfs.msdos -C /path/imagefile.img 1440

On some systems /mkfs.msdos is under /sbin directory. Afterwards you can mount it as loopback device with command:

sudo mkdir /media/floppy1/
sudo mount -o loop /path/imagefile.img /media/floppy1/

To unmount, use the command

sudo umount /media/floppy1/

If you want to create an image from the physical floppy disk, use dd command (disclaimer - I didn't try the below as my floppy is gone! but should work) (and assume that's 1.44MB type floppy disk... 1.2MB ones should have gone at the time of DOS 6.22 )

dd bs=512 count=2880 if=/dev/fda of=/path/imagefile.img

Reference: man page of mkfs.msdos; Create mount and copy floppy disks images under linux

Solution 2

I have experienced this too. One solution is trying:

dd bs=512 count=2880 if=/dev/fda of=/path/imagefile.img

If that fails:

  • go to the disks app,
  • press the 3 lines at the top left corner where it says disks,
  • press new disk, and make your .img file.
Share:
34,024

Related videos on Youtube

Akisame
Author by

Akisame

Updated on September 18, 2022

Comments

  • Akisame
    Akisame over 1 year

    I'm running a virtualbox ms dos 6.22 emulator and I need quite a lot of virtual floppy images filled with software.
    Does anyone know a good program to efficiently create floppy images and fill them with my specified files??

    It's for an Old School Gaming Night and we want it to be as authentic as possible.

    Both software as ways to mount several floppys at once (or to mount, unmount and to mount the next floppy in quick succession) using the terminal are appreciated.

    • The Dentist
      The Dentist almost 10 years
      Have you tried Dosbox
    • Akisame
      Akisame almost 10 years
      I know I can use dosbox with imgmount but that doesn't make it more efficient. In fact WITH dosbox I'll need even more time since I'll need to use the copy command instead of just dragging and dropping (the folders are a bit too diverse to create a batch file so using dosbox will result in a lot of typing)
  • Akisame
    Akisame almost 10 years
    Thanks but I knew that already. I was just trying to find a more efficient way to making loads of floppy images. I'll probably go and write a little gui to make it a bit faster to create and mount them. Thanks anyway
  • Kenneth L
    Kenneth L almost 10 years
    What do you meant by "loads of floppy images"? Can writing a shell script do?
  • Akisame
    Akisame almost 10 years
    What I mean is that originally it was one game per floppy (or several of them in most cases). Since we want to make it as authentic as possible we need to create at least one image per game and since we want to have a wide variety of games we'll need 'loads of floppy images'. We can't use the original floppy disks because they (in most cases) haven't been used in a really long time and the magnetic disk order has degraded resulting in loads of crashes when running it from the real floppy disks, hence the images. I've made a gui because I will not create ALL images myself
  • Admin
    Admin almost 2 years
    How you add files to that floppy image?
  • Admin
    Admin almost 2 years
    @Carlitos_30 Once you mount the floppy image with sudo mount -o loop /path/imagefile.img /media/floppy1/, you can add files to the path /media/floppy1/. When you are done, unmount it. Please note the 8.3 filename restriction
  • Admin
    Admin almost 2 years
    @Kenneth L Thanks. It worked, specially the part of unmounting. I could see the files in the image after I unmounted.