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

Nov 13, 2015 7:47 PM in response to FishingAddict

Tim Snoots wrote:


You need to use the official "WINDOWS USB/DVD DOWNLOAD TOOL" from Microsoft to make your bootable USB. Instructions and the official download are available from: https://www.microsoft.com/en-us/download/windows-usb-dvd-download-tool

Yes but the instructions say

System requirements Windows XP SP2, Windows Vista, or Windows 7 (32-bit or 64-bit)

Please clarify how this works on Mac?

more info, scroll down to "Creating a Windows flash drive installer on an OS X computer"

https://kb.iu.edu/d/bciz

Nov 13, 2015 8:17 PM in response to leroydouglas

1. Why are you not using Bootcamp Assistant to install Windows 7?

2. The USB must be formatted as a MSDOS-FAT in Disk Utility, but a 2010 Mac cannot boot from a USB anyway, so this effort is not helpful.

3. Your Mac 2010 requires a physical DVD to install Windows 7. If you obtained an ISO from Microsoft, burn it to a DVD-R SL disk. Please ensure you use either 64-bit or 32-bit ISO. You cannot use a mixed-mode ISO.

4. Your screen shot OSX Extended Journaled. This cannot be used to install Windows. It must be a bootable DVD for your specific model.

5, Installation of Windows is very well documented in the following.

Install Windows 7 and earlier on your Mac using Boot Camp - Apple Support

How to install Windows using Boot Camp - Apple Support

https://help.apple.com/bootcamp/assistant/6.0/

Nov 15, 2015 8:02 AM in response to Loner T

Sorry for the late response, had to search and dust out some DVD disks to use them again.

1. Why are you not using Bootcamp Assistant to install Windows 7?

I thought that's exactly what I was trying to do, right?


2. The USB must be formatted as a MSDOS-FAT in Disk Utility, but a 2010 Mac cannot boot from a USB anyway, so this effort is not helpful.

(...)

4. Your screen shot OSX Extended Journaled. This cannot be used to install Windows. It must be a bootable DVD for your specific model.

That's exactly what I also described. I used the wrong format at first, then Boot Camp tells me to use a different format. But now I can't do anything with my Flash Drive whatsoever. I can't erase, format, rename or edit it, it always gives me the error message "Invalid name".

3. Your Mac 2010 requires a physical DVD to install Windows 7. If you obtained an ISO from Microsoft, burn it to a DVD-R SL disk. Please ensure you use either 64-bit or 32-bit ISO. You cannot use a mixed-mode ISO.

Other sites say to use disk utility to burn my iso file onto the disk. But in my version of disk utility (or in El Capitan generally, I guess), it doesn't show me the option to burn the selected image onto the dvd (see screenshot #2) (also not in the menubar above). Has this feature been removed? Or is there a different way, to do this now?


5, Installation of Windows is very well documented in the following.

Install Windows 7 and earlier on your Mac using Boot Camp - Apple Support

How to install Windows using Boot Camp - Apple Support

https://help.apple.com/bootcamp/assistant/6.0/

Is it possible that those tutorials were meant for newer models? Because they sometimes show options I don't have. Eg. from your first link, it says to choose "Create a Windows 8 or later install disk". I don't have that checkbox. The second link also jumps over that part without giving any clues.

User uploaded file

And the third link (from my understanding) only works, when I have my dvd ready. Which I'm trying to do, but failing.

Nov 15, 2015 8:04 AM in response to FishingAddict

Tim Snoots wrote:


You need to use the official "WINDOWS USB/DVD DOWNLOAD TOOL" from Microsoft to make your bootable USB. Instructions and the official download are available from: https://www.microsoft.com/en-us/download/windows-usb-dvd-download-tool

I probably have some spare Windows computer laying around. If I have trouble solving my problem with Loner T's suggestions, I'll give your option a shot. 😝

Nov 15, 2015 8:08 AM in response to leroydouglas

leroydouglas wrote:


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?


File names can be a problem. Why not simplify it the name of experimentation and try again.


OS X: Cross-platform filename best practices and conventions - Apple Support

Thanks! The only problem is, I can't do anything with my flash drive right now, no formatting, erasing or renaming. It wasn't even me who gave that flash drive its name, somehow it must have acquired it automatically after I "initialised" it with the Windows image. Maybe if I find some spare Windows computer around here, I can reset it again...

Nov 15, 2015 9:42 AM in response to Loner T

Haha, solved it!


-> Burn image on DVD (right-click iso file, "Burn to Disk"), rest as explained in the tutorials

-> Reformatted USB flash drive using a Windows Computer


Now I only have a problem with installing the support software. I tried going through all the formats in the Disk Utility (starting with MS-DOS fat and exFAT), but Boot Camp always tells me to get a single FAT partition. But at least I can use that thing again.


Thanks for your help!

Dec 11, 2015 6:39 PM in response to gabriel3374

I had same issue with a flash drive, nothing to do with bootcamp just wouldn't format and returned "Name invalid" when using Disk Utility no matter what options were chosen. The flash drive had a bootable linux kernel on it that was left over from some hardware testing.


Being too lazy to boot into Windows I went to command line and did this:


# diskutil eraseVolume HFS+ NAME disk2

Started erase on disk2 DIAG_BOOT

Unmounting disk

Erasing

Initialized /dev/rdisk2 as a 2 GB case-insensitive HFS Plus volume

Mounting disk

Finished erase on disk2 NAME


disk2 refers to the position in the device tree which you can see from Disk Utility by clicking on Info button. Of course be careful that you get it right. NAME is anything you want the new volume name to be.


After completing this I was able to manage the flash drive from Disk Utility again, reformat to FAT, etc.

Feb 18, 2016 5:06 PM in response to gabriel3374

I have the same problem as Gabriel ran the same command in Terminal and now my 1TB drive can't be reformatted with the same error message: "invalid name". I tried to mount the USB drive in a PC and the drive is not even mounted. So I can't use a PC to reformat. At this point, all I want to do is reformat my drive so that I can use it as a storage device again.

Feb 18, 2016 8:18 PM in response to Loner T

Hi Loner T,

MacBook-Pro-4:~ Leo_Lazo$ diskutil list

/dev/disk0 (internal, physical):

#: TYPE NAME SIZE IDENTIFIER

0: GUID_partition_scheme *500.3 GB disk0

1: EFI EFI 209.7 MB disk0s1

2: Apple_CoreStorage Macintosh HD 499.4 GB disk0s2

3: Apple_Boot Recovery HD 650.0 MB disk0s3

/dev/disk1 (internal, virtual):

#: TYPE NAME SIZE IDENTIFIER

0: Apple_HFS Macintosh HD +499.1 GB disk1

Logical Volume on disk0s2

0F3F6C21-5F26-4CFF-9D47-1965F7888F60

Unencrypted

/dev/disk2 (external, physical):

#: TYPE NAME SIZE IDENTIFIER

0: GRMCPRXVOL_EN_DVD *1.0 TB disk2

MacBook-Pro-4:~ Leo_Lazo$

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.