Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

How to check the health status of a USB stick? How do I know that a USB is broken beyand repair, or repairable?

share|improve this question

migrated from serverfault.com Jan 9 '12 at 4:16

This question came from our site for system and network administrators.

Throw it away. Your invested time is more expensive than buying a new one. –  mailq Jan 8 '12 at 23:29
I have to agree with @mailq. You can buy a decent 4 GB thumb drive for $2.00 these days. –  iglvzx Jan 9 '12 at 6:24
@iglvzx Well the question does not tell, if it is a cheap one, or some +32Gb encrypting fast one... –  varesa Jul 26 '12 at 15:34

5 Answers 5

There is no way to query a USB memory stick for SMART-like parameters; I'm not aware of any memory sticks which support doing so even via publicly-available proprietary software. The best you can do is to check that you can successfully read+write to the entire device using badblocks.


You want to specify one of the write tests, which will wipe all data on the stick; make a backup first.

Find the device by looking at dmesg after plugging in the USB stick; you'll see a device name (most likely sd_, ie sdc, sdd, etc.) and manufacturer information. Make sure you're using the proper device!

If the stick is formatted with a valid filesystem, you may have to unmount it first.

Example syntax, for a USB stick enumerated as /dev/sdz, outputting progress information, with a data-destructive write test and error log written to usbstick.log:

sudo badblocks -w -s -o usbstick.log /dev/sdz

You'll need to repartition and reformat the stick afterwards, assuming it passes; this test will wipe everything on the stick. Any failures indicate a failure of the device's memory controller, or it has run out of spare blocks to remap failed blocks. In that case, no area of the device can be trusted.

share|improve this answer
badblocks is probably the best option. the comments that say "not worth it" completely miss several cases when this can be very needed (for example, a company might have purchased merchandise flashdrives, and would like to see how badly they got scammed...) –  Richlv Jul 25 '12 at 17:18
as pointed out in the wikipedia article linked, there's also e2fsck -c that uses badblocks and effectively hides those badblocks from the filesystem, thus avoiding corrupted writes. It should be noted however that, if the disk got new badblocks it's probably getting damaged and new ones may arrise later, meaning its life is shortening and you should consider replacing it. –  Igoru Aug 13 '14 at 4:19
I suggest adding the -v flag as well do see the error in the terminal windows. (if you let it run over night for example. The logfile is not that helpful for a quick view how bad it is. –  Tilo Dec 17 '14 at 15:49

It depends on the failure mode, I suppose. They're cheap for a reason.

As a USB device, watching the bus via device manager in Windows or the output of dmesg in Linux will tell you if the device is even recognized as being plugged in. If it isn't, then either the controller on board or the physical connections are broken.

If the device is recognized as being plugged in, but doesn't get identified as a disk controller (and I don't know how that could happen, but...) then the controller is shot.

If it's recognized as a disk drive, but you can't mount it, you might be able to repair it via fdisk and rewrite the partition table, then make another filesystem.

If you're looking for the equivalent of S.M.A.R.T., then you won't find it. Thumbdrive controllers are cheap. They're commodity storage, and not meant to have the normal failsafes and intelligence that modern drives have.

share|improve this answer

Via [ubuntu] Error Check USB Flash Drive, I eventually found this, which could be helpful:

I arrived at the blogs Fight Flash Fraud and SOSFakeFlash, which recomend the software H2testw (see here or here) to test flash memories. I downloaded H2testw and found two issues with it: (1) it is for Windows only, and (2) it is not open source. However, its author was kind enough to include a text file that explains what it does; this page is about my GPLv3 implementation of that algorithm.
My implementation is simple and reliable, and I don't know exactly how F3 compares to H2testw since I've never run H2testw. I call my implementation F3, what is short for Fight Flash Fraud, or Fight Fake Flash.

Addendum by @pbhj: F3 is in the Ubuntu repos. It has two part, f3write writes 1GB files to the device and f3read attempts to read them afterwards. This way capacity and ability to write and effectively read data are tested.

share|improve this answer
Is there any advantage to F3 over badblocks? –  Josh Jul 15 '14 at 13:41

USB drives are pretty rudimentary, there's not a lot that can go wrong on them! Generally, if it shows up as a drive and you can format it then it works. You could try having a look at the Portable version of CrystalDiskInfo as that's a quick lightweight analysing tool. Very few USB sticks report back S.M.A.R.T. info and the like though.

share|improve this answer
For reference, here's the Crystal Disk Info manual in English: crystalmark.info/software/CrystalDiskInfo/manual-en –  Matt Simmons Jan 8 '12 at 23:34

If it isn't working, it isn't fixable. It doesn't matter what OS you're using.

share|improve this answer
This does depend on your perception of "work" doesn't it. For example for some people it could just be that the partition table is corrupt. I wouldn't write it off without a LITTLE investigation! –  SimonJGreen Jan 8 '12 at 23:38
Server Fault is for Professional System Administrators only. If a Professional can't make it work then it's dead. –  Chris S Jan 9 '12 at 2:59
"I wouldn't write it off without a LITTLE investigation!" - I would. My time, both in terms of how much my employer pays for it at work and what they expect for that money, and how much I value my own time outside work, is worth more than the cost of a memory stick. If its cheap, throw it away, if its expensive then return it under warranty if possible. Life's too short for much else. –  RobM Jan 9 '12 at 8:45

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.