cams-Mac-mini:~ cam$ diskutil unmountDisk disk2
Unmount of all volumes on disk2 was successful
cams-Mac-mini:~ cam$ sudo gpt dstroy /dev/disk2
Password:
gpt: unknown command: dstroy
cams-Mac-mini:~ cam$ sudo gpt destroy /dev/disk2
cams-Mac-mini:~ cam$ sudo gpt create -f /dev/disk2
cams-Mac-mini:~ cam$ diskutil unmountDisk disk2
Unmount of all volumes on disk2 was successful
cams-Mac-mini:~ cam$ sudo gdisk /dev/disk2
GPT fdisk (gdisk) version 1.0.4
Partition table scan:
MBR: protective
BSD: not present
APM: not present
GPT: present
Found valid GPT with protective MBR; using GPT.
Command (? for help): n
Partition number (1-128, default 1): 1
First sector (34-468862094, default = 2048) or {+-}size{KMGTP}: 40
Information: Moved requested sector from 40 to 2048 in
order to align on 2048-sector boundaries.
Use 'l' on the experts' menu to adjust alignment
Last sector (2048-468862094, default = 468862094) or {+-}size{KMGTP}: 409639
Current type is 'Apple HFS/HFS+'
Hex code or GUID (L to show codes, Enter = AF00): EF00
Changed type of partition to 'EFI System'
Command (? for help): n
Partition number (2-128, default 2): 2
First sector (34-468862094, default = 411648) or {+-}size{KMGTP}: 409640
Information: Moved requested sector from 409640 to 411648 in
order to align on 2048-sector boundaries.
Use 'l' on the experts' menu to adjust alignment
Last sector (411648-468862094, default = 468862094) or {+-}size{KMGTP}: 342206511
Current type is 'Apple HFS/HFS+'
Hex code or GUID (L to show codes, Enter = AF00): AF0A
Changed type of partition to 'Apple APFS'
Command (? for help): n
Partition number (3-128, default 3): 3
First sector (34-468862094, default = 342208512) or {+-}size{KMGTP}: 342206512
Information: Moved requested sector from 342206512 to 342208512 in
order to align on 2048-sector boundaries.
Use 'l' on the experts' menu to adjust alignment
Last sector (342208512-468862094, default = 468862094) or {+-}size{KMGTP}: 369551359
Current type is 'Apple HFS/HFS+'
Hex code or GUID (L to show codes, Enter = AF00): AF0A
Changed type of partition to 'Apple APFS'
Command (? for help): n
Partition number (4-128, default 4): 4
First sector (34-468862094, default = 369551360) or {+-}size{KMGTP}: 369551360
Last sector (369551360-468862094, default = 468862094) or {+-}size{KMGTP}: 468860927
Current type is 'Apple HFS/HFS+'
Hex code or GUID (L to show codes, Enter = AF00): 0700
Changed type of partition to 'Microsoft basic data'
Command (? for help): p
Disk /dev/disk2: 468862128 sectors, 223.6 GiB
Sector size (logical): 512 bytes
Disk identifier (GUID): FC04082B-FFC2-49A5-A444-F8AF84350FE8
Partition table holds up to 128 entries
Main partition table begins at sector 2 and ends at sector 33
First usable sector is 34, last usable sector is 468862094
Partitions will be aligned on 2048-sector boundaries
Total free space is 7189 sectors (3.5 MiB)
Number Start (sector) End (sector) Size Code Name
1 2048 409639 199.0 MiB EF00 EFI System
2 411648 342206511 163.0 GiB AF0A Apple APFS
3 342208512 369551359 13.0 GiB AF0A Apple APFS
4 369551360 468860927 47.4 GiB 0700 Microsoft basic data
Command (? for help): w
Final checks complete. About to write GPT data. THIS WILL OVERWRITE EXISTING
PARTITIONS!!
Do you want to proceed? (Y/N): y
OK; writing new GUID partition table (GPT) to /dev/disk2.
Warning: The kernel may continue to use old or deleted partitions.
You should reboot or remove the drive.
The operation has completed successfully.
cams-Mac-mini:~ cam$ q
-bash: q: command not found
cams-Mac-mini:~ cam$ gpt -vv -r show /dev/disk2
gpt show: unable to open device '/dev/disk2': Permission denied
cams-Mac-mini:~ cam$ sudo gpt -vv -r show /dev/disk2
Password:
gpt show: /dev/disk2: mediasize=240057409536; sectorsize=512; blocks=468862128
gpt show: /dev/disk2: PMBR at sector 0
gpt show: /dev/disk2: Pri GPT at sector 1
gpt show: /dev/disk2: Sec GPT at sector 468862127
start size index contents
0 1 PMBR
1 1 Pri GPT header
2 32 Pri GPT table
34 2014
2048 407592 1 GPT part - C12A7328-F81F-11D2-BA4B-00A0C93EC93B
409640 2008
411648 341794864 2 GPT part - 7C3457EF-0000-11AA-AA11-00306543ECAC
342206512 2000
342208512 27342848 3 GPT part - 7C3457EF-0000-11AA-AA11-00306543ECAC
369551360 99309568 4 GPT part - EBD0A0A2-B9E5-4433-87C0-68B6B72699C7
468860928 1167
468862095 32 Sec GPT table
468862127 1 Sec GPT header
cams-Mac-mini:~ cam$