2

I'm running macOS High Sierra 10.13.3 and I want to install Windows 10 with Bootcamp. But it always fails when creating the partition and I cannot for the life of me get past it. It says: "Your disk could not be partitioned. An error occurred while partitioning the disk. Please run Disk Utility to check and fix the error."

I've tried:

  1. Running First Aid from Disk Utility
  2. Try to partition manually with Disk Utility, same failure
  3. Decrypting my disk
  4. Restarting in Single User Mode and running "/sbin/fsck -fy"
  5. sudo tmutil thinlocalsnapshots / 9999999999999999

Nothing has worked. Any ideas, please? Here is my diskutil output.

    $ diskutil list
/dev/disk0 (internal, physical):
   #:                       TYPE NAME                    SIZE       IDENTIFIER
   0:      GUID_partition_scheme                        *500.3 GB   disk0
   1:                        EFI EFI                     209.7 MB   disk0s1
   2:                 Apple_APFS Container disk1         500.1 GB   disk0s2

/dev/disk1 (synthesized):
   #:                       TYPE NAME                    SIZE       IDENTIFIER
   0:      APFS Container Scheme -                      +500.1 GB   disk1
                                 Physical Store disk0s2
   1:                APFS Volume Macintosh HD            251.4 GB   disk1s1
   2:                APFS Volume Preboot                 22.3 MB    disk1s2
   3:                APFS Volume Recovery                509.8 MB   disk1s3
   4:                APFS Volume VM                      1.1 GB     disk1s4

/dev/disk2 (disk image):
   #:                       TYPE NAME                    SIZE       IDENTIFIER
   0:                            CCCOMA_X64FRE_EN-US... +4.7 GB     disk2

And diskutil apfs list:

diskutil apfs list
APFS Container (1 found)
|
+-- Container disk1 6D0381A1-68AF-4E33-A6D3-ECDB285D9F04
    ====================================================
    APFS Container Reference:     disk1
    Capacity Ceiling (Size):      500068036608 B (500.1 GB)
    Capacity In Use By Volumes:   252932173824 B (252.9 GB) (50.6% used)
    Capacity Available:           247135862784 B (247.1 GB) (49.4% free)
    |
    +-< Physical Store disk0s2 AC53B293-957E-4004-8ABC-7E2104DB9762
    |   -----------------------------------------------------------
    |   APFS Physical Store Disk:   disk0s2
    |   Size:                       500068036608 B (500.1 GB)
    |
    +-> Volume disk1s1 AFAF63F4-73FF-3CCF-80D9-AD3ACBDC0DDC
    |   ---------------------------------------------------
    |   APFS Volume Disk (Role):   disk1s1 (No specific role)
    |   Name:                      Macintosh HD (Case-insensitive)
    |   Mount Point:               /
    |   Capacity Consumed:         251164803072 B (251.2 GB)
    |   FileVault:                 No
    |
    +-> Volume disk1s2 FF92EB09-8D74-4029-9C2C-CC60961C02A9
    |   ---------------------------------------------------
    |   APFS Volume Disk (Role):   disk1s2 (Preboot)
    |   Name:                      Preboot (Case-insensitive)
    |   Mount Point:               Not Mounted
    |   Capacity Consumed:         22347776 B (22.3 MB)
    |   FileVault:                 No
    |
    +-> Volume disk1s3 DFEF113D-100A-44AA-B892-C58C18D93F34
    |   ---------------------------------------------------
    |   APFS Volume Disk (Role):   disk1s3 (Recovery)
    |   Name:                      Recovery (Case-insensitive)
    |   Mount Point:               Not Mounted
    |   Capacity Consumed:         509820928 B (509.8 MB)
    |   FileVault:                 No
    |
    +-> Volume disk1s4 A8C5EAE5-BBB9-424D-8975-CA54DE4CCBB1
        ---------------------------------------------------
        APFS Volume Disk (Role):   disk1s4 (VM)
        Name:                      VM (Case-insensitive)
        Mount Point:               /private/var/vm
        Capacity Consumed:         1073762304 B (1.1 GB)
        FileVault:                 No
  • What is the model/year of your Mac? – David Anderson Feb 25 '18 at 18:03
  • @DavidAnderson It's a MacBook Pro (Retina, 15-inch, Mid 2015) – Botond Béres Feb 25 '18 at 18:46
  • I can post a different answer which would not require a flash drive, but I believe using a flash drive is easier. Let me know, if you would prefer not using a flash drive. – David Anderson Feb 25 '18 at 19:09
