I’ve been using F3 to check my flash drives, and this is how I discovered my drives were counterfeit. It seems to me this kind of feature needs to be built inside gnome-multi-writer itself to avoid sending fake flash out to customers. Last night I wrote a simple tool called gnome-multi-writer-probe which does the following few things:
* Reads the existing data from the drive in 32kb chunks every 32Mbish into RAM
* Writes random blocks of 32kb every 32MBish, and also stores in RAM
* Resets the drive
* Reads all the 32k blocks from slightly different addresses and sizes and compares them to the random data in RAM
* Writes all the saved data back to the drive.
I only takes a few seconds on most drives. It also tries to be paranoid, and saves the data back to the drive the best it can when it encounters an error. That said, please don’t use this tool on any drives that have important data on them; assume you’ll have to reformat them after using this tool. Also, it’s probably a really good idea to unmount any drives before you try this.
If you’ve got access to gnome-multi-writer from git (either from jhbuild, or from my repo) then please could you try this:
sudo gnome-multi-writer-probe /dev/sdX
Where sdX is the USB drive you want to test. I’d be interested of the output, and especially interested if you have any fake flash media you can test this with. Either leave a comment here, grab me on IRC or send me an email. Thanks.
6 thoughts on “Detecting fake flash”
I guess if gnome multiwritter fails on any drives could have an option to check them for errors (including fake drives). ?
Right, I’m going to integrate this into the UX/UI if I get a few reports from people that the probe functionality actually works :)
Error messages like..
Drives 1 to 8 failed: all 8 are 96MB drives that report their size as 1GB.
Drives 1 and 2 pass all tests.
Shouldn’t this feature be a part of gnome-disk-utility? There it could test the drive as a drive operation. Or we could have it as some part of the base system which can be used by multiple tools?
Yes, if it works I was going to push this down into udisks so it can be used by both tools.
For sure it will work, good tool!
Comments are closed.