3

So I started up Disk Utility and erased my BOOTCAMP partition and set the format to OS X Extended (Journaled).

This is how my partitions look like now: enter image description here

As you can see, I have a BOOTCAMP partition (129 GB), my mac partition (362 GB) and I have 8 GB of unused space. How can I merge all of this with my mac partition? I heard that I should be able to click "-" when BOOTCAMP is selected and then expand my mac partition to use the unused space, but as you can see, I can not click the "-" button. My mac partition is "Journaled, Encrypted" by the way.

diskutil list output: enter image description here

diskutil cs list output: enter image description here

  • @klanomath I edited my question as you requested – Matt Dec 25 '15 at 19:12
3

You can't simply merge a Bootcamp partition or empty space and a FileVault volume with Disk Utility (Boot Camp Assistant should handle this though). You first have to remove the Bootcamp partition and then expand the FileVault volume.

To remove the Bootcamp partition and resize the CoreStorage Volume Group (containing the FileVault volume) the Mac has to be booted to Internet Recovery Mode. Recovery Mode is not sufficient because the Recovery HD has to be moved. The actual boot volume or partition can't be moved.

Preparation:

  • Detach any external drive (especially your external Time Machine backup drive)
  • Restart to Internet Recovery Mode by pressing alt cmd R at startup.
    The prerequisites are the latest firmware update installed, either ethernet or WLAN (WPA/WPA2) and a router with DHCP activated.
    On a 50 Mbps-line it takes about 4 min (presenting a small animated globe) to boot into a recovery netboot image which usually is loaded from an apple/akamai server.

    I recommend ethernet because it's more reliable. If you are restricted to WIFI and the boot process fails, just restart your Mac until you succeed booting.

    Alternatively you may start from a bootable installer thumb drive (preferably Yosemite or El Capitan) or a thumb drive containing a full system (preferably Yosemite or El Capitan).

Remove bootcamp partition and expand CoreStorage Volume Group

  • Booted to Internet Recovery Mode open Utilities → Terminal in the menubar and enter: diskutil list to get the disk identifiers and diskutil cs list to get a CoreStorage listing. Below I assume that your main disk has the disk identifier disk0 and the CoreStorage Logical Volume disk2.

  • First you have to remove the Bootcamp partition:

    gpt -r show /dev/disk0 #to get an overview
    

    To remove a partition with gpt the disk (and all related disks like the inherent CoreStorage volume) has to be unmounted

    diskutil unmountDisk /dev/disk2 #if your FileVault volume is unlocked and mounted (check this in the output of `diskutil cs list`)
    diskutil unmountDisk /dev/disk0
    gpt remove -i 4 /dev/disk0 #remove the Bootcamp partition
    
  • Then you have to resize the Logical Volume Group:

    diskutil mount /dev/disk0s2 #mount the physical volume of the CoreStorage Logical Volume Group
    diskutil mount /dev/disk2 #mount the Logical Volume of the CoreStorage Logical Volume Group
    diskutil cs unlockVolume LVUUID #if your FileVault volume is locked
    

    in your case:

    diskutil cs unlockVolume 27640FE7-1349-4C98-B101-CE17EF75673E
    

    and enter your passphrase if asked.

    Then resize the stack:

    diskutil cs resizeStack LVUUID size
    

    in your case:

    diskutil cs resizeStack 27640FE7-1349-4C98-B101-CE17EF75673E 500g
    
  • Enter exit and quit Terminal

  • Open Disk Utility and check the main volume for errors
  • Reboot to your main volume
  • Thanks for the very detailed answer. I'm just unsure how to see of filevault is unlocked/mounted from diskutil list. – Matt Dec 25 '15 at 20:13
  • I can't get it to boot to Internet Recovery Mode. I've been trying for over an hour now. I selected a wifi (don't have ethernet) but it seems like it's too slow (took over 40 minutes to fill the loading bar to around 90%) and then it got stuck. I tried to restart so that I could try with different wifi but it seems like it now always selects the first wifi as default. I can't change to a different wifi in Internet Recovery Mode. Do you think there's anything else I could try? Or what could I do to force it to change wifi? – Matt Dec 25 '15 at 21:43
  • Yes! It took me longer than I care to admit, but I did it. And I couldn't have done it without your great instructions. Thank you very, very much! I only have one more question. If I decided to boot camp again...what can I do in the future to avoid this problem? As far as I know, the boot camp assistant should be able to merge the partitions back for me. Why wasn't it able to do so this time? – Matt Dec 26 '15 at 0:00
  • 1
    @Whiz ;-) You have to delete/remove the Bootcamp partition with the Boot Camp Assistant. Boot Camp: Remove Windows from your Mac – klanomath Dec 26 '15 at 0:05

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .