Cannot erase USB flash drive, "name invalid"
The problem:
- Created a bootable USB flash drive for Windows 10 for my HTPC, but after adding the files I just couldn’t get it to work (ended up burning to a CD and using an external CD drive instead).
- Later, tried adding new personal files to said USB but couldn’t. So I tried to erase.
- Got an error when attempting to erase. Here’s what happened…
- Goto Disk Utility -> Erase
- Received Error: “Invalid name. Operation failed…”
This is how to fix it:
- Open Terminal
- Type in
diskutil list
to determine what the disk number is - Then type in
diskutil eraseVolume [HFS+] [NAME] [DISK#]
- Where
[HFS+]
is the erase type you want (I just left it as HFS+) - And
[NAME]
is the new name you want the disk to be called - And
[DISK#]
is the disk number returned in Step 2
- Where
- In my case, I did (see below):
diskutil eraseVolume HFS+ prince disk1
- Problem solved!