diskutil umount force disk2s1
csrutil disable
gpt add -b 409640 -s 390625000 -t hfs /dev/disk0
diskutil list
/dev/disk0 (internal, physical):
#: TYPE NAME SIZE IDENTIFIER
0: GUID_partition_scheme *256.1 GB disk0
1: EFI EFI 209.7 MB disk0s1
2: Apple_APFS Container disk1 55.9 GB disk0s2
3: Apple_HFS 200.0 GB disk0s3
/dev/disk1 (synthesized):
#: TYPE NAME SIZE IDENTIFIER
0: APFS Container Scheme - +55.9 GB disk1
Physical Store disk0s2
1: APFS Volume OS démarrage 28.9 GB disk1s1
2: APFS Volume Preboot 21.8 MB disk1s2
3: APFS Volume Recovery 516.1 MB disk1s3
4: APFS Volume VM 4.3 GB disk1s4
3: Apple_HFS 200.0 GB disk0s3
diskutil eraseVolume apfs "Macintosh HD" disk0s3 ; diskutil list
diskutil eraseVolume apfs "Macintosh HD" disk0s3 ; diskutil list
You may not cause more than one APFS Container per partition map to exist with eraseVolume
/dev/disk0 (internal, physical):
#: TYPE NAME SIZE IDENTIFIER
0: GUID_partition_scheme *256.1 GB disk0
1: EFI EFI 209.7 MB disk0s1
2: Apple_APFS Container disk1 55.9 GB disk0s2
3: Apple_HFS 200.0 GB disk0s3
/dev/disk1 (synthesized):
#: TYPE NAME SIZE IDENTIFIER
0: APFS Container Scheme - +55.9 GB disk1
Physical Store disk0s2
1: APFS Volume OS démarrage 28.9 GB disk1s1
2: APFS Volume Preboot 21.8 MB disk1s2
3: APFS Volume Recovery 516.1 MB disk1s3
4: APFS Volume VM 4.3 GB disk1s4
sudo newfs_hfs -J -v "Macintosh HD" /dev/disk0s3 ; diskutil mount disk0s3 ; diskutil ap convert disk0s3
sudo newfs_hfs -J -v "Macintosh HD" /dev/disk0s3 ; diskutil mount disk0s3 ; diskutil ap convert disk0s3
Password:
sudo newfs_hfs -J -v "Macintosh HD" /dev/disk0s3 ; diskutil mount disk0s3 ; diskutil ap convert disk0s3
Initialized /dev/rdisk0s3 as a 186 GB case-insensitive HFS Plus volume with a 16384k journal
Volume Macintosh HD on disk0s3 mounted
Started APFS operation on disk0s3 Macintosh HD
Converting HFS Volume to an APFS Container which will export one APFS Volume
The target is the Journaled HFS+ volume "Macintosh HD" backed by the GPT partition disk0s3
The target is a data disk; it is not a macOS system disk
Found APFS EFI driver /usr/standalone/i386/apfs.efi to install into the APFS Container
The target is not encrypted
Unmounting disk0s3
Starting conversion from HFS to APFS
Performing apfs_hfs_convert -x --verbose=0x400 --efi /usr/standalone/i386/apfs.efi /dev/disk0s3
Reporting pre-conversion statistics
Reporting post-conversion statistics
Successfully finished conversion from HFS to APFS
Successful conversion in commit mode so will switch type to APFS
Setting type of disk0s3 to APFS
Changing the physical disk partition type in shared mode
Partition modification attempt count was 1
Opening and closing disk0s3 to terminate old content driver
Expecting the new APFS Container at Physical Store disk0s3
Confirmed existence of new unencrypted APFS Volume disk2s1
Mounting APFS Volume disk2s1
APFS Volume mount attempt result was 0
Exiting conversion operations with error code 0
Disk from APFS operation: disk2s1
Finished APFS operation on disk0s3 Macintosh HD
macbookpro-70cd60f1fbb5:~