VOGONS

Common searches


First post, by SanSaurus

User metadata
Rank Newbie
Rank
Newbie

Hi there!

Background:
I want to backup old floppy disks (as images) and then be able to mount them in dosbox later.

What I did:

  • I'm running Linux Mint.
    I add an external 3,5" floppy drive (USB)
    I dump an image of a floppy using: dd if=/dev/sdb of=disk.img
    I start dosbox (still on Linux)
    Doing imgmount a ~/disk_images/disk.img -t floppy results in "Can't create drive from file" message from dosbox.

I also tried:

  • I tried without the "-t floppy".
    If I (on purpose) misspell the image file name, dosbox says "The image must be on a host or local drive." (so I point to the correct image file).
    I tried copying the floppy using cat /dev/sdb > disk.img as well. Still the same result.

How do I create proper images of floppies that can be interpreted by dosbox?

Regards,
SanSaurus

PS: I asked a similar question on SuperUser.com, but I don't know if this is more related to linux than dosbox actually?

Reply 1 of 5, by Jorpho

User metadata
Rank l33t++
Rank
l33t++

Are you able to read the files on the disks normally? Are they standard 1.44 MB floppies, or are they lower-density?

If they're boot floppies for old games, then they might not have a usable DOS filesystem at all, but you can still use them in DOSBox with the "boot" command.

A little bit of Googling suggests that you might need to try

dd if=/dev/sdb of=disk.img bs=1440k count=1

There have been suggestions that USB floppy drives are less compatible than standard drives, though.

Reply 2 of 5, by SanSaurus

User metadata
Rank Newbie
Rank
Newbie

Thank you for taking the time to answer.

Yes, I can read the files on the disk normally. They are standard 1.44MB floppies.

Worth mentioning is that I've tried making images of two disks which both have a boot record (they are bootable). Yet, still if I put the disks in the USB floppy drive and I can browse files and read files from the disk. (I remember the old non-readable-only-bootable games, but this is not one of those).

I have tried creating the image as you suggested (using the parameters for blocksize and count on 'dd'). It still gave the same results. Could it be related to partition type of the floppy (I think they're FAT16).

If you have any other suggestions, please let me know! 😀

Thanks 😀

Reply 3 of 5, by Jorpho

User metadata
Rank l33t++
Rank
l33t++
SanSaurus wrote:

Could it be related to partition type of the floppy (I think they're FAT16).

Standard 1.44 MB floppies were all FAT12, and if they were not formatted in a standard fashion, they probably wouldn't be readable by standard software.

Are the image dumps you are creating of the correct size? Have you tried opening them in a hex editor to see if they at least appear to contain the data you expect?

Reply 4 of 5, by konc

User metadata
Rank l33t
Rank
l33t

This generally works as expected. I'd suggest using some other popular tool (maybe Winimage if you have a Windows PC/VM available) and see if this works. If it does you can focus your troubleshooting in how the image is created with dd, if it doesn't it's something else.

Reply 5 of 5, by SanSaurus

User metadata
Rank Newbie
Rank
Newbie

Hi konc & Jorpho

I ought to work. And it does. Now 😀
Stupid error from my side.

I had apparently created the images (dd command in Linux) as root user.
And later I started dosbox as one of my regular users. Trying to imgmount in dosbox to a file that you cannot access gives that error message "Can't create drive from file". Kinda makes sense!

Thanks for helping!