You need an Ubuntu PC, the drive you want to test, an internet connection for one package install, and somewhere between 5 minutes and a few hours. A quick check takes minutes; a full fill-and-verify pass takes as long as it takes to write the whole card once and read it back.
I checked these steps against Ubuntu 26.04.1 LTS, which Canonical announced on 27 August 2026. The tool is F3 (“Fight Flash Fraud”), and the Ubuntu package for 26.04 was version 9.0-1build1 in the universe repository as of 21 November 2026. I haven’t tested on Ubuntu 26.10.
What you need before you start
- Ubuntu 26.04.1 LTS (other Debian-based distros use the same package name,
f3). - The SD card, microSD card (in an adapter) or USB stick, plugged in directly rather than through a flaky hub.
- A backup of anything already on the drive. F3’s own man page warns that all data on the tested disk might be lost.
- A terminal. Press Ctrl+Alt+T.
The principle is simple. A counterfeit card carries a controller that reports a capacity the flash chips don’t have, as Rossmann Group’s counterfeit guide puts it. Nothing printed on the outside proves capacity, so you have to write data and read it back.
The failure mode is nasty. Once you write past the real capacity, a fake card starts overwriting files that are already there, which is why people find videos corrupted weeks after buying. A test before you trust the card with anything is cheap insurance.
Step 1: install F3 and find the right device
- Open a terminal and run
sudo apt install f3. OMG! Ubuntu’s walkthrough uses the same tool, and the package is in Ubuntu’s own repositories, so there’s nothing to add manually. - Plug in the drive. Ubuntu normally mounts it automatically and it appears in the Files sidebar.
- Run
lsblk. Look for a device whose size roughly matches the label, for examplesdbwith a partition calledsdb1. SD cards in a built-in reader often show up asmmcblk0instead. - Confirm it in the Disks app. OMG! Ubuntu advises being absolutely sure you have the right device, and copying example paths from a tutorial is how people wipe their system drive.
- Note two things: the whole-device name (
/dev/sdb) and the mount path (usually/media/yourname/DRIVENAME, as TechTactician describes it). The two test methods below need different ones.
Everything from here on uses /dev/sdb and /media/yourname/DRIVENAME as placeholders. Replace both.
Step 2: run the quick check with f3probe
f3probe talks to the drive directly instead of going through the file system. Rossmann Group notes that this finds the true capacity in minutes rather than filling the card, and LinuxBabe recommends it for large drives for the same reason.
- Unmount the partition first:
sudo umount /dev/sdb1. The Medium F3 tutorial does this before probing. - Run
sudo f3probe /dev/sdb. Use the device, not the partition. - Wait. The tool’s own warning, quoted by LinuxBabe from an older F3 release, says probing usually takes from a few seconds to 15 minutes but can take longer. Linux und Ich clocked a little over seven minutes on a 4 GB USB 2.0 stick.
- Read the verdict. A genuine drive reports a usable size equal to the announced size; a fake one reports a smaller usable size and tells you the fake type.
Plain f3probe is the non-destructive mode, so existing contents should survive; PCWorld describes it that way. The faster variant, sudo f3probe --destructive --time-ops /dev/sdb, overwrites everything and also reports timings. Only use it on a drive you haven’t put anything valuable on.
Step 3: run the full check with f3write and f3read
The quick check can miss drives that are real but flaky. The slower route fills the whole drive with test files and verifies every one, and it’s modelled on Windows’ H2testw. F3’s usage documentation says f3write fills the file system with 1 GB files named N.h2w, and f3read then validates them. The last file may be smaller, since f3write takes all available space.
- Unplug and replug the drive so it mounts cleanly, then check the mount path in Files or with
lsblk. - Run
f3write /media/yourname/DRIVENAME. It prints the free space, then creates 1.h2w, 2.h2w and so on, each marked OK as it finishes. - When it stops, run
f3read /media/yourname/DRIVENAME. It prints a line per file with sectors that are ok, corrupted, changed or overwritten. - Read the summary. On a genuine card, TechTactician notes that only the “Data OK” figure has a value.
- Delete the test files afterwards, or reformat the drive in the Disks app. f3write removes old N.h2w files at the start of each run unless you pass
--keep, per the F3 project’s pull request, but leaving gigabytes of junk on a card you’ve just bought isn’t useful.
Timing depends almost entirely on write speed. In the F3 6.0 documentation example, 7.84 GB of free space was filled at an average of 4.64 MB/s.
Our calculation: 7.84 GB is 7,840 MB, and 7,840 MB ÷ 4.64 MB/s ≈ 1,690 seconds, or about 28 minutes for the write pass alone. That was a slow old card in a doc example, so a modern card will be quicker, but the arithmetic shows why a 256 GB test is an overnight job on a slow drive.
f3read doesn’t have to be run straight away. The documentation points out that the two tools are independent, so f3read can be repeated as often as you like after a single f3write pass. If you want both in one go, F3 ships a log-f3wr script that runs the pair and writes the output to a log file.
How to read the results
A pass means the probe reported matching sizes, or f3read showed every sector as OK with nothing corrupted, changed or overwritten. Linux und Ich says a fake or tampered device produces corrupted sectors in f3read.
A fake usually shows a pattern: the first chunk of files validates, then everything after a certain point fails. TechTactician says the point where errors begin tells you how much storage is really inside. A card sold as 128 GB that starts failing after file 30 is a roughly 30 GB card.
If you decide to keep a fake drive at its true size, F3 includes a tool called f3fix that creates a partition of the real capacity. OMG! Ubuntu notes that the exact command appears in f3probe’s output when a counterfeit is detected, so copy it from there rather than guessing the parameters. Run the test again on the smaller partition afterwards.
Whether to keep it at all is a separate decision. Rossmann Group says the flash inside is whatever the counterfeiter could source, so it’s the wrong place for anything you can’t afford to lose. If the seller is reputable, return it.
Common problems and fixes
| Symptom | Likely cause | Fix |
|---|---|---|
f3probe: command not found (or f3write, f3read) |
Package isn’t installed | Run sudo apt install f3; the package lives in Ubuntu’s universe repository. |
| f3write says the path doesn’t exist | Wrong mount path, or the drive isn’t mounted | Check lsblk for the MOUNTPOINT column, or open the drive in Files and copy the path. f3write and f3read take the mount point, not /dev/sdb. |
| f3probe can’t open the device | No root rights, or the partition is still mounted | Prefix with sudo and run sudo umount /dev/sdb1 first. |
| f3probe wants a device, you gave it a partition | Used /dev/sdb1 instead of /dev/sdb |
Use the whole device for f3probe. Use the mount path for f3write and f3read. |
| f3read reports corrupted or overwritten sectors | Fake capacity, or failing flash | Note which file the errors begin at. Return the drive, or use f3fix with the figures from f3probe. |
| Test takes far longer than expected | Slow card, USB 2.0 port or adapter | Try a USB 3 port or a different reader. Switch to f3probe for big drives. |
f3read warns about fdatasync() |
The OS returned an error while syncing the file | Check dmesg for kernel messages about the drive; F3’s source points users there. A cable, reader or failing card is a common cause. |
| Drive was fine, then fails after a second pass | Genuinely worn or unreliable flash | Treat it as faulty rather than fake. Don’t store originals on it. |
One more caveat on the GUI route: if you’d rather click than type, the F3 project page lists graphical front ends. F3-Gui is a Flatpak that includes f3write, f3read, f3probe and f3fix, and F3 QT covers the same four tools. I didn’t test either on 26.04.1.
What if you’re on Windows?
The equivalent is H2testw, which F3 was written to mirror. XDA Developers covers ValiDrive as a quicker first look on Windows, and TechTactician suggests following it with a full H2testw pass. F3 files are compatible with H2testw’s format if you swap drives between machines, though you’d need a helper script from the project (f3write.h2w) to make that work smoothly.
What this means for you
Test every flash drive you buy from a marketplace seller or a deal you can’t explain, before you copy anything irreplaceable onto it. Do it within the return window, not three months later when the footage has gone bad.
For small sticks and cards, run f3write and f3read once and leave it overnight if needed. For anything big, start with f3probe and only do the full pass if the quick check is clean but you still don’t trust the drive, for example because it’s destined for a camera or a Raspberry Pi that you can’t easily check later.
If the drive fails, take a screenshot or copy the terminal output, because that’s your evidence for a refund request.
Sources
- OMG! Ubuntu: Check if that bargain SD card or USB drive is fake on Ubuntu
- GitHub (AltraMayor/f3): usage.rst
- GitHub (AltraMayor/f3): f3read.1 man page
- GitHub: AltraMayor/f3, F3 – Fight Flash Fraud
- GitHub (AltraMayor/f3): Add f3write –keep and f3read –delete parameters, pull request 140
- Read the Docs: Usage, f3 6.0 documentation
- Ubuntu Discourse: Ubuntu 26.04.1 LTS released
- UbuntuUpdates: Package “f3” (resolute 26.04)
- Linux und Ich: Checking USB Sticks and SD Cards for Errors
- LinuxBabe: How to Check Real USB Capacity in Linux Terminal
- TechTactician: How To Check if a microSD or SSD Is Fake
- Rossmann Group: Counterfeit SD Cards
- PCWorld: How to detect a fake SSD or flash drive before you get burned
- Medium: How to Find if Your Thumb Drive/SD Card Is Fake With f3
- XDA Developers: ValiDrive is the best tool to quickly check if your USB storage is genuine or not
Header image: illustration, AI-generated.

