Failed to make bootable USB drive and now I can't even format it

Solution 1:

It happened to me also you simply need to paste this commands in your Terminal, these commands ignores these errors and formats the Disks successfully no need to go to Disk Utility these commands will also create the bootable drive

Note: These commands are for macOS Sierra/High Sierra do the changes as per your needs! (This also works for any Previous version of macOS)

First you would need to download macOS Sierra Installer(Whichever OS you want),

Then you would have to make a bootable disk containing the Install macOS Sierra.app (Whichever OS you want)

I am also providing you a link to a YouTube video which will help you in creating the bootable USB stick link: https://www.youtube.com/watch?v=v4H5hKuI7yg&t=130s

I am also adding the command required to create the bootable disk:

sudo (path to the create install media file under installer.app>Contents>Resources) --volume {path to the USB stick (You are trying to make bootable)} —applicationpath (path to your Install macOS sierra.app)

e.g:

sudo /Applications/Install\ macOS\ Sierra.app/Contents/Resources/createinstallmedia --volume /Volumes/MyVolume --applicationpath /Applications/Install\ macOS\ Sierra.app

Please make the necessary changes as per your files and volumes

Solution 2:

Usually when I see this error it is because something on your Mac is accessing something on your USB drive. It can be as simple as having the USB open in a window, or Spotlight trying to index it. Try and select the USB drive in Disk Utility and Eject or Unmount it from there. It may say it can't be ejected and ask if you want to Force Eject it, say yes, and then you should hopefully be able to erase it.