How to merge primary APFS partition with other empty APFS partition

apfsbootcampdisk-utilityhard drivepartition

Using the latest Macbook Pro with currently High Sierra 10.13.1, I was using bootcamp for a year, and I decided to get rid of the Bootcamp partition this morning. The Bootcamp utility would not let me erase this partition, so I decided to do it through Disk Utility.

I did everything I could to "erase" it, but I can't find any way to merge this 58GB partition with my primary Macintosh HD one.

storage

In Disk Utility, if I want to erase the container Disk2, it tells me that an internal error occured… The BOOTCAMP partition is actually formatted as APFS…

disk utility

$ diskutil list

enter image description here

How can I merge those two partitions ?

EDIT : The BOOTCAMP partition is now gone but I can't extend the primary one …

enter image description here

Best Answer

These are two answers I got directly from Apple after emailing Tim Cook yesterday

We are clearly lacking some documentation (and probably a feature in Disk Utility). However, you can achieve the removal using Boot Camp assistant.

Launch Boot Camp Assistant Click the Continue button You should now see a “Restore Disk to a Single Partition” screen. Click Restore, enter password

Your system will now remove the windows partition.

Sorry our experience didn’t meet your expectations. I’ll work with my engineering teams and AppleCare to get this addressed.

You tube link

https://www.youtube.com/watch?v=jy7McSE_NfI https://www.macworld.com/article/1156195/mac-apps/delete-boot-camp.html

Alternatively

Getting rid of Boot Camp is super simple, you use boot camp assistant to remove what it may have created. There’s a handy YouTube video which explains this process here:

https://www.youtube.com/watch?v=jy7McSE_NfI

I’m interested in why the install failed, so before you do this if you can help us by collecting some information, great. If you don’t have time for, that’s cool too.

Using the Boot Camp Assistant to to remove the BootCamp partition:

  1. Start the Boot Camp Assistant from the Utilities folder.
  2. At the Boot Camp Assistant Welcome Screen click Next.
  3. If the Boot Camp Assistant cannot remove the partition it will error here. If it can then you will get another dialog asking you to restore the drive (i.e. remove the Boot Camp partition).

How to create Sysdiagnose logs:

  1. Launch Terminal from the Utilities folder in Applications.
  2. Type: “sudo sysdiagnose” and hit the “return” button
  3. Type in your password (for sudo)
  4. It will prompt you to press ‘Enter’ to continue. Press the return button to continue.

Once the logs have been gathered they will be compressed into a .gz file and created in the /tmp location. A finder window will pop up also once the file is created with the correct location. We need that file as well.

Sometimes the Boot Camp Assistant fails on the first install, we are looking into this issue, if you see a failure we’ve seen reports that attempting a second install will be successful.

I have removed the Apple employee names, in line with GDPR. I hope this helps people

Spencer