How do you fix missing partition on OS X El Cap? After trying to install Windows 10 via Boot Camp, my Mac automatically rebooted (supposedly to the newly created Windows partition). However, it just booted back my OS X 10.11.2.

When I went to Boot Camp Assistant, it's as if the installation never happened. The partition was taken, but OS X can't read the missing partition:


Here's the output of sudo gpt -r show /dev/disk0:

      start       size  index  contents
          0          1         PMBR
          1          1         Pri GPT header
          2         32         Pri GPT table
         34          6         
         40     409600      1  GPT part - C12A7328-F81F-11D2-BA4B-00A0C93EC93B
     409640  488555536      2  GPT part - 53746F72-6167-11AA-AA11-00306543ECAC
  488965176    1269536      3  GPT part - 426F6F74-0000-11AA-AA11-00306543ECAC
  490234712          7         
  490234719         32         Sec GPT table
  490234751          1         Sec GPT header


How do I recover this missing partition/disk space?
The GUID partition table looks good. Nothing is really missing. The partition with the index number 2 is a CoreStorage Logical Volume Group. The partition with the index number 3 is your Recovery HD. The Boot Camp Assistant probably failed to resize the LVG (~ 250 GB) but succeeded resizing the Logical Volume (Macintosh HD ~ 192 GB). As a result about 58 GB in the CoreStorage LVG are not allocated to Logical Volumes.

To expand Macintosh HD boot to your Recovery HD (hold cmdR while booting). Open Disk Utility and verify the integrity of the superior CoreStorage LVG and the inferior LV (Macintosh HD). Then open Terminal in the menubar Utilities -> Terminal


Enter diskutil cs list.
Enter diskutil cs resizeVolume lvUUID size. lvUUID is the UUID of the Logical Volume; usually it's the last listed in the output of diskutil cs list. Use 250g as size. If you get an error (not enough space...) use a slightly smaller size like 249500m.
Enter exit, quit Terminal and reboot to your main volume.