Tape dumping programs for Unix/Linux... 8-inch disks with bad blocks.

From: Sean 'Captain Napalm' Conner <spc_at_conman.org>
Date: Fri May 3 00:08:38 2002

It was thus said that the Great Raymond Moyers once stated:
>
> Ive done this before with bad PC floppies that
> could not be mounted in any way, ie trashed
> unreadble block 0, alien file system etc.
>
> I suppose you could hack fdformat ( the verify code etc )
> into a very respectable floppy recovery tool that would give
> you all the good sectors to a file with the nonreadble sectors
> filled with zeros..

  I remember using a disk utility for the Color Computer (forgot the name,
it's been nearly 10 years since I probably last used it) that would load the
sector into video memory (sectors on the Coco were 256 bytes in length, the
video screen was 512 bytes in length, so it would load the sector into the
lower half of video memory, leaving the top half for the menu/command
section).

  It was interesting loading up a bad sector---often times only a few bytes
would change between reads, but rarely did the drive fail so bad that
nothing at all could be read (I suppose the disks weren't as bad as they
could get).

  Based upon that, I might instead have the program detect a read that
failed, and instead of rereading the sector into the memory just used, grab
another sector's worth of memory, read into that; if there's an error, grab
yet another sectors worth of memory, read into that. Do that a preset
number of times (say, four times). Process it like:

        for (i = 0 , bad_spot = 0; i < SECTOR_SIZE ; i++)
        {
          if
          (
            (sector[0][i] == sector[1][i])
            && (sector[1][i] == sector[2][i])
            && (sector[2][i] == sector[3][i])
          )
          {
            good_sector[i] = sector[0][i];
          }
          else
          {
            record_bad_spot(head,track,sector,i);
            bad_spot++;
            good_sector[i] = 0;
          }
        }

        if (((double)bad_spot / (double)SECTOR_SIZE) > THRESHHOLD)
        {
          record_bad_sector(head,track,sector);
        }

  You might be able to even isolate the bad bits in the bad byte, or take a
vote and use the most reported value to store into the good sector or some
other analysis. At the very least, I would record as much of the bad sector
as I could and write out (in a separate file) the known bad spots from the
disk being read.
        
  -spc (Or am I way off base here?)
Received on Fri May 03 2002 - 00:08:38 BST

This archive was generated by hypermail 2.3.0 : Fri Oct 10 2014 - 23:35:20 BST