You are not logged in.

#1 2021-06-01 23:59:22

Yegor-Beloglazov
Member
Registered: 2021-06-01
Posts: 6

[solved] Issues with floppy disks

I want to use the 'dd' command to write .img files to physical floppy disks. However when I attempt this, it begins writing and then inside my console I get

[ 5262.443900] blk_update_request: I/O error, dev fd0, sector 203 op 0x0: (READ) flags 0x0 phys_seg 1 prio class 0

dd: error writing '/dev/fd0' : Input/output error

I tried with another disk and it errors with sector 16 instead

I have the 'floppy' kernel module loaded, and when formatted I can mount and write documents to my floppys, its just when I try to use dd to write to them I get this error.
here is the command I'm using:

sudo dd if=disk1.img of=/dev/fd0 bs=1024 conv=sync status=progress ; sync

courtesy of the Debian wiki

So what is the issue? Are they bad sectors?  Am I using 'dd' wrong?

this is not a USB floppy drive. this is a real floppy drive connected with a ribbon cable to my motherboard's FDC header. i have ensured that it is connected properly and properly configured in my BIOS as 3.5in 1.44mb



SOLUTION: in dd, put oflag=direct to use direct I/O and bypass the async I/O that was causing issues like so:

sudo dd if=disk1.img of=/dev/fd0 bs=512 oflag=direct status=progress

Last edited by Yegor-Beloglazov (2021-06-02 15:19:47)

Offline

#2 2021-06-02 06:38:32

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 77,476

Re: [solved] Issues with floppy disks

Make sure the ribbon isn't flipped (though you couldn't access the drive at all, it would constantly click even w/o a disk inside) and prepare for "hardware error" - how old are those floppies (and the drive)?

Online

#3 2021-06-02 10:57:59

Yegor-Beloglazov
Member
Registered: 2021-06-01
Posts: 6

Re: [solved] Issues with floppy disks

My floppies vary in age from 1996-2002. As for the drive itself I pulled it out of a computer manufactured in 1998, there's no printed date on it.

Offline

#4 2021-06-02 13:50:08

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 77,476

Re: [solved] Issues with floppy disks

You can try to rule out a kernel problem using an old-ish live distro (ideally from a time when floppies were used ;-)
But if the stuff has just been lying around since decades, it's probably degraded. I mean, we shredded floppies within a year in Comodore times…
If you've many disks and are lucky some might still work.

Online

#5 2021-06-02 14:18:22

Lone_Wolf
Administrator
From: Netherlands, Europe
Registered: 2005-10-04
Posts: 15,340

Re: [solved] Issues with floppy disks

Try formatting a few to verify if the drive and media are ok.
About 5 years ago I went through 400 floppies 10+ years old and found less then 10% were still usable.


Disliking systemd intensely, but not satisfied with alternatives so focusing on taming systemd.

clean chroot building not flexible enough ?
Try clean chroot manager by graysky

Offline

#6 2021-06-02 15:20:51

Yegor-Beloglazov
Member
Registered: 2021-06-01
Posts: 6

Re: [solved] Issues with floppy disks

I managed to fix it. I had to use oflag=direct in dd. editing post and appending [solved] prefix to title

Thank you for your help though.

Last edited by Yegor-Beloglazov (2021-06-02 15:23:29)

Offline

#7 2021-06-02 16:38:51

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 77,476

Re: [solved] Issues with floppy disks

I would keep an eye on that - the page cache could perhaps starve the drive, but the source is probably magnitudes faster and the entire imageshould fit into the cache as well.
Does the altered blocksize matter (as well)?

Online

Board footer

Powered by FluxBB