MacOS – Restore Macintosh HD to its original partition configuration

bootcampcore-storagedisk-utilitymacospartition

I seem to have badly botched a Boot Camp installation of Windows 8.1. I used Boot Camp Assistant to create a 200 GB BOOTCAMP partition on my 1 TB Fusion Drive. I then rebooted and failed to install Windows because I did not know at the time that having my external backup drive plugged in would cause the Windows installer to not work. From the Windows setup partition tool, I tried formatting the BOOTCAMP partition. That did not help, so I tried deleting it and creating a new partition in its place. That did not work either, which leads me to where I am now.

I have a ~800 GB Macintosh HD partition and a 200 GB Free Space partition I need to get rid of to be able to give Boot Camp another go. These are depicted below.

Macintosh HD partition I would like to extend
Free Space partition I need to eliminate

Notice in the above screenshots, there seems to be no way to change the sizes of those partitions.

When I try to use Boot Camp Assistant now, I get the following error message:

The startup disk cannot be partitioned or restored to a single partition.
The startup disk must be formatted as a single Mac OS Extended (Journaled) volume or already partitioned by Boot Camp Assistant for installing Windows.

Boot Camp Assistant failing because I don't have a single partition

Note: I have attempted (twice) to reboot and use the Disk Utility from the recovery menu, but I get the same results.

Best Answer

There is no need to delete the CoreStorage Logical Volume Group. Just resize it:

  1. Have a backup!

  2. Reboot into Internet Recovery Mode (hold Option-Command-R) as the machine is restarting). You'll eventually be presented with a Max OS X Utilities window.

    OS X Recovery Mode

  3. In the menu bar along the top of the screen, click Utilities -> Terminal.

    Utilities, Terminal

  4. At the prompt, enter diskutil cs list and you should get output similar to the following.

    CoreStorage logical volume groups (1 found)
    |
    +-- Logical Volume Group 9B4FB14F-DA7D-46EF-BBB9-FD99166C1E2F
        =========================================================
        Name:         Macintosh HD
        Status:       Online
        Size:         920186970112 B (920.2 GB)
        Free Space:   49152 B (49.2 KB)
    |
    +-< Physical Volume DE3C1DD4-3EA5-4484-AE40-C8BD60AD5F75
    |   ----------------------------------------------------
    |   Index:    0
    |   Disk:     disk0s2
    |   Status:   Online
    |   Size:     120988852224 B (121.0 GB)
    |
    +-< Physical Volume E1C56E99-3ED2-437F-AED0-A454FCC4E983
    |   ----------------------------------------------------
    |   Index:    1
    |   Disk:     disk1s2
    |   Status:   Online
    |   Size:     799198117888 B (799.2 GB)
    |
    +-> Logical Volume Family D824D426-8315-405A-A7CD-5B62E549FBAE
        ----------------------------------------------------------
        Encryption Status:       Unlocked
        Encryption Type:         None
        Conversion Status:       NoConversion
        Conversion Direction:    -none-
        Has Encrypted Extents:   No
        Fully Secure:            No
        Passphrase Required:     No
        |
        +-> Logical Volume AC1A071B-63D0-488F-AFFF-D296E446FE6B
            ---------------------------------------------------
            Disk:                  disk2
            Status:                Online
            Size (Total):          914000052224 B (914.0 GB)
            Conversion Progress:   -none-
            Revertible:            No
            LV Name:               Macintosh HD
            Volume Name:           Macintosh HD
            Content Hint:          Apple_HFS`
    
  5. Copy the Logical Volume (LV) alphanumeric UUID of your CoreStorage volume. The LVUUID should be the fourth (the fifth if you have a Fusion Drive) listed. In the above example the alphanumeric is:
    AC1A071B-63D0-488F-AFFF-D296E446FE6B

  6. Run the following command:

    diskutil cs resizeStack LVUUID partsize  
    

    According to the number found above it would be:

    diskutil cs resizeStack AC1A071B-63D0-488F-AFFF-D296E446FE6B 0g  
    

    This will expand your CoreStorage volume to full 1.24 TB

  7. Quit Terminal.app and start Disk Utility and verify the expanded volume.