Really erase USB drive
I have borrowed (and am about to return) a 512mb Cigar Pro USB drive. I had deleted all the files. Now, how do I really clean the drive (e.g. leave no possibility of recovering files)?
It is formatted in vfat. I can use Linux or, if i must, Windows. |
Just write zeros to fill the drive. For example:
dd if=/dev/zero of=/dev/sda |
# dd if=/dev/zero of=/media:sda1
dd: writing to `/media:sda1': No space left on device 8047361+0 records in 8047360+0 records out 4120248320 bytes (4.1 GB) copied, 123.362 s, 33.4 MB/s Did this work? |
You wrote a lot of zeros (4.1GB), but to the wrong place (a file called "media:sda1" in your root directory).
Erase the file you created, and use: umount /dev/sda1 dd if=/dev/zero of=/dev/sda1 You can also use: umount /dev/sda1 dd if=/dev/zero of=/dev/sda The second case will wipe the boot sectors and partition table as well. |
I just tried it, it didn't work for me (the files are still there).
So I tried this: Quote:
Then I unplugged it, and plugged it back in again. It didn't auto mount. So I tried this: Code:
# fdisk /dev/sda So I tried this: Code:
# dd if=/dev/zero of=/dev/sda Better this time: Code:
# fdisk /dev/sda Time to fdisk it, and create a new filesystem on it. Thanks, that was fun. Edit macemoneta beat me to it! |
thanks to both of you for the help
|
All times are GMT -5. The time now is 11:22 PM. |