I want to do a fresh install of Yosemite and I got a brand new 8GB flash drive and I followed this tutorial. I formatted the USB drive and was copying the Yosemite installer, however I got the following error

Copying installer files to disk...
The copy of the installer app failed.

Great. So I tried to reformat the drive again and start over. No. Disk utility says I can't format it because it "cannot unmount the drive". What does that suppose to mean? Then I plug the USB drive to a Windows computer and tried my luck there. No, you can't format the drive because it's "write protected" (there's no physical write protection switch on the drive or anything). Oh dear so now the drive is completely ruined? How can I force format the drive?

enter image description here

Now in the terminal I used sudo diskutil unmountDisk force disk1 to successfully unmount the drive, but still I can't format it! Disk utility gave me a new error "Unable to write to the last block of the device."

  • 1
    Try the steps mentioned in this page: bulenkov.com/2013/09/01/…
    – IconDaemon
    Commented Dec 5, 2014 at 18:49
  • I was halfway through an answer based on that link - if it's successful let's port it here for future ref.
    – Tetsujin
    Commented Dec 5, 2014 at 18:51
  • @IconDaemon, Thank you, but I got the error Error: -69760: Unable to write to the last block of the device.
    – LWZ
    Commented Dec 5, 2014 at 23:32
  • 1
    8GB flash drives are inexpensive. Chuck this one, purchase another, and try again. Its not outside the bounds of possibility the flash drive chose to self-destruct at the same time you tried the installation, and the two events are not really connected. Now if the second drive crashes when you build the install, then that's something else entirely. You might want to consider getting a different brand of flash drive, too, for the next iteration. I've made at least six bootable Yosemite flash drives, on a mix of Kingston and SanDisk devices. Please report back with your findings. Good luck!
    – IconDaemon
    Commented Dec 6, 2014 at 0:57
  • Some flash drives have a failure mode in which they are irreversibly write-locked by the internal controller when it detects a write error.
    – Tetsujin
    Commented Dec 6, 2014 at 7:59

2 Answers 2


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)


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


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.

  • Updated question. I was able to force unmount it in terminal, but format still fails.
    – LWZ
    Commented Dec 5, 2014 at 20:00
  • problem is, the createinstallmedia utility requires the path to the volume which means it must be mounted
    – user102008
    Commented Jul 1, 2015 at 23:23

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .