FOLLOW ME Twitter Facebook Вконтакте LinkedIn RSS Feed

How to restore unreadable USB flash drive under Mac OS X

Category: Tips and Tricks
Sep 1, 2013
Konstantin Bulenkov

USB Flash Drive recovery Today I found that I can’t access to my 8Gb USB flash drive. I can find it in Finder, but the System gets stuck while accessing to it. What to do? If you want to recover data from a USB flash it’s better to stop reading this post now and continue googling “USB flash data recovery” or something. Here’s a step-by-step instruction how to make your USB flash drive work again under Mac OS X.

1. Open Terminal and go to /dev

$ cd /dev

2. Now it’s time to find your flash drive in /dev. Typically it’s /dev/diskN where N could be 0, 1, 2, 3, etc

$ diskutil list
/dev/disk0
   #:                       TYPE NAME                    SIZE       IDENTIFIER
   0:      GUID_partition_scheme                        *121.3 GB   disk0
   1:                        EFI                         209.7 MB   disk0s1
   2:                  Apple_HFS Macintosh HD            120.5 GB   disk0s2
   3:                 Apple_Boot Recovery HD             650.0 MB   disk0s3
/dev/disk3
   #:                       TYPE NAME                    SIZE       IDENTIFIER
   0:      GUID_partition_scheme                        *8.1 GB     disk3
   1:                        EFI                         209.7 MB   disk3s1
   2:       Microsoft Basic Data KB                      7.9 GB     disk3s2

OK! It’s disk number 3, i.e. /dev/disk3 Remember the name of partition (it’s KB in my case). Your flash drive is mounted as /Volumes/NAME

3. Let’s erase and reformat the disk. In 90% you will get a message that the system can’t unmount your drive.

$ diskutil eraseDisk MS-DOS KB /dev/disk3
Started erase on disk3
Unmounting disk
Error: -69888: Couldn't unmount disk

Use the partition name from step 2.

$ diskutil unmountDisk force /Volumes/KB
Forced unmount of all volumes on disk3 was successful
$ diskutil eraseDisk MS-DOS KB /dev/disk3
Started erase on disk3
Unmounting disk
Creating the partition map
Waiting for the disks to reappear
Formatting disk3s2 as MS-DOS (FAT) with name KB
512 bytes per physical sector
/dev/rdisk3s2: 15377032 sectors in 1922129 FAT32 clusters (4096 bytes/cluster)
bps=512 spc=8 res=32 nft=2 mid=0xf8 spt=32 hds=255 hid=411648 drv=0x80 bsec=15407104 bspf=15017 rdcl=2 infs=1 bkbs=6
Mounting disk
Finished erase on disk3

That’s all. Now you have a USB flash drive again.

10 Comments

  • is there a tip for if your partition name has a space in the name? It seems to cause me problems….

    • Griff, quote it like this “name with space”

  • Something similar has happened to a Kingston DataTraveler 120, 4GB disk here. But what about the data?
    I use diskutil mountDisk command, and terminal says “volumes mounted successfully”, but I can’t browse or find it anywhere.
    Any idea?

  • I tried this however I am getting the following.

    $ diskutil eraseDisk MS-DOS KB /dev/disk4
    Started erase on disk4
    Unmounting disk
    Error: -69877: Couldn’t open device

    and then

    Unmount failed for /Volumes/KB

  • /dev/disk0
    #: TYPE NAME SIZE IDENTIFIER
    0: GUID_partition_scheme *250.1 GB disk0
    1: EFI EFI 209.7 MB disk0s1
    2: Apple_HFS Untitled 249.2 GB disk0s2
    3: Apple_Boot Recovery HD 650.0 MB disk0s3
    /dev/disk3
    #: TYPE NAME SIZE IDENTIFIER
    0: *0 B disk3

    the drive doesn’t have any name, how do you go about this

  • To follow these instructions to revive a dead USB thumb drive you must have
    a Masters Degree in MacGeek Studies.

    worthless for 99.9% of people.

    • Absolutely agree with you Phil. For 99.9% of people I’d recommend to buy a new flash drive

      • Failing USB thumb drives are a function of Cheap Chinese Crap where quality control of what they make
        is as unknown as representative government…..cars made in the US….or eating with forks and knives. The real problem is that you lose your data forever.

        • I agree. But this post is not about how to restore your data, but how to make the flash-drive work again. Data restoring is a much more complicated process.

Leave a comment