I tried to follow steps in the article Installing Ubuntu on Mac with macOS and Windows already installed.
But I have a different file system. And cannot resize with diskutil.
diskutil resizevolume disk0s2 200G 3 jhfs+ part1 4G jhfs+ part2 200M jhfs+ part3 200M
disk0s2 is an APFS Physical Store (use "diskutil apfs resizeContainer" instead to resize)
diskutil list disk0
/dev/disk0 (internal):
#: TYPE NAME SIZE IDENTIFIER
0: GUID_partition_scheme 500.3 GB disk0
1: EFI EFI 314.6 MB disk0s1
2: Apple_APFS Container disk1 500.0 GB disk0s2
sudo gpt -r show /dev/disk0 (disabled sip to get it works)
Password:
start size index contents
0 1 PMBR
1 1 Pri GPT header
2 4 Pri GPT table
6 76800 1 GPT part - C12A7328-F81F-11D2-BA4B-00A0C93EC93B
76806 122061322 2 GPT part - 7C3457EF-0000-11AA-AA11-00306543ECAC
122138128 4 Sec GPT table
122138132 1 Sec GPT header
sudo fdisk /dev/disk0
Password:
Disk: /dev/disk0 geometry: 7602/255/63 [122138133 sectors]
Sector size: 4096 bytes
Signature: 0xAA55
Starting Ending
#: id cyl hd sec - cyl hd sec [ start - size]
------------------------------------------------------------------------
1: EE 1023 254 63 - 1023 254 63 [ 1 - 122138132] <Unknown ID>
2: 00 0 0 0 - 0 0 0 [ 0 - 0] unused
3: 00 0 0 0 - 0 0 0 [ 0 - 0] unused
4: 00 0 0 0 - 0 0 0 [ 0 - 0] unused
diskutil apfs list
APFS Container (1 found)
|
+-- Container disk1 DF585E03-85EB-401C-8AAD-AFA0E08F6596
====================================================
APFS Container Reference: disk1
Size (Capacity Ceiling): 499963174912 B (500.0 GB)
Capacity In Use By Volumes: 189015490560 B (189.0 GB) (37.8% used)
Capacity Not Allocated: 310947684352 B (310.9 GB) (62.2% free)
|
+-< Physical Store disk0s2 39E55C09-2343-4DC5-9AAE-8C0C004FE3F2
| -----------------------------------------------------------
| APFS Physical Store Disk: disk0s2
| Size: 499963174912 B (500.0 GB)
|
+-> Volume disk1s1 2769E4ED-BC35-43BA-8CC2-463B819B0CB4
| ---------------------------------------------------
| APFS Volume Disk (Role): disk1s1 (No specific role)
| Name: Macintosh HD (Case-insensitive)
| Mount Point: /
| Capacity Consumed: 185070796800 B (185.1 GB)
| FileVault: No (Encrypted at rest)
|
+-> Volume disk1s2 78FAA400-3A62-412F-BF61-8EFF61614B50
| ---------------------------------------------------
| APFS Volume Disk (Role): disk1s2 (Preboot)
| Name: Preboot (Case-insensitive)
| Mount Point: Not Mounted
| Capacity Consumed: 44171264 B (44.2 MB)
| FileVault: No
|
+-> Volume disk1s3 30EB14BA-3B54-4B28-B6CA-566945971020
| ---------------------------------------------------
| APFS Volume Disk (Role): disk1s3 (Recovery)
| Name: Recovery (Case-insensitive)
| Mount Point: Not Mounted
| Capacity Consumed: 517799936 B (517.8 MB)
| FileVault: No
|
+-> Volume disk1s4 9392BB6E-1464-4687-BEDF-6E10BFC637ED
---------------------------------------------------
APFS Volume Disk (Role): disk1s4 (VM)
Name: VM (Case-insensitive)
Mount Point: /private/var/vm
Capacity Consumed: 3221245952 B (3.2 GB)
FileVault: No (Encrypted at rest)
diskutil apfs list
, as it will be necessary to determine which disk identifiers have been assigned to both the Physical Store and Virtual Volume disks for your APFS partition. – Alison E.E. Feb 13 '19 at 20:54