So I have a bootcamp volume which has windows installed on it. I used MiniTool partition wizard to shrink the bootcamp size from 60 GB to 40 GB to reclaim 20 GB for my Macintosh HD.
That operation successfully executed and as you will see, container for APFS is at 190 GB now. But my Macintosh HD is still occupying 165.4 GB. I tried resizing using (/usr/sbin/diskutil apfs resizeContainer /dev/disk1 0) but to no avail. Does anyone know how I can reclaim the 20 GB space I freed up before and use container to its max capacity?
What surprises me a little is that this freed 20 GB doesn't show up in UI of disk utility but can be noticed in cmd output of diskutil list:
$ diskutil list
/dev/disk0 (internal, physical):
#: TYPE NAME SIZE IDENTIFIER
0: GUID_partition_scheme *251.0 GB disk0
1: EFI EFI 209.7 MB disk0s1
2: Apple_APFS Container disk1 190.0 GB disk0s2
3: Microsoft Reserved 134.2 MB disk0s3
4: Microsoft Basic Data BOOTCAMP 42.9 GB disk0s4
5: Windows Recovery 471.9 MB disk0s5
/dev/disk1 (synthesized):
#: TYPE NAME SIZE IDENTIFIER
0: APFS Container Scheme - +190.0 GB disk1
Physical Store disk0s2
1: APFS Volume Macintosh HD 165.4 GB disk1s1
2: APFS Volume Preboot 21.1 MB disk1s2
3: APFS Volume Recovery 519.0 MB disk1s3
4: APFS Volume VM 2.1 GB disk1s4
Thank you so much for all your help in advance!
Best Answer
The results from the math shown below is about 17.3 GB of unallocated space.
I assume this unallocated space is between the
Apple_APFS
andMicrosoft Reserved
partitions. If so, then the correct command to add the free space to theApple_APFS
partition is given below. Before using this command, open the MiniTool application and confirm the free space is between theApple_APFS
andMicrosoft Reserved
partitions.From the information you posted, I am guessing the free space will between the
Microsoft Reserved
andMicrosoft Basic Data
partitions. If this is the case, then you will first need to move theMicrosoft Reserved
partition partition to the end of the free space. Below is an outline of the steps to follow.Microsoft Reserved
partition will have the wrong partition type id. You will need to use the MiniTool application to change this id toWindows - Microsoft Reserved Partition
.GPT_BASIC_DATA_ATTRIBUTE_NO_DRIVE_LETTER
attribute bit. Basically, this is bit0x8000000000000000
. Unfortunately, this can to be done using MiniTool. You will have to use thediskpart
command from a Administrator Command Prompt window.diskpart
, you will need to reboot Windows.Microsoft Reserved
partition.A final note:
You posted the following question.
Answer: Basically, the question makes no sense. The APFS container has a size of 190 GB and the Macintosh HD volume is using 165.4 GB of this container's space. If you enlarge the APFS container, the size of the Macintosh HD volume will not change.