4

Many users have posted problems similar to yours. In every case, APFS in involved.

Below are the instructions for installing Windows 10.

Note: To get a better view of the images shown below, either click on an image or open an image in a new window.

  1. (In your case, you can skip this step.) Remove all Windows related partitions that may have been created by previous attempts to install Windows. When finished, the output from the command diskutil list disk0 should appear similar to what is shown below. Other users should assume their sizes will be different.

    /dev/disk0 (internal, physical):
       #:                       TYPE NAME                    SIZE       IDENTIFIER
       0:      GUID_partition_scheme                        *500.3 GB   disk0
       1:                        EFI EFI                     209.7 MB   disk0s1
       2:                 Apple_APFS Container disk1         500.1 GB   disk0s2
    
  2. The command below will create the 150 GB "BOOTCAMP" partition on your internal drive. If you want a different size, then make the appropriate subsitutions. The space occupied by this partition will be used for installing Windows.

    Note: The two sizes given in the command below need to equal the size of your disk0s2. In other words, 350.1 + 150 = 500.1.

    sudo  diskutil  apfs  resizeContainer  disk0s2  350.1G  FAT32  BOOTCAMP  150G
    
  3. Use the Disk Utility application to erase a 16 GB or larger USB flash drive. Enter the settings shown below in the popup window. When finished, do not remove the flash drive.

    y1

  4. Use the Boot Camp Assistant to download the Window Support Software. Look for the "Action" pulldown on the Boot Camp Assistant menu bar. On my Mac, these files were downloaded to the ~/WindowsSupport directory.

    Note: You can not download the Boot Camp Support Software for your Mac computer from any Apple website. You must use the Boot Camp Assistant to download an officially copy of this software.

  5. Mount the Windows iso file and copy the contents to the "WINSTALL" volume. You will need the use the cp command from a Terminal application window. Below is the exact command I usually use. The string ESD-ISO is the name of the mounted ISO file from Microsoft. If necessary, make the appropriate modifications.

    cp  -Rv  /volumes/ESD-ISO/  /volumes/WINSTALL
    

    Note: This command will take a while to complete. Be patient!

  6. Copy the Windows Support Software to the "WINSTALL" volume. Below is the exact command I usually use. If necessary, make the appropriate modifications.

    cp  -Rv  ~/WindowsSupport/  /volumes/WINSTALL
    
  7. Continue starting at step 3 of my answer to the question Boot Camp Assistance is stuck on create a partition?

  • I get an error when I try to run resizeContainer: APFS Container Resize error code is 49187 – Botond Béres Feb 25 '18 at 19:42
  • Checking the snapshots Verifying allocated space warning: Overallocation Detected on Main device: (33863942+1) bitmap address (473590) The volume /dev/disk0s2 appears to be OK Storage system check exit code is 0 Shrinking APFS Physical Store disk0s2 from 500,068,036,608 to 400,099,999,744 bytes Shrinking APFS data structures APFS Container Resize error code is 49187 Error: -69606: A problem occurred while resizing APFS Container structures – Botond Béres Feb 25 '18 at 19:44
  • Also I don't have Time Machine enabled and I don't have any local snapshots. – Botond Béres Feb 25 '18 at 19:46
  • The command you entered would only have failed if there was not already something wrong the your APFS partition. – David Anderson Feb 26 '18 at 3:13
  • 1
    Have you tried fsck_apfs -y /dev/disk0s2? You may need boot to Internet Recovery or USB installer to enter this command. Also, you may have first enter the command diskutil unmount "Macintosh HD". – David Anderson Feb 26 '18 at 17:09

You must log in to answer this question.

protected by bmike Aug 4 '18 at 20:46

Thank you for your interest in this question. Because it has attracted low-quality or spam answers that had to be removed, posting an answer now requires 10 reputation on this site (the association bonus does not count).

Would you like to answer one of these unanswered questions instead?

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