On Tuesday 18 February 2025 03:46:26 Greenwich Mean Time Philip Webb wrote:
> 250217 Michael wrote:
> > It is worth mentioning the sys-block/f3 package (Fight Flash Fraud),
> > which is in Portage and can test a USB flash disk to discover if it is
> > fake. Besides the slower f3write and f3read, the f3probe command
> > will only take a few minutes and confirm the available space.
> 
> Thanks ! -- 'f3write' + 'f3read' refused, as they expect a directory ;

The man page explains how to run these commands.  You need to provide the 
mountpoint directory for the device after you mount it, e.g.:

$ f3write /run/media/<username>/XXXX-XXXX

then,

$ f3read /run/media/<username>/XXXX-XXXX

You'd probably want to create one big partition for the whole device, or no 
partition at all, i.e. run something like this:

# mkfs.fat -F 32 -n New-USB1 /dev/sdb

The f3write/f3read commands will check the large files written by f3 can be 
accessed and read without any problem and flag up any sectors which contain 
corrupted data.


> 'f3probe' need it to be compiled with 'USE="extra"', but does work :
> 
> root:705 ~> f3probe /dev/sdb

The f3probe command needs to be run as root, after you unmount the device.  
>From your prompt I expect you did this, but it is also advisable to run it 
destructively - any data on the sticks will be overwritten:

f3probe --destructive --time-ops /dev/sdb


> F3 probe 8.0
> Copyright (C) 2010 Digirati Internet LTDA.
> This is free software; see the source for copying conditions.
> 
> WARNING: Probing normally takes from a few seconds to 15 minutes, but
>          it can take longer. Please be patient.
> 
> Probe finished, recovering blocks... Done
> 
> Good news: The device `/dev/sdb' is the real thing
> 
> Device geometry:
>                  *Usable* size: 231.05 GB (484540416 blocks)
>                 Announced size: 231.05 GB (484540416 blocks)
>                         Module: 256.00 GB (2^38 Bytes)
>         Approximate cache size: 0.00 Byte (0 blocks), need-reset=no
>            Physical block size: 512.00 Byte (2^9 Bytes)
> 
> Probe time: 5'29"
> root:706 ~> f3probe /dev/sdb
> F3 probe 8.0
> Copyright (C) 2010 Digirati Internet LTDA.
> This is free software; see the source for copying conditions.
> 
> WARNING: Probing normally takes from a few seconds to 15 minutes, but
>          it can take longer. Please be patient.
> 
> Probe finished, recovering blocks... Done
> 
> Good news: The device `/dev/sdb' is the real thing
> 
> Device geometry:
>                  *Usable* size: 231.05 GB (484540416 blocks)
>                 Announced size: 231.05 GB (484540416 blocks)
>                         Module: 256.00 GB (2^38 Bytes)
>         Approximate cache size: 0.00 Byte (0 blocks), need-reset=no
>            Physical block size: 512.00 Byte (2^9 Bytes)
> 
> Probe time: 18'47"
> 
> -- end of output --
> 
> That's both sticks : NB the 2nd took  3 times  as long.

This is good news, it confirms neither of them are counterfeit units.

However, the 2nd stick appears to be defective.  It takes almost 3.5 times as 
long than the first stick and from what we know for no good reason.  This 
indicates the second stick has bad flash cells, a bad flash controller, or 
both.

I don't know if checking for bad blocks when you format these drives may help 
at all.  You'd expect the flash controller to manage defective NAND cells 
transparently to the OS by abstracting the hardware to a logical layer.  
However, if the controller is not sophisticated as would be the case in a more 
expensive SSD drive and keeps trying repeatedly to write into bad cells, it 
might help to ask the filesystem to manage the bad blocks and see what you 
get.

Personally, I wouldn't bother and return the bad stick as defective, asking 
for it to be replaced.


> So both sticks are genuine, as I would expect from that store.

In my experience stores are box shifters.  Goods In - Goods Out.  They try to 
buy from importers/wholesalers with whom they have some relationship based on 
price-reliability-convenience and who they hope also apply similar criteria in 
their relationships up the supply chain.  Any link in this chain can go wrong 
and you end up with bad goods.  I don't expect them to perform QA/QC beyond 
looking at the shipping labels and customs declarations.  The manufacturers 
may perform some actual quality checks on a sampling basis after the 
prototypes have been put together and the brand reps may audit the odd 
production run.  I would think the rigour of such checks is proportional to 
the value of the assembled items.

Attachment: signature.asc
Description: This is a digitally signed message part.

Reply via email to