While trying to set up Boot Camp, I received an error shortly after the process finished. Checking Disk Utility on both the software and Terminal, I was left with the space I set for my Boot Camp partition as unusable. I tried to delete/unmount/format/erase that partition but after multiple failed attempts I ended up just losing access to that space entirely. This happened twice, going from 500GB of usuable space to 250GB to 112GB. Below are screenshots from Terminal and the Disk Utility.

Below is the output from the command gpt -r show /dev/disk0.

How do I salvage this situation?

  • I don't know much about APFS, but it looks like your APFS container is too small (disk2). What happens if you try dragging those handles to make it bigger? (Try only moving the end one first; if you move the start it'll have to rearrange everything, and that takes ages.) – SilverWolf Jan 10 at 4:26
  • Also, what's in that first 8GB APFS container? I only have one. – SilverWolf Jan 10 at 4:26
  • Currently my disk utility only has one draggable handle, which is the one joining the free space and 8GB APFS container. Dragging it just adds to the free space. Both APFS containers don't seem to actually contain anything. – Marblelemons Jan 10 at 5:04
  • Also, random thought; would upgrading to mojave possibly help at all? just a sliver of a chance in any way – Marblelemons Jan 10 at 5:06
  • Don't touch the second container! (Unless you have a good backup.) It contains your entire boot partition and all its data. The 8GB one does appear to be empty. – SilverWolf Jan 10 at 15:32

If you want find the free space, there is a third party utility that will show you were it went. This utility does not require installation or your password to use. You can find more information on this utility from the driveinfo website.

Assume your downloads go to the default download folder. You and find the free space by downloading and entering the command given below.

~/Downloads/driveinfo-1.0.3/driveinfo -r disk0

An alternative to driveinfo command would be the macOS command given below.

sudo gpt -r show /dev/disk0

To use the gpt command, you would need to disable System Integrity Protection (SIP).

If you can post the output from either of these commands, then help could be provided on how to recover the missing space.

  • Why would you have to turn off SIP to use gpt? I certainly didn't on my external drive, and this would just be reading it. – SilverWolf Jan 10 at 16:22
  • The drive(s) that are part of the currently booted macOS are covered. You were not booted from the external drive, therefore the drive was not covered by SIP. – David Anderson Jan 10 at 16:24
  • So it requires disabling SIP even to read information? That's surprising. – SilverWolf Jan 10 at 16:26
  • 1
    Yosemite and earlier did not have SIP. El Capitan could read under SIP. Sierra and later can not. You can not even open with read and write turned off. – David Anderson Jan 10 at 16:28
  • Here's the result of the 2nd command imgur.com/a/zRS9bm2 – Marblelemons Jan 11 at 7:01

You must log in to answer this question.

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