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?
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."