Click to See Complete Forum and Search --> : Recovering bad floppies


andycrofts
07-05-2003, 03:35 PM
Hi, Folks. Been one of them disk-days.
Anne brought home a floppy that wouldn't read on her machine. Knowing that floppy drives easily go out of alignment, we tried it on a couple of machines at home, using both WIN-ME and the linux Mtools suite. No joy. All the time either (DOS) error reading A: or with linux/Mdir "i/o error"
Then, I read the manual for 'dd' and found a nice switch - "noerror"

Nothing to lose, so tried the following...(File name is "KASIT")
mount /mnt/floppy
dd if=/mnt/floppy/KASIT of=/home/andy/KASIT conv=noerror

Loadsa disk thrashing, thousands of errors, then, after a minute or so... dunk.... dunk.... dunk....(etc) as you expect a floppy to sound when healthy.
Looked at the file (mercifully, <CR>-separated plain text) - ALL OK!!!

Wrote back to a new floppy, and data recovered...

-Worth a try, if you're in the same boat.

-Andy

mdwatts
07-05-2003, 06:11 PM
Thanks. Perhaps I'll try that with my Partition Magic 7 bootdisks since the first one now has errors for some reason.

bwkaz
07-05-2003, 06:43 PM
In the future, if the disk won't even mount because of the errors, it might help to dd if=/dev/floppy of=~/image conv=sync,noerror to grab the entire disk image. Then, load ~/image up into a hex editor and search around for the file you need (assuming the file was plain-text).

The "sync" bit makes dd move the output file pointer if it hits an error, just like it normally would if it didn't. In other words, if it finds an error in sector 3, but you wanted sectors 1 through 8, then 1 and 2 would be written to the output file, 3 would be skipped, and 4 through 8 woiuld be written. There'd be one sector worth of gap (binary 0's) in the output where sector 3 was.

Without "sync", the same setup would produce a 7-sector-long output file that's missing sector number 3 entirely.

mdwatts
07-05-2003, 06:53 PM
Originally posted by bwkaz
In the future, if the disk won't even mount because of the errors, it might help to dd if=/dev/floppy of=~/image conv=sync,noerror to grab the entire disk image. Then, load ~/image up into a hex editor and search around for the file you need (assuming the file was plain-text).

The "sync" bit makes dd move the output file pointer if it hits an error, just like it normally would if it didn't. In other words, if it finds an error in sector 3, but you wanted sectors 1 through 8, then 1 and 2 would be written to the output file, 3 would be skipped, and 4 through 8 woiuld be written. There'd be one sector worth of gap (binary 0's) in the output where sector 3 was.

Without "sync", the same setup would produce a 7-sector-long output file that's missing sector number 3 entirely.

Nevermind... Forget it. I'll just make another set. :p

Good info. Thanks