Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

LK LAW

macrumors regular
Original poster
May 30, 2016
103
43
Well I have a fun problem, trying to remove my bootcamp partition via the bootcamp utility failed. Now the lost space is nowhere to be seen. Any idea how to fix this without nuking my install and reinstalling macOS?

Code:
/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         200.0 GB   disk0s2
   3:       Apple_KernelCoreDump                         655.4 MB   disk0s4

/dev/disk1 (synthesized):
   #:                       TYPE NAME                    SIZE       IDENTIFIER
   0:      APFS Container Scheme -                      +200.0 GB   disk1
                                 Physical Store disk0s2
   1:                APFS Volume Macintosh HD            154.3 GB   disk1s1
   2:                APFS Volume Preboot                 54.8 MB    disk1s2
   3:                APFS Volume Recovery                512.5 MB   disk1s3
   4:                APFS Volume VM                      1.1 GB     disk1s4
 
Well I have a fun problem, trying to remove my bootcamp partition via the bootcamp utility failed. Now the lost space is nowhere to be seen. Any idea how to fix this without nuking my install and reinstalling macOS?

Code:
/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         200.0 GB   disk0s2
   3:       Apple_KernelCoreDump                         655.4 MB   disk0s4

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

run diskutil list (again, because sometimes the disk identifiers can change)

The first command deletes the KernelCoreDump partition, which shouldn't be there...
The second command will grow your APFS container to the end of the disk.

diskutil eraseVolume "Free Space" NoName disk0s4
diskutil apfs resizeContainer disk0s2 0

Note: The 2nd command will freeze your system as it resizes, don't power off your machine let it finish.
 
  • Like
Reactions: LK LAW
run diskutil list (again, because sometimes the disk identifiers can change)

The first command deletes the KernelCoreDump partition, which shouldn't be there...
The second command will grow your APFS container to the end of the disk.

diskutil eraseVolume "Free Space" NoName disk0s4
diskutil apfs resizeContainer disk0s2 0

Note: The 2nd command will freeze your system as it resizes, don't power off your machine let it finish.
There’s no disk0s4, do you mean disk0s3?
[doublepost=1536310436][/doublepost]I removed the kernelcoredump, resizing the disk gives me the error “-69582: one or more of the given or implied APFS Volumes are locked”

Edit: nvm managed to fix that
Edit 2: fixed it thanks!
 
Last edited:
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.