2

I am trying to use Boot Camp Assistant to create a partition for Windows that is 100 GB. However, I am unable to create a partition of that size.

Trying to create a 100 GB FAT32 partition (via the command sudo diskutil apfs resizeContainer disk0s2 400G FAT32 BOOTCAMP 100G) from Terminal results in the following error, starting from the result of the automatic fsck_apfs that is done:

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,000,000,000 bytes
Shrinking APFS data structures
APFS Container Resize error code is 49187
Error: -69606: A problem occurred while resizing APFS Container structures

The output of diskutil list returns the following:

/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 Main                    282.7 GB   disk1s1
   2:                APFS Volume Preboot                 20.2 MB    disk1s2
   3:                APFS Volume Recovery                519.0 MB   disk1s3
   4:                APFS Volume VM                      12.9 GB    disk1s4

/dev/disk2 (external, physical):
   #:                       TYPE NAME                    SIZE       IDENTIFIER
   0:     FDisk_partition_scheme                        *64.2 GB    disk2
   1:                 DOS_FAT_32 WININSTALL              64.2 GB    disk2s1

As for the diskutil apfs list output:

APFS Container (1 found)
|
+-- Container disk1 F8CFD798-0C08-45AE-8F6D-FAAC9650F2A2
    ====================================================
    APFS Container Reference:     disk1
    Size (Capacity Ceiling):      500068036608 B (500.1 GB)
    Minimum Size:                 301437767680 B (301.4 GB)
    Capacity In Use By Volumes:   292004704256 B (292.0 GB) (58.4% used)
    Capacity Not Allocated:       208063332352 B (208.1 GB) (41.6% free)
    |
    +-< Physical Store disk0s2 DEE143FB-B604-4F51-9BB7-C358B01D5137
    |   -----------------------------------------------------------
    |   APFS Physical Store Disk:   disk0s2
    |   Size:                       500068036608 B (500.1 GB)
    |
    +-> Volume disk1s1 CFBE30B9-AE09-39D3-9F19-CF4EB5A08611
    |   ---------------------------------------------------
    |   APFS Volume Disk (Role):   disk1s1 (No specific role)
    |   Name:                      Main (Case-insensitive)
    |   Mount Point:               /
    |   Capacity Consumed:         282714124288 B (282.7 GB)
    |   FileVault:                 No
    |
    +-> Volume disk1s2 51246A8F-B84B-401C-9896-5D7CD4F4D621
    |   ---------------------------------------------------
    |   APFS Volume Disk (Role):   disk1s2 (Preboot)
    |   Name:                      Preboot (Case-insensitive)
    |   Mount Point:               Not Mounted
    |   Capacity Consumed:         20156416 B (20.2 MB)
    |   FileVault:                 No
    |
    +-> Volume disk1s3 9F0127AA-3C09-49E0-A3E7-A0487C781E5E
    |   ---------------------------------------------------
    |   APFS Volume Disk (Role):   disk1s3 (Recovery)
    |   Name:                      Recovery (Case-insensitive)
    |   Mount Point:               Not Mounted
    |   Capacity Consumed:         518995968 B (519.0 MB)
    |   FileVault:                 No
    |
    +-> Volume disk1s4 10062AED-5DC0-4764-86A3-8F9745027C51
        ---------------------------------------------------
        APFS Volume Disk (Role):   disk1s4 (VM)
        Name:                      VM (Case-insensitive)
        Mount Point:               /private/var/vm
        Capacity Consumed:         8589983744 B (8.6 GB)
        FileVault:                 No

Finally, for diskutil apfs resizecontainer disk0s2 limits:

Resize limits for APFS Physical Store partition disk0s2:
  Current Physical Store partition size on map:   500.1 GB (500068036608 Bytes)
  Minimum (constrained by files/snapshots):       308.7 GB (308658987008 Bytes)
  Recommended minimum (if used with macOS):       319.4 GB (319396405248 Bytes)
  Maximum (constrained by partition map space):   500.1 GB (500068036608 Bytes)

I should have about 200 GB free within disk1, so the amount of space I have remaining should not be a problem.

FileVault is not on, as evidenced by the output of diskutil apfs list.

I have also disabled Time Machine via tmutil disable, have disconnected any backup disks in System Preferences, disabled "Back Up Automatically", and have deleted all local snapshots via tmutil thinlocalsnapshots / 99999999999999. Running tmutil listlocalsnapshots / returns nothing, not even an empty line.

I have booted to single user mode, and have run fsck_apfs -d -l disk0 myself (along with the same command for disk1). It (along with First Aid) says the disk is OK.

I have reinstalled macOS completely.

However, despite all my problems, I am able to produce a 40 GB partition (via sudo diskutil apfs resizeContainer disk0s2 460 FAT32 BOOTCAMP 40G):

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 459,999,997,952 bytes
Shrinking APFS data structures
Shrinking partition
Modifying partition map
4096 bytes per physical sector
/dev/rdisk0s3: 78103872 sectors in 1220373 FAT32 clusters (32768 bytes/cluster)
bps=512 spc=64 res=32 nft=2 mid=0xf8 spt=32 hds=255 hid=898848768 drv=0x80 bsec=78123008 bspf=9536 rdcl=2 infs=1 bkbs=6
Mounting disk
1 new disk created or changed due to APFS operation
Disk from APFS operation: disk0s3
Finished APFS operation

Is this ultimately a problem of not having enough free space (despite things saying otherwise)? I could attempt removing files to free another 60 GB and see if I can then create a partition with 100 GB of space.

Would appreciate a fix to this problem that avoids having to reformat the drive, however if that is the only solution I will accept it.

1

You are entering the command incorrectly. Below is what you entered.

sudo diskutil apfs resizeContainer disk0s2 400G FAT32 BOOTCAMP 100G

What you should have entered is given below.

sudo diskutil apfs resizeContainer disk0s2 400G FAT32 BOOTCAMP 0

Basically, you should let the command determine the size of the BOOTCAMP partition.

If you can not get a 100GB BOOTCAMP partition after reinstalling macOS completely, then how about creating the partition before reinstalling. In other words, enter the command below to destroy everything and create the correct partitioning before reinstalling macOS.

sudo diskutil partitiondisk disk0 2 gpt apfs Main 400G fat32 BOOTCAMP R

Again, the above command will determine the size of the BOOTCAMP partition.

One final note:

It appears you are trying to install Windows without a Recovery partition. If so, the the recovery files will be placed inside of the BOOTCAMP partition. This is not how Windows is normally installed for an EFI boot. Also, you have not allocated a System Reserved partition. Although, the Boot Camp Assistant does not allocate for a System Reserved partition either and Windows seems to operate correctly on Macs without one.

| improve this answer | |
  • Great analysis. This OP really has a non-standard layout which clearly will cause a lot of problems. Nice job here both in the details asking, Vangekis and the answer David. – bmike Sep 9 '18 at 18:07

You must log in to answer this question.

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