How to remove a damaged file
pocallaghan at gmail.com
Wed Apr 23 16:56:03 UTC 2008
On Wed, 2008-04-23 at 12:37 -0400, Todd Denniston wrote:
> Anne Wilson wrote, On 04/23/2008 11:31 AM:
> > On Wednesday 23 April 2008 15:58, Todd Denniston wrote:
> >> Is it a SanDisk??? I ask because they have some weird junk on their sticks
> >> that you need to use MS to remove and it alternately looks like a partition
> >> or a second disk when you plug it in.
> >> DON'T delete the partitions until after removing the tool!
> > No, it's a DaneElec
> >> "Can I remove U3 technology from my USB drive?"
> >> http://www.sandisk.com/Retail/Default.aspx?CatID=1450#Q13
> >> or "U3 Launchpad Removal Tool"
> >> http://www.sandisk.com/Retail/Default.aspx?CatID=1415
> >> As for just reformatting the partition that is there I would suggest three
> >> things: 1) read `man mkdosfs`
> >> 2) consider just doing a raw RW badblocks run against the device...
> > How do you do that?
> man badblocks
> badblocks -v -w -s /dev/devicepartition
> though, with ext3 I would almost suggest go ahead and format (using the
> read-write badblocks test in the format, see below) and then look at the count
> 'dumpe2fs -b /dev/devicepartition'
> of course, look at the man page first.
> >> if it
> >> comes up with a lot, you may want to just "<plonk>" the thing in the
> >> circular file. (after hitting it with a hammer a few times. :)
> > It might come to that :-)
> >> 3) because you have IO problems and a big disk
> >> mkdosfs -c -F 32 -v /dev/devicepartition
> > For this one I'd rather have an ext3 partition, if I can't recover it.
> then I suggest more along the lines of:
> mke2fs -v -c -c -j -L AnneWilsonPendrive /dev/devicepartition
> '-c -c' -- Check the device for bad blocks before creating the file system.
> using a slower, read-write test instead of a fast read-only test.
If the pendrive really has bad blocks, I'd trash it. Bad blocks on a
disk are one thing (e.g. local magnetization defect) but on a memory
stick it means there's an electronics problem and it's going to bite
sometime down the line.
Flash memory is not infinitely rewriteable and will start to fail the
more you use it. Is this an old or much-used pendrive by any chance?
Of course we're assuming the I/O error in this case is actually caused
by a physical defect, which is by no means definite.
More information about the test