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

Mark Carter

macrumors newbie
Original poster
Dec 11, 2015
5
0
UK
Due to my Windows 10 bootcamp partition crashing I wanted to reinstall it. However Bootcamp Assistant wasn't able to remove the old the partition and neither could disk utility so I managed to use Terminal to remove it. However, I'm not able to recover the 125GB I had used for bootcamp. Please see below - looks like the APFS container needs to be resized to recover the full physical 500GB?

I'm running 10.14.2 on a 17,1 iMac. I'm no Terminal expert so any help much appreciated.

Mark


Last login: Sat Dec 15 00:09:09 on ttys000

iMac-2:~ markpcarter$ diskutil list

/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 - +366.0 GB disk1

Physical Store disk0s2

1: APFS Volume Macintosh HD 304.5 GB disk1s1

2: APFS Volume Preboot 42.9 MB disk1s2

3: APFS Volume Recovery 517.0 MB disk1s3

4: APFS Volume VM 20.5 KB disk1s4
 
Last edited:

BLUEDOG314

macrumors 6502
Dec 12, 2015
377
120
I've solved this issue in the past with "diskutil mergepartitions" in terminal. Can you post a screenshot of the terminal window for "diskutil list"? I know it will be very similar (the same likely) to what you posted, but usually there is some kind of free space or unidentified area which I'm not seeing.
 

Mark Carter

macrumors newbie
Original poster
Dec 11, 2015
5
0
UK
Hi Bluedog see below:

Screenshot 2018-12-15 at 00.44.20.png
 

BLUEDOG314

macrumors 6502
Dec 12, 2015
377
120
In this case I believe you want "diskutil apfs resizecontainer" used on the device disk1. If you just type "diskutil apfs resizecontainer" into terminal with nothing else, you'll get an explanation of how to use it.
 

Mark Carter

macrumors newbie
Original poster
Dec 11, 2015
5
0
UK
I've tried this on on disk1 with the size zero (to grow to fit) and with size 500g and neither work unfortunately - see terminal screenshot:

Screenshot 2018-12-15 at 01.34.35.png


What am I missing?
[doublepost=1544837847][/doublepost]
Follow these instructions. They fixed it for me. Follow Loner's post.

https://discussions.apple.com/thread/8522376

Thanks BionicMan for this - I've tried to copy this for my situation but doesn't seem to work / think my issue is slightly different as my Diskutil list output is different?
 

Fishrrman

macrumors Penryn
Feb 20, 2009
28,348
12,464
OP:

If you reach a point where nothing seems to work, use my "Fishrrman's nuke 'em back to zero solution".

1. You'll need an external drive.
2. You'll also need either CarbonCopyCloner or SuperDuper
CCC and SD are FREE to download and use for 30 days (won't cost anything)
3. Erase the external drive to the same format as the internal (APFS or HFS+)
4. Use CCC (or SD) to clone the contents of your Mac partition to the external drive
5. Now, BOOT UP from the external cloned backup
6. Open Disk Utility and ERASE the internal drive. Nuke it back to nuthin'. If you were previously using APFS, erase it back to APFS.
7. Now that the internal drive is "empty", open CCC (or SD)
8. RE-CLONE the contents of your cloned backup BACK TO the internal drive.
9. When done, power down, disconnect external.
10. REBOOT and HOLD DOWN THE OPTION KEY and KEEP HOLDING IT DOWN until the startup manager appears
11. Select the internal drive with the pointer and hit return.
12. Do you get a good boot?
13. If so, go to the Startup Disk preference pane and RE-designate the internal drive to be the boot drive.

This should do it.
 
Last edited:

BLUEDOG314

macrumors 6502
Dec 12, 2015
377
120
Other thing you can do is make an image of the current APFS partition with hdiutil and put it on an external drive, then nuke the internal drive and pave with a single APFS container that spans the drive, then restore the container you backed up and it will span the whole drive.
 

Mark Carter

macrumors newbie
Original poster
Dec 11, 2015
5
0
UK
Fisherrman / Bluedog314 thanks for ideas. I've been trying some other solutions but seems like a full erase and restore is going to be the way forward.

Fisherman - rather than using Carbon Copy Cloner would erasing the HD from internet recover and then using my Time Machine back up effectively be the same?
 

Fishrrman

macrumors Penryn
Feb 20, 2009
28,348
12,464
"Fisherman - rather than using Carbon Copy Cloner would erasing the HD from internet recover and then using my Time Machine back up effectively be the same?"

NO !!!
You want a BOOTABLE cloned backup, because then it's child's play to
- boot from the backup
- erase the internal drive
- RE-clone BACK TO the internal.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.