3

I upgraded to a larger SSD (120 GB to 250 GB), and copied my existing mac SSD to a larger one with dd (clonezilla live usb). It is a hackintosh with a latest OpenCore 0.5.9.

However, I cannot resize the APFS container into a newly available free space:

❯ diskutil apfs resizeContainer disk0s2 0

Started APFS operation
Error: -69743: The new size must be different than the existing size

Here is a disk layout showing a lot of free space after second GPT partition:

❯ diskutil list
/dev/disk0 (internal, physical):
   #:                       TYPE NAME                    SIZE       IDENTIFIER
   0:      GUID_partition_scheme                        *250.1 GB   disk0
   1:                        EFI EFI                     209.7 MB   disk0s1
   2:                 Apple_APFS Container disk3         119.8 GB   disk0s2
❯ sudo gpt -r show disk0
      start       size  index  contents
          0          1         PMBR
          1          1         Pri GPT header
          2         32         Pri GPT table
         34          6
         40     409600      1  GPT part - C12A7328-F81F-11D2-BA4B-00A0C93EC93B
     409640  234031968      2  GPT part - 7C3457EF-0000-11AA-AA11-00306543ECAC
  234441608  253955527
  488397135         32         Sec GPT table
  488397167          1         Sec GPT header

Here's how the attempt to resize partition ends up in Disk Utility:

The disk is 250 GB

enter image description here

APFS container is 120 GB

enter image description here

Disk utility shows APFS container and free space properly ...

enter image description here

enter image description here

... so I delete the free space ...

enter image description here

... confirm ...

enter image description here

... and end up in a same place.

enter image description here

Any idea what to do?

1
  • Generally, Ask Different does not allow questions regarding hackintoshs. Commented Jul 11, 2020 at 1:23

2 Answers 2

3

Apparently a partition map needed repairing. It is worth noting, that this worked, while running First Aid from Disk Utility didn't help.

sudo diskutil repairdisk disk0

It warned about possibly destroying an EFI partition, so I backed up its contents:

Repairing the partition map might erase disk0s1, proceed? (y/N) y
Started partition map repair on disk0
Checking prerequisites
Checking the partition list
Adjusting partition map to fit whole disk as required
Checking for an EFI system partition
Checking the EFI system partition's size
Checking the EFI system partition's file system
Checking the EFI system partition's folder content
Checking all HFS data partition loader spaces
Checking booter partitions
Reviewing boot support loaders
Checking Core Storage Physical Volume partitions
The partition map appears to be OK
Finished partition map repair on disk0

... but the EFI partition survived, and then the resize worked:

diskutil apfs resizeContainer disk0s2 0
0

I realize this is an old thread but I just had some experience with this same issue and wanted to share my findings.

I had been attempting to use Clonezilla to clone my 256GB SSD to a 1TB SSD on my early 2013 15” Macbook Pro Retina running Catalina and having the same issue with not being able to resize the APFS container after cloning but I was able to solve the problem by using expert mode to turn off the -r argument (which will attempt to resize the file system to match the target disk size) when setting up the cloning session.

The beginner mode assumes you may be going larger so by default the -r argument is on but it doesn’t work properly for APFS so you need to turn it off in the advanced parameters screen which is only available in expert mode.

You also need to confirm in the next screen that the -k argument is using the 0 setting (-k0) which will use the partition table from the target disk. All other default settings should be fine.

After the cloning process is completed, just boot up using the new SSD and then use Disk Utility to partition the unused space on the physical drive and then delete the partition (or format a small partition you want to keep). Disk Utility will then resize the APFS container as expected and violà! I have done this multiple times and it has worked every time. Good luck!

You must log in to answer this question.

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