Bootcamp Mistakes - free space reclaim
The command below will verify the container before resizing. In your case, the verification failed, so the resize operation did not take place.
diskutil apfs resizecontainer disk1s2 0
You could try repairing the container. Before attempting, I would recommend backing up your personal files. Backing up to a external drive would be best. However, since you have free space, you could enter the command below to create a another APFS container with the APFS volume MyBackup
. This answer assumes will have done this.
diskutil addpartition disk1s2 apfs MyBackup 0
At this point, you should boot to macOS Big Sur Internet Recovery. Or, you could boot from a macOS Big Sur installer flash drive.
Note: You should check to see if any of the identifiers have changed. If so, then make the appropriate substitutions in the remaining commands.
The command below attempts repair.
diskutil repairVolume disk1s2
If repair fails, then you should reinstall macOS BigSur. Below are the commands needed to create a new APFS container with the single APFS volume Macintosh HD
. The command given below attempts to delete the APFS Fusion container.
diskutil apfs deletecontainer disk1s2 Dummy
If the above command fails to create an Apple_HFS
type partition on both disk0s2
and disk1s2
, then enter the command given below.
diskutil apfs deletecontainer -force disk1s2 Dummy
The above command will generate the following warning.
Deleting APFS Container with all of its APFS Volumes
Operating in the contingency (damaged APFS Container) mode. Only the specified APFS Physical Store disk is guaranteed to be reclaimed. Other APFS Physical Stores which may have defined this APFS Container might need to be reclaimed separately
Deleting Container
When I tested this command, an Apple_KFS
type partition was created on both disk0s2
and disk1s2
. If this does not happen, then stop and post the output from diskutil list
to your question. Post a command to this answer, so I can be informed.
The next command creates a new APFS Fusion container.
diskutil apfs createcontainer -main disk0s2 -secondary disk1s2
The next command outputs the identifier for the new APFS Fusion container. Here I will assume the identifier disk2
was output.
diskutil info disk0s2 | grep Container
The next command adds an APFS volume labeled Macintosh HD
to the new APFS Fusion container. If your identifier for the new APFS Fusion container is not disk2
, then make the appropriate substitution.
diskutil apfs addvolume disk2 apfs "Macintosh HD"
At this point, you can install macOS Big Sur and copy your backed up files back to the Macintosh HD
volume.
If you created the MyBackup
volume, then enter the following commands to remove the APFS container with this volume and reclaim the space.
diskutil apfs deletecontainer disk1s3
diskutil apfs resizecontainer disk1s2 0
Update 1
Below is a copy of the image you posted of your progress.
You entered the command given below.
diskutil apfs deletecontainer disk1s2
You were suppose to enter the command given below.
diskutil apfs deletecontainer disk1s2 Dummy
You can fix this error by entering the commands given below.
diskutil addpartition disk0s1 jhfs+ "Dummy 2" 0
diskutil addpartition disk1s1 jhfs+ "Dummy" 0
To insure the identifiers are assigned correctly, you probably should restart the Mac after entering the above commands. In your case, you will want to boot from the flash drive. Since you have successfully removed the defective APFS Fusion container, you can continue with the original instructions at the point where you will be entering the command which creates a new APFS Fusion container.
If you see this link : https://support.apple.com/en-us/HT207584. the command
diskutil resetfusion
would repair your system disks structure.