A customer of mine gave me a mid 2011 imac 21.5 to wipe. Then I can do with it what I will. I decided to replace the 1 TB HDD with a 240 SSD. The problem was that I could not use disk utility to create the correct GUID partition map. So I looked at CLI solution. Diskutil allowed me to format the drive correctly. diskutil eraseDisk HFS+ DiskName /dev/DiskNodeID I did this command. But reinstall wanted another format. Follow this to launch internet recovery mode https://www.ifixit.com/Guide/How+to+use+Internet+Recovery+to+install+macOS+to+a+new+SSD/119499 I booted into this program and then used Disk Util to change the MAC OS Extended Journaled.