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

Feb 20, 2016 5:13 PM in response to Loner T

I unmounted the disk and mounted it again then I ran:

MacBook-Pro-4:~ Leo_Lazo$ sudo gdisk /dev/disk2

Password:

GPT fdisk (gdisk) version 1.0.1


Caution: invalid main GPT header, but valid backup; regenerating main header

from backup!


Caution! After loading partitions, the CRC doesn't check out!

Warning! Main partition table CRC mismatch! Loaded backup partition table

instead of main partition table!


Warning! One or more CRCs don't match. You should repair the disk!


Partition table scan:

MBR: not present

BSD: not present

APM: not present

GPT: damaged


Found invalid MBR and corrupt GPT. What do you want to do? (Using the

GPT MAY permit recovery of GPT data.)

1 - Use current GPT

2 - Create blank GPT


Your answer:

So which one do I use?

Feb 20, 2016 5:28 PM in response to Loner T

Command (? for help): p

Disk /dev/disk2: 1953525168 sectors, 931.5 GiB

Logical sector size: 512 bytes

Disk identifier (GUID): FD5B4614-D6C5-4634-AE82-6BB7B59B95D1

Partition table holds up to 128 entries

First usable sector is 34, last usable sector is 1953525134

Partitions will be aligned on 2048-sector boundaries

Total free space is 1953525101 sectors (931.5 GiB)


Number Start (sector) End (sector) Size Code Name


Command (? for help): w


Final checks complete. About to write GPT data. THIS WILL OVERWRITE EXISTING

PARTITIONS!!


Do you want to proceed? (Y/N): Y

OK; writing new GUID partition table (GPT) to /dev/disk2.

Warning: The kernel may continue to use old or deleted partitions.

You should reboot or remove the drive.

The operation has completed successfully.

MacBook-Pro-4:~ Leo_Lazo$

Feb 20, 2016 5:49 PM in response to Leonardo Lazo

Hi Loner,

After the commands, I did not see the disk mounted. I use the command to mount disk and it said successful but still didn't see. I then rebooted the MacBook Pro and still no disk. So I used Disk Utilities to erase disk again and not all is good.

Thanks so much for all your help. I do have one more question, which is what got me in the first place. Is there a way to actually install Bootcamp & any windows from an external drive and then run windows externally. I do not have a need to use Windows all the time. Honestly only for a few games I like to play every once in a while. That is why I don't want to repartition my internal HD for this.

Thanks again for your help.

Feb 20, 2016 6:02 PM in response to Leonardo Lazo

You said 'not all good', but I presume you meant 'now all good'. 😉


My recommendation is to create a minimal (40-60GB) Windows installation on the internal disk, and use an external disk as D: (or X: - take your pick) and install all your applications on the external disk. You do not run into licensing issues with Windows being on an external disk. D: could be a 1TB NTFS drive. As long as the external disk is connected with a USB3/TB/FW800 connection, it should perform reasonably well.

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.