Late 2016 Macbook Pro running Mojave 10.14.3, APFS-formatted (ugh).

I have run Disk Utility to verify my disk, and I've run fsck -fy from single-user mode several times. Both of these have reported absolutely no errors.

And yet, whenever I try to run Boot Camp Assistant to dual-boot with Windows 10, I get an error that says: "An error occurred while partitioning the disk."

Thinking I'd be clever, I also tried to create a partition manually through Disk Utility, but that didn't work either. I also reinstalled macOS in Recovery Mode.

I am starting to suspect that this is a problem with APFS. What other commands could I run to receive more information as to why Boot Camp Assistant won't let me create a partition to run Windows? Thanks in advance.


The problem is called overallocation. The following helped me to fix it on Mojave APFS:

Please note, there is a lot of posts out there telling you to do fsck. If you are on APFS you need to do fsck_apfs instead. This is what made the difference for me.

  1. Shut down your Mac.
  2. Start and hold Cmd-S to boot into single user mode.
  3. Run fsck_apfs -o
  4. It will ask you to confirm, type in y and press Enter.
  5. When finished (up to 3 minutes) type reboot and press Enter.

After trying everything I could find, this finally worked.

I also ran fsck_apfs -n -l before I ran fsck_apfs -o but I don't think that made any difference.

As I watched the results it produced this line: Overallocation detected on Main device And then it did: Fix overallocation

  • What does the -o option to fsck do? There is no mention of it in the man page. – nohillside May 21 at 17:54
  • I am so sorry @nohillside. I missed a crucial item, so thank you for alerting me to this. I just submitted an edit to my original post. On APFS drives you need to do fsck_apfs -o. -o is available for fsck_apfs, and it checks/fixes overallocation problems, which I believe is caused by Apple messing with purgeable space. After hours of trying everything out there, this finally worked on my MBP 2018 Mojave with APFS. – Almir Ramic May 22 at 18:23
  • Thanks, great edit! – nohillside May 22 at 21:17

The secret trick was running fsck -oy. 🤷🏻‍♂️

  • How did you come up with this answer? It would seem the -o option is undocumented. – David Anderson Mar 24 at 19:54
  • @DavidAnderson I just ran the command and noted that that option was in the output. – gjtorikian Mar 26 at 13:18

You must log in to answer this question.

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