[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Deletion of files from usb-key



Haines Brown wrote:
 I didn't realize you ran these commands on a partition rather than
 the device, but in any case, after doing it and mouting, the files
 remain.

You always have to care where your filesystem resides. Usually (practically always) physical devices have a partition table on it to partition it into several, well, partitions. The whole device is accessible as e.g. sdd, and the partitions are then accessible as sdd1, sdd2, ...; you can still access sdd directly (which means you'll get a byte stream containing partitioning information (the "partition map") intermixed with the data of the individual partitions).

When I noticed that you were confused about this, and tried to work with the whole device as if it would contain a filesystem directly on it, I suggested that you wipe out the whole device by overwriting with zeroes, and then creating a new partition (since I imagine you could have overwritten parts of the partition map and hence just reformatting hdd1 would not bring you back to a clean state anymore). But that's when you told about the kernel error messages, which suggest something severe is broken with the stick (or maybe with your usb port or whatever).

It seems the stick is still delivering data for the partition; so maybe you could try reformatting the partition as, say, ext2 instead. (But maybe that won't work because of sector errors as before.)

        # dd if=/dev/zero of=/dev/sdd
        [nothing: hang]

That's doing the same as cat /dev/zero > /dev/sdd (except possibly for the size of the chunks that are being written at once). Probably you're getting those same kernel error messages in the kernel log as before (if not, then just be patient, since it will take some time to overwrite the whole stick). You could try overwriting /dev/sdd1 instead of /dev/sdd, but if you still get kernel errors, probably noone can help you.

I suggest you buy a new stick (from a different manufacturer), and use, or experiment with, that one. If the new stick works, you know that it's not a problem with your computer's usb port; when you've got enough experience with the new stick and know how everything should work, you could try again to rescue your old stick (e.g. by searching google for you stick's manufacturer and type, since maybe someone else has had issues with that type already, or you could try to find people that can explain what the error messages mean in detail), if it's worth your time.

Christian.



Reply to: