Disk Utility cannot erase USB Drive

I'm trying to reformat a USB thumbdrive that I'd previously been using as a Linux boot device.


Unfortunately Disk Utility cannot erase the device.


When I insert the drive, I get a warning that it's not readable:

User uploaded file

So I click "Initialize..." which launches Disk Utility. In here, it shows up as "disk4s2" (the disk number can vary if I try a different MacOs device), which doesn't look right to me.


User uploaded file


When I try to erase the drive, I get the error "Couldn't modify partition map."


User uploaded file


There's no write-protect switch on the thumbdrive. How can I fix this?

iMac with Retina 5K display, macOS High Sierra (10.13), 4GHz Intel i7, 32GB RAM, 3TB Fusion

Posted on Oct 25, 2017 10:17 AM

Reply
Question marked as Top-ranking reply

Posted on Oct 25, 2017 1:24 PM

Found the answer - diskutil at the command line.


My USB drive shows up in "diskutil list" as:


/dev/disk4 (external, physical):

#: TYPE NAME SIZE IDENTIFIER

0: FDisk_partition_scheme *62.7 GB disk4

1: 0xEF 9.2 MB disk4s2


I think the problem is the partitioning scheme. To erase the device completely, I just ran:


diskutil eraseDisk free EMPTY /dev/disk4

diskutil list


/dev/disk4 (external, physical):

#: TYPE NAME SIZE IDENTIFIER

0: GUID_partition_scheme *62.7 GB disk4

1: EFI EFI 209.7 MB disk4s1


Much better... it now has a partitioning scheme MacOs can work with. At this stage, you won't see it showing in the Disk Utility program, but fortunately formatting it is trivial. I decided to use ExFAT, and name the drive USB64:


diskutil eraseDisk ExFAT USB64 /dev/disk4


/dev/disk4 (external, physical):

#: TYPE NAME SIZE IDENTIFIER

0: GUID_partition_scheme *62.7 GB disk4

1: EFI EFI 209.7 MB disk4s1

2: Microsoft Basic Data USB64 62.5 GB disk4s2


And now I have a fully working USB drive again!


TIP: if ExFAT isn't your thing... there are of course other filesystems available. To see them, run:


diskutil listFilesystems

4 replies
Question marked as Top-ranking reply

Oct 25, 2017 1:24 PM in response to m0thr4

Found the answer - diskutil at the command line.


My USB drive shows up in "diskutil list" as:


/dev/disk4 (external, physical):

#: TYPE NAME SIZE IDENTIFIER

0: FDisk_partition_scheme *62.7 GB disk4

1: 0xEF 9.2 MB disk4s2


I think the problem is the partitioning scheme. To erase the device completely, I just ran:


diskutil eraseDisk free EMPTY /dev/disk4

diskutil list


/dev/disk4 (external, physical):

#: TYPE NAME SIZE IDENTIFIER

0: GUID_partition_scheme *62.7 GB disk4

1: EFI EFI 209.7 MB disk4s1


Much better... it now has a partitioning scheme MacOs can work with. At this stage, you won't see it showing in the Disk Utility program, but fortunately formatting it is trivial. I decided to use ExFAT, and name the drive USB64:


diskutil eraseDisk ExFAT USB64 /dev/disk4


/dev/disk4 (external, physical):

#: TYPE NAME SIZE IDENTIFIER

0: GUID_partition_scheme *62.7 GB disk4

1: EFI EFI 209.7 MB disk4s1

2: Microsoft Basic Data USB64 62.5 GB disk4s2


And now I have a fully working USB drive again!


TIP: if ExFAT isn't your thing... there are of course other filesystems available. To see them, run:


diskutil listFilesystems

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

Disk Utility cannot erase USB Drive

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.