I have a crashed laptop and used the following method to make a bootable usb drive (32 GB).

hdiutil convert -format UDRW -o ~/path/to/target.img ~/path/to/ubuntu.iso

diskutil unmountDisk /dev/diskN

sudo dd if=/path/to/downloaded.img of=/dev/rdiskN bs=1m

It did work and made a read only usb that acted as if it were a CD. I would like to now undo that (in OSx) but disk utility doesn't seem to be able to. When I click "Erase" it simply fails with

"Erase process has failed" 

And details reveal

Name invalid.
Operation failed...

Is there a way I can force format this USB drive (to either FAT 32 or OSX Extended) in OSx El Capitan?

  • 1
    What file system are you trying to format it to? Not UDRW again?
    – Jonno
    Dec 30 '15 at 14:36
  • I'm not too fussed tbh. I just want it to be a blank FAT32 or OS x Extended (Journalled).
    – user714852
    Dec 30 '15 at 15:26


sudo diskutil unmountdisk force disk2

sudo dd if=/dev/zero of=/dev/disk2 bs=1024 count=1024
  • +1 it resolved my problem of a read-only usb drive. Mar 12 '16 at 15:58
  • 11
    I got this - dd: /dev/disk2: Permission denied May 26 '17 at 10:34
  • Among all answers this was the only one that really worked for me. Thanks. Jan 27 '19 at 21:13

My experience: playing around with SD Cards for my Raspberry Pi 3 somehow one of them got read only on a Mac. I realized that the card was formatted MBR and OS X doesn't read/write MBR but GPT. Solution:

I used Gparted (Linux)

  1. Device>Create Partition Table> Select new partition table type>GPT
  2. Partition>New>File system>fat32
  3. Partition>Format to>fat32


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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