1

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.

2

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

1

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
  • -o is only available for fsck_apfs since over provisioning is an APFS related issue to be addressed. so the correct and accepted answer should be fsck_apfs -oy. – der_michael Aug 4 at 21:59
1

I had the same problem , i did reinstall mac os (Mojave) but problem not resolved. Finally i solved using this.

  • Restart your mac and Pressed Command + S to boot into single user mode.

  • Type fsck_apfs -y /dev/disk0s2 and hit enter

  • If you can see some questions type y and hit enter

  • After all you can see like as appear OK

  • Type reboot and hit enter

    your problem is solved !

You must log in to answer this question.

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