MacOS – Problem after erasing the HD of a brand new Mac (OS X Yosemite) with Disk Utility

core-storagedisk-utilityinstallmacos

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.

Disk Utility First Aid

Disk Utility Partition

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

  1. Please quit Disk Utility.
  2. Open Utilities/Terminal in the menubar
  3. Enter diskutil cs list and hit enter. The output will look like this:

    CoreStorage logical volume groups (1 found)
    |
    +-- Logical Volume Group 5B8350BF-20EF-4199-82E6-129EFF19E9EB
        =========================================================
        Name:         Macintosh HD
        Status:       Online
        Size:         250640592384 B (250.2 GB)
        Free Space:   6111232 B (6.1 MB)
        |
        +-< Physical Volume 907FCDE2-0C62-4951-A39E-36F19244FDB7
        |   ----------------------------------------------------
        |   Index:    0
        |   Disk:     disk0s2
        |   Status:   Online
        |   Size:     250634481152 B (250.2 GB)
    
  4. To delete the Logical Volume Group enter:

    diskutil cs delete lvgUUID 
    

    The lvgUUID is the UUID of the Logical Volume Group and usually the first listed.
    In the above example:

    diskutil cs delete 5B8350BF-20EF-4199-82E6-129EFF19E9EB
    

    This will delete your CoreStorage LVG and reformat it as an unencrypted HFS+ volume.

  5. Enter exit, hit enter and quit Terminal
  6. Open Disk Utility to format your disk like you want.
  7. After step 3 you may create alternatively a new CoreStorage Logical Volume in your orphaned LVG by entering:

    diskutil cs createVolume lvgUUID jhfs+ NewVolName Size
    

    Using the above example

    diskutil cs createVolume 5B8350BF-20EF-4199-82E6-129EFF19E9EB jhfs+ MyMac 100%
    

    would create a new full sized (≈ 249.5 GB) Journaled HFS+ volume with the name 'MyMac'