I cannot reinstall OS X Yosemite now, as there's no hard drive I could see.
I had erased the HD with the idea that it will create a new partition but it didn't, so now I can't see a hard disk on disk utility. I have tried with diskutil command, but didn't succeed.
Best Answer
Basically you have a CoreStorage Logical Volume Group without a CoreStorage Logical Volume now. You may delete your Logical Volume Group (-> step 4) or restore a Logical Volume (-> step 7).
Requirements: Booted to Recovery Mode
Enter
diskutil cs list
and hit enter. The output will look like this:To delete the Logical Volume Group enter:
The lvgUUID is the UUID of the Logical Volume Group and usually the first listed.
In the above example:
This will delete your CoreStorage LVG and reformat it as an unencrypted HFS+ volume.
exit
, hit enter and quit TerminalAfter step 3 you may create alternatively a new CoreStorage Logical Volume in your orphaned LVG by entering:
Using the above example
would create a new full sized (≈ 249.5 GB) Journaled HFS+ volume with the name 'MyMac'