Wiping Sandisk (or any) Flash Drive 100%

GreatestOne

Limp Gawd
Joined
May 15, 2005
Messages
488
Ok I know they have this U3 removal tool for that model of Sandisk. I have this one with just the non-U3 backup software installed. There seems to be no removal tool for that and it is all read only, which someone told me even if I format it will have something in there. I need this drive to run Linux and would love it to be wiped 100% clean.

So is it possible without destroying the integrity of the drive, like how we write a hard drive to all 0's kinda thing... One that will work for all makes and models and sizes?
 
I stuck my u3 drive into a ubuntu system and used gparted to delete all the partitions. It got rid of everything.
 
I thought that if you deleted the files, whilst the drive was idle the garbage collection routines would erase the unused blocks. I could be wrong though.
 
I stuck my u3 drive into a ubuntu system and used gparted to delete all the partitions. It got rid of everything.

My system is on Debian and when I insert a drive I dunno what drive letter it is for me to write the commands in the terminal... I look in the included file manager and I cant find it... any suggestions?

The HP USB Storage Format Tool will clear partition info.

Does that wipe the drive or only deal with partitions.... I know in most cases partition removals clears data but not sure if that will do the job for sure on read only files?
 
My system is on Debian and when I insert a drive I dunno what drive letter it is for me to write the commands in the terminal... I look in the included file manager and I cant find it... any suggestions?

It should be documented somewhere, like the Debian user documentation or help files. It should be a device of some sort, for example FreeBSD has everything in the "/dev" folder. Hard drives are generally /dev/adaX, where X is an umber (ada0, ada1, etc). USB drives are /dev/daX. I don't know what Debian uses, but it should be something like this.

I am sure if you googled "Debian USB device names" or something like that you can find it.
 
My system is on Debian and when I insert a drive I dunno what drive letter it is for me to write the commands in the terminal... I look in the included file manager and I cant find it... any suggestions?

try lsblk and find the drive (probably /dev/sd*) corresponding to the size of the thumb drive. You can then use cgdisk/fdisk/etc. (whatever cli partitioning app you are familiar with). Note that just erasing the partition table isn't really a secure erase. If that's what you are after you should probably look into something like dban (be careful!), shred, secure erase, etc. I'm not sure what the best practice is when dealing with flash media. You could probably do something along the lines of dd if=/dev/random of=/dev/sd(whatever your drive is) to just write garbage to the whole partition.
 
try lsblk and find the drive (probably /dev/sd*) corresponding to the size of the thumb drive. You can then use cgdisk/fdisk/etc. (whatever cli partitioning app you are familiar with). Note that just erasing the partition table isn't really a secure erase. If that's what you are after you should probably look into something like dban (be careful!), shred, secure erase, etc. I'm not sure what the best practice is when dealing with flash media. You could probably do something along the lines of dd if=/dev/random of=/dev/sd(whatever your drive is) to just write garbage to the whole partition.

If the user is paranoid a few passes with urandom should be sufficient to disuade recovery attempts. Wear leveling algorithms on devices utilizing NAND flash require that the entire device be encrypted (FDE) for any semblance of data protection. In absence of FDE, the entire device must be wiped to prevent data retrieval.

# as root user, where /dev/sda is the targeted device (not just a partition on the device)
dd if=/dev/urandom of=/dev/sda bs=512

# reference point, usefull info
http://wiki.archlinux.org/index.php/Securely_wipe_disk
http://www.usenix.org/legacy/events/fast11/tech/full_papers/Wei.pdf
 
Last edited:
I had a flash drive that got corrupted while trying to make a bootable drive. No OS would read it after mounting. I finally used dd in Linux and wrote all zeros to the drive. Was able to reformat no problem afterwards.

I have never seen any evidence that anyone has ever recovered a full file from a drive that had just one pass of zero's applied.

http://www.hostjury.com/blog/view/195/the-great-zero-challenge-remains-unaccepted
 
Back
Top