Apple Event: May 7th at 7 am PT

Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

Cannot erase USB flash drive, "name invalid"

Now, I'll just give the short version of how my problem occurred, continued with a detailed "backstory".


  • Tried creating bootable USB flash drive with Windows 7.iso on it (kinda worked)
  • Boot Camp requires flash drive to be formatted "as single FAT partition"
  • Disk Utility -> Erase -> Error: "Invalid name. Operation failed..."
  • Terminal -> diskutil reformat /dev/disk2 -> Same Error


Hardware details

- MacBook Pro Mid 2010 with OS X El Capitan

- 32GB SanDisk 3.0 USB flash drive. I had previously installed Linux Mint on it, which worked perfectly.


What I've done to the USB flash drive

For university we could download different versions of Windows for free. So now with a .iso file in my downloads folder I tried creating a bootable USB flash drive using the instructions provided by Ubuntu, because for some reason I found nothing helpful for Windows and figured the commands in terminal wouldn't be much different.


  1. Convert .iso to .img: hdiutil convert -format UDRW -o /Users/me/Downloads/Windows_7.img /Users/me/Downloads/Windows\ 7\ Professional\ N\ with\ Service\ Pack\ 1\ \(x64\)\ -\ DVD\ \(German\)/windows_7.iso
  2. Unmount my disk: diskutil unmountDisk /dev/disk2
  3. Initialise (?) disk: sudo dd if=/Users/me/Downloads/Windows_7.img of=/dev/rdisk2 bs=1m
  4. Eject: diskutil eject /dev/disk2


I remember when doing this for Ubuntu, starting up the computer while holding the option key would already give me the option to boot from that flash drive. Sadly didn't work here (only showed my Macintosh as the only option on startup), so I tried using Boot Camp.


What Boot Camp told me

I start Boot Camp, skip "Introduction", on page two I select both the options "Download the latest Windows support software from Apple" and "Install Windows 7 or later version". On another tutorial website I looked up, it showed an extra option to "Create a Windows 7 or later install disk", an option I didn't have.


Note, if I do not select the "Download Windows support software" checkbox, I can't continue because the "Installer Disk cannot be found".


With both checkboxes checked, Continue, it says "Save Windows Support Software" and wants me to select a destination disk. I select my USB flash drive and Boot Camp tells me to reformat my USB flash drive.

User uploaded file

What Disk Utility told me

Basic procedure, I thought. Open up Disk Utility -> Select my Flash drive -> "Erase" -> New name, format, "Erase" -> Operation failed.

User uploaded file

User uploaded file

User uploaded file

Come to think of it, "GSP1RMCNPRXFRER_DE_DVD" is quiet a strange name, but that shouldn't be the reason not to reformat it, right? Giving it another name also wouldn't work. I can't rename the device itself on my desktop either. Using another format like "ExFAT" won't work, too. Using the command diskutil reformat /dev/disk2 in terminal gives me a "Name invalid" error, too.


If it's in anyway helpful, that's what the inside of my allegedly bootable flash drive looks like.

User uploaded file

Posted on Nov 13, 2015 4:32 PM

Reply
49 replies

Jun 20, 2016 3:20 PM in response to gabriel3374

Nick Riebe solved this one for me. He wrote:


How to fix:

  1. Open Terminal:
  2. type in diskutil list to determine what the disk number is
  3. then type in diskutil eraseVolume [HFS+][NAME] disk2
    1. Where [HFS+] is the erase type you want
    2. And NAME is the new name you want the disk to be called
    3. in my case, I did: diskutil eraseVolume HFS+ prince disk1

www dot nickriebe dot com slash 2016 slash 02 slash 23 slash cannot-erase-usb-flash-drive-name-invalid

Cannot erase USB flash drive, "name invalid"

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