[ale] Fixing a vfat flash drive?

Michael H. Warfield mhw at WittsEnd.com
Wed May 9 09:10:11 EDT 2007


On Wed, 2007-05-09 at 08:29 -0400, Robert L. Harris wrote:
> 
>   I need to recover a flash drive.  All of a sudden it's complaining that
> the drive is unreadable and an "fsck.vfat" complains both tables are
> corrupt.  Anyone know a util that will rebuild or recover the fat tables?
> Windows is useless.  Aside from the normal reasons it just says the drive
> is 0 of 0 bytes free and the only option is to format or partition it.

	I had this happen a while back when huge chunks of a drive (including
both FAT tables) errored out because of the way it was mounted (mounted
sync).  Copying a huge file beat the crap out of the FAT tables until
they failed.  Fedora ended up removing the "sync" option from mounting
FAT/VFAT drives (it use to not work on FAT drives but that option had
then recently been added to FAT file systems).

	In some discussions with some guys on LKML, one person eventually came
up with a suggestion that worked.

	In Linux, dd /dev/zero over the entire drive.  Then run fdisk and
create a partition of type e and activate it.  Then run mkfs.vfat on the
new partion.

	The dd forces the wear leveling logic in the flash drive to replace any
bad sectors with its internal spares.  That then allows you to
repartition and reformat the key.

	If that fails...  It's dead Fred.

> Robert

	Mike

> :wq!
> ---------------------------------------------------------------------------
> Robert L. Harris                     | GPG Key ID: E344DA3B
>                                          @ x-hkp://pgp.mit.edu
> DISCLAIMER:
>       These are MY OPINIONS             With Dreams To Be A King,
>        ALONE.  I speak for              First One Should Be A Man
>        no-one else.                       - Manowar
> 
> _______________________________________________
> Ale mailing list
> Ale at ale.org
> http://www.ale.org/mailman/listinfo/ale
-- 
Michael H. Warfield (AI4NB) | (770) 985-6132 |  mhw at WittsEnd.com
   /\/\|=mhw=|\/\/          | (678) 463-0932 |  http://www.wittsend.com/mhw/
   NIC whois: MHW9          | An optimist believes we live in the best of all
 PGP Key: 0xDF1DD471        | possible worlds.  A pessimist is sure of it!

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 307 bytes
Desc: This is a digitally signed message part




More information about the Ale mailing list