Installing Windows 10 using the Boot Camp Assistant app, but each time the app gets to the partitioning step it errors out saying “Your disk could not be partitioned”, suggesting “run Disk Utility to check and fix the error”.
You’ve tried running Disk Utility but the error still persists. Here is what fixed it for me, there are some other possible solutions at the end of the article.
If you are using Time Machine to backup your Mac, then clearing out all your local snapshots could fix this.
Make sure to do a Time Machine backup in case something bad happens here or with the Windows install.
1, In System Preferences, untick “Back Up Automatically” in the Time Machine preference
2, Run this command in the Terminal app;
tmutil thinlocalsnapshots / 9999999999999999
basically, it will remove all the local backups on your boot drive, it won’t delete any of your files on your Time Machine backup drive.
3, Once the command finishes, start the Boot Camp Assistant app and try again, it should work now.
4, When you have Windows installed remember to re-enable Time Machine on the Mac side.
Not sure if this is related or not, but my boot drive at the time was formatted as APFS and I was on High Sierra 13.1
A little bit about the tmutil command:
tmutil thinlocalsnapshots <mount_point> [purge_amount] [urgency]
The <mount_point> is which drive you’d like cleaned.
The [purgeamount] is the amount of space you want to recover. (optional)
The [urgency] part is a number between 1 – 4, on how quickly you want the space recovered. (optional)
Other possible solutions:
- The first obvious fix is to run First Aid in Disk Utility if you haven’t yet. (run it at boot)
- Run a filesystem consistency check (
/sbin/fsck -fy) during boot, see instructions here or here.
- If you’re low on disk space, freeing up some might help.
- If none of this helps, and you can’t find anything else to try online, then your only option left is to backup and reinstall;
- Backup everything via Time Machine
- Boot into Internet Recovery (hold down Command (⌘) + Option + R at boot)
- Erase your whole internal disk (not just the partition)
- Install a fresh copy of macOS and install any Mac updates
- Run Boot Camp Assistant and partition your drive + install Windows BEFORE restoring all your Mac data.
Feel free to leave comments if you get stuck, or find other solutions to this error.
Source: Apple discussions