M
diskutil list
-bash-3.2# diskutil list
/dev/disk0 (internal, physical):
#: TYPE NAME SIZE IDENTIFIER
0: GUID_partition_scheme *240.1 GB disk0
1: EFI EFI 209.7 MB disk0s1
2: Apple_APFS Container disk1 239.8 GB disk0s2
/dev/disk1 (synthesized):
#: TYPE NAME SIZE IDENTIFIER
0: APFS Container Scheme - +239.8 GB disk1
Physical Store disk0s2
1: APFS Volume Macintosh HD 5.2 GB disk1s1
2: APFS Volume Preboot 20.7 MB disk1s2
3: APFS Volume Recovery 515.1 MB disk1s3
4: APFS Volume VM 3.2 GB disk1s4
/dev/disk2 (disk image):
#: TYPE NAME SIZE IDENTIFIER
0: GUID_partition_scheme +2.1 GB disk2
1: Apple_HFS OS X Base System 2.0 GB disk2s1
/dev/disk3 (disk image):
#: TYPE NAME SIZE IDENTIFIER
0: untitled +5.2 MB disk3
/dev/disk4 (disk image):
#: TYPE NAME SIZE IDENTIFIER
0: untitled +524.3 KB disk4
/dev/disk5 (disk image):
#: TYPE NAME SIZE IDENTIFIER
0: untitled +524.3 KB disk5
/dev/disk6 (disk image):
#: TYPE NAME SIZE IDENTIFIER
0: untitled +524.3 KB disk6
/dev/disk7 (disk image):
#: TYPE NAME SIZE IDENTIFIER
0: untitled +2.1 MB disk7
/dev/disk8 (disk image):
#: TYPE NAME SIZE IDENTIFIER
0: untitled +524.3 KB disk8
/dev/disk9 (disk image):
#: TYPE NAME SIZE IDENTIFIER
0: untitled +524.3 KB disk9
/dev/disk10 (disk image):
#: TYPE NAME SIZE IDENTIFIER
0: untitled +12.6 MB disk10
/dev/disk11 (disk image):
#: TYPE NAME SIZE IDENTIFIER
0: untitled +4.2 MB disk11
/dev/disk12 (disk image):
#: TYPE NAME SIZE IDENTIFIER
0: untitled +1.0 MB disk12
/dev/disk13 (disk image):
#: TYPE NAME SIZE IDENTIFIER
0: untitled +2.1 MB disk13
/dev/disk14 (disk image):
#: TYPE NAME SIZE IDENTIFIER
0: untitled +524.3 KB disk14
/dev/disk15 (disk image):
#: TYPE NAME SIZE IDENTIFIER
0: untitled +524.3 KB disk15
/dev/disk16 (disk image):
#: TYPE NAME SIZE IDENTIFIER
0: untitled +1.0 MB disk16
/dev/disk17 (disk image):
#: TYPE NAME SIZE IDENTIFIER
0: untitled +6.3 MB disk17
/dev/disk18 (disk image):
#: TYPE NAME SIZE IDENTIFIER
0: untitled +6.3 MB disk18
/dev/disk19 (disk image):
#: TYPE NAME SIZE IDENTIFIER
0: untitled +524.3 KB disk19
/dev/disk20 (disk image):
#: TYPE NAME SIZE IDENTIFIER
0: untitled +2.1 MB disk20
-bash-3.2#
diskutil resizeContainer disk1 235g jhfs+ BOOT 0b
-bash-3.2# diskutil resizeContainer disk1 235g jhfs+ BOOT 0b
diskutil: did not recognize verb "resizeContainer"; type "diskutil" for a list
diskutil ap resizeContainer disk1 235g jhfs+ BOOT 0b
-bash-3.2# diskutil ap resizeContainer disk1 235g jhfs+ BOOT 0b
Started APFS operation
Aligning shrink delta to 4 847 656 960 bytes and targeting a new physical store size of 234 999 996 416 bytes
Determined the minimum size for the targeted physical store of this APFS Container to be 10 011 365 376 bytes
Resizing APFS Container designated by APFS Container Reference disk1
The specific APFS Physical Store being resized is disk0s2
Verifying storage system
Using live mode
Performing fsck_apfs -n -x -l /dev/disk0s2
Checking volume
Checking the container superblock
Checking the EFI jumpstart record
Checking the space manager
Checking the object map
Checking the APFS volume superblock
Checking the object map
Checking the fsroot tree
Checking the snapshot metadata tree
Checking the extent ref tree
Checking the snapshots
Checking the APFS volume superblock
Checking the object map
Checking the fsroot tree
Checking the snapshot metadata tree
Checking the extent ref tree
Checking the snapshots
Checking the APFS volume superblock
Checking the object map
Checking the fsroot tree
Checking the snapshot metadata tree
Checking the extent ref tree
Checking the snapshots
Checking the APFS volume superblock
Checking the object map
Checking the fsroot tree
Checking the snapshot metadata tree
Checking the extent ref tree
Checking the snapshots
Verifying allocated space
warning: Overallocation Detected on Main device: (164692+11) bitmap address (727920)
warning: Overallocation Detected on Main device: (164704+23) bitmap address (727920)
warning: Overallocation Detected on Main device: (164728+5) bitmap address (727920)
warning: Overallocation Detected on Main device: (164734+2) bitmap address (727920)
warning: Overallocation Detected on Main device: (164736+9) bitmap address (727920)
warning: Overallocation Detected on Main device: (164751+12) bitmap address (727920)
warning: Overallocation Detected on Main device: (164765+26) bitmap address (727920)
warning: Overallocation Detected on Main device: (164793+7) bitmap address (727920)
warning: Overallocation Detected on Main device: (164800+4) bitmap address (727920)
warning: Overallocation Detected on Main device: (164805+1) bitmap address (727920)
warning: Overallocation Detected on Main device: (164807+1) bitmap address (727920)
warning: Overallocation Detected on Main device: (164809+1) bitmap address (727920)
warning: Overallocation Detected on Main device: (164811+1) bitmap address (727920)
warning: Overallocation Detected on Main device: (164813+4) bitmap address (727920)
warning: Overallocation Detected on Main device: (164819+2) bitmap address (727920)
warning: Overallocation Detected on Main device: (164826+1) bitmap address (727920)
warning: Overallocation Detected on Main device: (164828+13) bitmap address (727920)
warning: Overallocation Detected on Main device: (164842+11) bitmap address (727920)
warning: Overallocation Detected on Main device: (164854+6) bitmap address (727920)
warning: Overallocation Detected on Main device: (164861+3) bitmap address (727920)
warning: Overallocation Detected on Main device: (164864+41) bitmap address (727920)
warning: Overallocation Detected on Main device: (164906+22) bitmap address (727920)
warning: Overallocation Detected on Main device: (164928+22) bitmap address (727920)
warning: Overallocation Detected on Main device: (164951+41) bitmap address (727920)
warning: Overallocation Detected on Main device: (164992+26) bitmap address (727920)
warning: Overallocation Detected on Main device: (165019+24) bitmap address (727920)
warning: Overallocation Detected on Main device: (165045+1) bitmap address (727920)
warning: Overallocation Detected on Main device: (165049+1) bitmap address (727920)
warning: Overallocation Detected on Main device: (165066+1) bitmap address (727920)
warning: Overallocation Detected on Main device: (165091+2) bitmap address (727920)
warning: Overallocation Detected on Main device: (165095+1) bitmap address (727920)
warning: Overallocation Detected on Main device: (165101+3) bitmap address (727920)
warning: Overallocation Detected on Main device: (165106+1) bitmap address (727920)
warning: Overallocation Detected on Main device: (165115+1) bitmap address (727920)
warning: Overallocation Detected on Main device: (165129+2) bitmap address (727920)
warning: Overallocation Detected on Main device: (165142+1) bitmap address (727920)
warning: Overallocation Detected on Main device: (165145+11) bitmap address (727920)
warning: Overallocation Detected on Main device: (165158+15) bitmap address (727920)
warning: Overallocation Detected on Main device: (165174+10) bitmap address (727920)
warning: Overallocation Detected on Main device: (165184+1) bitmap address (727920)
warning: Overallocation Detected on Main device: (165186+1) bitmap address (727920)
warning: Overallocation Detected on Main device: (165189+2) bitmap address (727920)
warning: Overallocation Detected on Main device: (165194+1) bitmap address (727920)
warning: Overallocation Detected on Main device: (165201+2) bitmap address (727920)
warning: Overallocation Detected on Main device: (165206+1) bitmap address (727920)
warning: Overallocation Detected on Main device: (165208+36) bitmap address (727920)
warning: Overallocation Detected on Main device: (165245+3) bitmap address (727920)
warning: Overallocation Detected on Main device: (165248+23) bitmap address (727920)
warning: Overallocation Detected on Main device: (165272+40) bitmap address (727920)
warning: Overallocation Detected on Main device: (165312+42) bitmap address (727920)
too many warnings generated; suppressing subsequent ones
The volume /dev/disk0s2 appears to be OK
Storage system check exit code is 0
Shrinking APFS Physical Store disk0s2 from 239 847 653 376 to 234 999 996 416 bytes
Shrinking APFS data structures
APFS Container Resize error code is 49187
Error: -69606: A problem occurred while resizing APFS Container structures
-bash-3.2#
diskutil list
-bash-3.2# diskutil list
/dev/disk0 (internal, physical):
#: TYPE NAME SIZE IDENTIFIER
0: GUID_partition_scheme *240.1 GB disk0
1: EFI EFI 209.7 MB disk0s1
2: Apple_APFS Container disk1 239.8 GB disk0s2
/dev/disk1 (synthesized):
#: TYPE NAME SIZE IDENTIFIER
0: APFS Container Scheme - +239.8 GB disk1
Physical Store disk0s2
1: APFS Volume Macintosh HD 5.2 GB disk1s1
2: APFS Volume Preboot 20.7 MB disk1s2
3: APFS Volume Recovery 515.1 MB disk1s3
4: APFS Volume VM 3.2 GB disk1s4
/dev/disk2 (disk image):
#: TYPE NAME SIZE IDENTIFIER
0: GUID_partition_scheme +2.1 GB disk2
1: Apple_HFS OS X Base System 2.0 GB disk2s1
/dev/disk3 (disk image):
#: TYPE NAME SIZE IDENTIFIER
0: untitled +5.2 MB disk3
/dev/disk4 (disk image):
#: TYPE NAME SIZE IDENTIFIER
0: untitled +524.3 KB disk4
/dev/disk5 (disk image):
#: TYPE NAME SIZE IDENTIFIER
0: untitled +524.3 KB disk5
/dev/disk6 (disk image):
#: TYPE NAME SIZE IDENTIFIER
0: untitled +524.3 KB disk6
/dev/disk7 (disk image):
#: TYPE NAME SIZE IDENTIFIER
0: untitled +2.1 MB disk7
/dev/disk8 (disk image):
#: TYPE NAME SIZE IDENTIFIER
0: untitled +524.3 KB disk8
/dev/disk9 (disk image):
#: TYPE NAME SIZE IDENTIFIER
0: untitled +524.3 KB disk9
/dev/disk10 (disk image):
#: TYPE NAME SIZE IDENTIFIER
0: untitled +12.6 MB disk10
/dev/disk11 (disk image):
#: TYPE NAME SIZE IDENTIFIER
0: untitled +4.2 MB disk11
/dev/disk12 (disk image):
#: TYPE NAME SIZE IDENTIFIER
0: untitled +1.0 MB disk12
/dev/disk13 (disk image):
#: TYPE NAME SIZE IDENTIFIER
0: untitled +2.1 MB disk13
/dev/disk14 (disk image):
#: TYPE NAME SIZE IDENTIFIER
0: untitled +524.3 KB disk14
/dev/disk15 (disk image):
#: TYPE NAME SIZE IDENTIFIER
0: untitled +524.3 KB disk15
/dev/disk16 (disk image):
#: TYPE NAME SIZE IDENTIFIER
0: untitled +1.0 MB disk16
/dev/disk17 (disk image):
#: TYPE NAME SIZE IDENTIFIER
0: untitled +6.3 MB disk17
/dev/disk18 (disk image):
#: TYPE NAME SIZE IDENTIFIER
0: untitled +6.3 MB disk18
/dev/disk19 (disk image):
#: TYPE NAME SIZE IDENTIFIER
0: untitled +524.3 KB disk19
/dev/disk20 (disk image):
#: TYPE NAME SIZE IDENTIFIER
0: untitled +2.1 MB disk20
/dev/disk21 (external, physical):
#: TYPE NAME SIZE IDENTIFIER
0: FDisk_partition_scheme *31.3 GB disk21
1: Apple_HFS USB 31.3 GB disk21s1
-bash-3.2#
diskutil partitionDisk disk21 gpt jhfs+ USB 28g jhfs+ BOOT 0b
-bash-3.2# diskutil partitionDisk disk21 gpt jhfs+ USB 28g jhfs+ BOOT 0b
Started partitioning on disk21
Unmounting disk
Creating the partition map
Waiting for partitions to activate
Formatting disk21s2 as Mac OS Extended (Journaled) with name USB
Initialized /dev/rdisk21s2 as a 26 GB case-insensitive HFS Plus volume with a 8192k journal
Mounting disk
Formatting disk21s3 as Mac OS Extended (Journaled) with name BOOT
Initialized /dev/rdisk21s3 as a 3 GB case-insensitive HFS Plus volume with a 8192k journal
Mounting disk
Finished partitioning on disk21
/dev/disk21 (external, physical):
#: TYPE NAME SIZE IDENTIFIER
0: GUID_partition_scheme *31.3 GB disk21
1: EFI EFI 209.7 MB disk21s1
2: Apple_HFS USB 27.9 GB disk21s2
3: Apple_HFS BOOT 2.9 GB disk21s3
-bash-3.2#
asr restore --s / --t /Volumes/BOOT --erase --noprompt
-bash-3.2# asr restore --s / --t /Volumes/BOOT --erase --noprompt
Validating target...done
Validating source...done
Validating sizes...done
Restoring ....10....20....30....40....50....60....70....80....90....100
Verifying ....10....20....30....40....50....60....70....80....90....100
Remounting target volume...done
-bash-3.2#
diskutil list
-bash-3.2# diskutil list
/dev/disk0 (internal, physical):
#: TYPE NAME SIZE IDENTIFIER
0: GUID_partition_scheme *240.1 GB disk0
1: EFI EFI 209.7 MB disk0s1
2: Apple_APFS Container disk1 239.8 GB disk0s2
/dev/disk1 (synthesized):
#: TYPE NAME SIZE IDENTIFIER
0: APFS Container Scheme - +239.8 GB disk1
Physical Store disk0s2
1: APFS Volume Macintosh HD 5.2 GB disk1s1
2: APFS Volume Preboot 20.7 MB disk1s2
3: APFS Volume Recovery 515.1 MB disk1s3
4: APFS Volume VM 3.2 GB disk1s4
/dev/disk2 (external, physical):
#: TYPE NAME SIZE IDENTIFIER
0: GUID_partition_scheme *31.3 GB disk2
1: EFI EFI 209.7 MB disk2s1
2: Apple_HFS USB 27.9 GB disk2s2
3: Apple_HFS OS X Base System 2.9 GB disk2s3
/dev/disk3 (disk image):
#: TYPE NAME SIZE IDENTIFIER
0: untitled +5.2 MB disk3
/dev/disk4 (disk image):
#: TYPE NAME SIZE IDENTIFIER
0: untitled +524.3 KB disk4
/dev/disk5 (disk image):
#: TYPE NAME SIZE IDENTIFIER
0: untitled +524.3 KB disk5
/dev/disk6 (disk image):
#: TYPE NAME SIZE IDENTIFIER
0: untitled +524.3 KB disk6
/dev/disk7 (disk image):
#: TYPE NAME SIZE IDENTIFIER
0: untitled +2.1 MB disk7
/dev/disk8 (disk image):
#: TYPE NAME SIZE IDENTIFIER
0: untitled +524.3 KB disk8
/dev/disk9 (disk image):
#: TYPE NAME SIZE IDENTIFIER
0: untitled +524.3 KB disk9
/dev/disk10 (disk image):
#: TYPE NAME SIZE IDENTIFIER
0: untitled +12.6 MB disk10
/dev/disk11 (disk image):
#: TYPE NAME SIZE IDENTIFIER
0: untitled +4.2 MB disk11
/dev/disk12 (disk image):
#: TYPE NAME SIZE IDENTIFIER
0: untitled +1.0 MB disk12
/dev/disk13 (disk image):
#: TYPE NAME SIZE IDENTIFIER
0: untitled +2.1 MB disk13
/dev/disk14 (disk image):
#: TYPE NAME SIZE IDENTIFIER
0: untitled +524.3 KB disk14
/dev/disk15 (disk image):
#: TYPE NAME SIZE IDENTIFIER
0: untitled +524.3 KB disk15
/dev/disk16 (disk image):
#: TYPE NAME SIZE IDENTIFIER
0: untitled +1.0 MB disk16
/dev/disk17 (disk image):
#: TYPE NAME SIZE IDENTIFIER
0: untitled +6.3 MB disk17
/dev/disk18 (disk image):
#: TYPE NAME SIZE IDENTIFIER
0: untitled +6.3 MB disk18
/dev/disk19 (disk image):
#: TYPE NAME SIZE IDENTIFIER
0: untitled +524.3 KB disk19
/dev/disk20 (disk image):
#: TYPE NAME SIZE IDENTIFIER
0: untitled +2.1 MB disk20
-bash-3.2#
diskutil ap deleteContainer disk1 "Macintosh HD"