pc54:~ stuarthallett$ sudo gdisk /dev/disk0
Password:
GPT fdisk (gdisk) version 1.0.1
Warning: Devices opened with shared lock will not have their
partition table automatically reloaded!
NOTE: Write test failed with error number 1. It will be impossible to save
changes to this disk's partition table!
You may need to deactivate System Integrity Protection to use this program. See
https://www.quora.com/How-do-I-turn-off-the-rootless-in-OS-X-El-Capitan-10-11
for more information.
Caution! After loading partitions, the CRC doesn't check out!
Warning! Main partition table CRC mismatch! Loaded backup partition table
instead of main partition table!
Warning! One or more CRCs don't match. You should repair the disk!
Partition table scan:
MBR: MBR only
BSD: not present
APM: not present
GPT: damaged
Found valid MBR and corrupt GPT. Which do you want to use? (Using the
GPT MAY permit recovery of GPT data.)
1 - MBR
2 - GPT
3 - Create blank GPT
Your answer: 2
Command (? for help): x
Expert command (? for help): l
Enter the sector alignment value (1-65536, default = 2048): 1
Expert command (? for help): m
Command (? for help): n
Partition number (5-128, default 5): 1
Value out of range
Partition number (5-128, default 5): 40
First sector (34-1953525134, default = 1317365760) or {+-}size{KMGTP}: 409600
First sector (34-1953525134, default = 1317365760) or {+-}size{KMGTP}: EF00
First sector (34-1953525134, default = 1317365760) or {+-}size{KMGTP}: n
First sector (34-1953525134, default = 1317365760) or {+-}size{KMGTP}: 2
First sector (34-1953525134, default = 1317365760) or {+-}size{KMGTP}: 409640
First sector (34-1953525134, default = 1317365760) or {+-}size{KMGTP}: +1315481784
First sector (34-1953525134, default = 1317365760) or {+-}size{KMGTP}: AF00
First sector (34-1953525134, default = 1317365760) or {+-}size{KMGTP}: n
First sector (34-1953525134, default = 1317365760) or {+-}size{KMGTP}: 3
First sector (34-1953525134, default = 1317365760) or {+-}size{KMGTP}: 1315891424
First sector (34-1953525134, default = 1317365760) or {+-}size{KMGTP}: +1269536
Last sector (1318635296-1953525134, default = 1953525134) or {+-}size{KMGTP}: AB00
Last sector (1318635296-1953525134, default = 1953525134) or {+-}size{KMGTP}: n
Last sector (1318635296-1953525134, default = 1953525134) or {+-}size{KMGTP}: 4
Last sector (1318635296-1953525134, default = 1953525134) or {+-}size{KMGTP}: 1317365760
Last sector (1318635296-1953525134, default = 1953525134) or {+-}size{KMGTP}: +636155904
Last sector (1318635296-1953525134, default = 1953525134) or {+-}size{KMGTP}: 0700
Last sector (1318635296-1953525134, default = 1953525134) or {+-}size{KMGTP}: p
Last sector (1318635296-1953525134, default = 1953525134) or {+-}size{KMGTP}: w
Last sector (1318635296-1953525134, default = 1953525134) or {+-}size{KMGTP}: y
Last sector (1318635296-1953525134, default = 1953525134) or {+-}size{KMGTP}: q
Last sector (1318635296-1953525134, default = 1953525134) or {+-}size{KMGTP}:
Current type is 'Apple HFS/HFS+'
Hex code or GUID (L to show codes, Enter = AF00):
Changed type of partition to 'Apple HFS/HFS+'
Command (? for help): L
0700 Microsoft basic data 0c01 Microsoft reserved 2700 Windows RE
3000 ONIE boot 3001 ONIE config 3900 Plan 9
4100 PowerPC PReP boot 4200 Windows LDM data 4201 Windows LDM metadata
4202 Windows Storage Spac 7501 IBM GPFS 7f00 ChromeOS kernel
7f01 ChromeOS root 7f02 ChromeOS reserved 8200 Linux swap
8300 Linux filesystem 8301 Linux reserved 8302 Linux /home
8303 Linux x86 root 8304 Linux x86-64 root (/ 8305 Linux ARM64 root
8306 Linux /srv 8307 Linux ARM32 root 8400 Intel Rapid Start
8e00 Linux LVM a500 FreeBSD disklabel a501 FreeBSD boot
a502 FreeBSD swap a503 FreeBSD UFS a504 FreeBSD ZFS
a505 FreeBSD Vinum/RAID a580 Midnight BSD data a581 Midnight BSD boot
a582 Midnight BSD swap a583 Midnight BSD UFS a584 Midnight BSD ZFS
a585 Midnight BSD Vinum a600 OpenBSD disklabel a800 Apple UFS
a901 NetBSD swap a902 NetBSD FFS a903 NetBSD LFS
a904 NetBSD concatenated a905 NetBSD encrypted a906 NetBSD RAID
ab00 Recovery HD af00 Apple HFS/HFS+ af01 Apple RAID
af02 Apple RAID offline af03 Apple label af04 AppleTV recovery
af05 Apple Core Storage bc00 Acronis Secure Zone be00 Solaris boot
bf00 Solaris root bf01 Solaris /usr & Mac Z bf02 Solaris swap
bf03 Solaris backup bf04 Solaris /var bf05 Solaris /home
bf06 Solaris alternate se bf07 Solaris Reserved 1 bf08 Solaris Reserved 2
Press the <Enter> key to see more codes: P
bf09 Solaris Reserved 3 bf0a Solaris Reserved 4 bf0b Solaris Reserved 5
c001 HP-UX data c002 HP-UX service ea00 Freedesktop $BOOT
eb00 Haiku BFS ed00 Sony system partitio ed01 Lenovo system partit
ef00 EFI System ef01 MBR partition scheme ef02 BIOS boot partition
f800 Ceph OSD f801 Ceph dm-crypt OSD f802 Ceph journal
f803 Ceph dm-crypt journa f804 Ceph disk in creatio f805 Ceph dm-crypt disk i
fb00 VMWare VMFS fb01 VMWare reserved fc00 VMWare kcore crash p
fd00 Linux RAID
Command (? for help): P
Disk /dev/disk0: 1953525168 sectors, 931.5 GiB
Logical sector size: 512 bytes
Disk identifier (GUID): 0000289E-72F6-0000-7866-000085630000
Partition table holds up to 128 entries
First usable sector is 34, last usable sector is 1953525134
Partitions will be aligned on 1-sector boundaries
Total free space is 1269542 sectors (619.9 MiB)
Number Start (sector) End (sector) Size Code Name
1 40 409639 200.0 MiB EF00 EFI system partition
2 409640 1315891423 627.3 GiB AF00 Customer
3 1315891424 1317160959 619.9 MiB AB00 Recovery HD
4 1317160960 1317365759 100.0 MiB 0700 BOOTCAMP
40 1318635296 1953525134 302.7 GiB AF00 Apple HFS/HFS+
Command (? for help): d
Partition number (1-40): 40
Command (? for help): n
Partition number (5-128, default 5): 5
First sector (34-1953525134, default = 1317365760) or {+-}size{KMGTP}: 1318635296
Last sector (1318635296-1953525134, default = 1953525134) or {+-}size{KMGTP}: 1953525134
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/disk0: 1953525168 sectors, 931.5 GiB
Logical sector size: 512 bytes
Disk identifier (GUID): 0000289E-72F6-0000-7866-000085630000
Partition table holds up to 128 entries
First usable sector is 34, last usable sector is 1953525134
Partitions will be aligned on 1-sector boundaries
Total free space is 1269542 sectors (619.9 MiB)
Number Start (sector) End (sector) Size Code Name
1 40 409639 200.0 MiB EF00 EFI system partition
2 409640 1315891423 627.3 GiB AF00 Customer
3 1315891424 1317160959 619.9 MiB AB00 Recovery HD
4 1317160960 1317365759 100.0 MiB 0700 BOOTCAMP
5 1318635296 1953525134 302.7 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/disk0.
Warning: Devices opened with shared lock will not have their
partition table automatically reloaded!
Unable to open device '/dev/disk0' for writing! Errno is 1! Aborting write!
Command (? for help): p
Disk /dev/disk0: 1953525168 sectors, 931.5 GiB
Logical sector size: 512 bytes
Disk identifier (GUID): 0000289E-72F6-0000-7866-000085630000
Partition table holds up to 128 entries
First usable sector is 34, last usable sector is 1953525134
Partitions will be aligned on 1-sector boundaries
Total free space is 1269542 sectors (619.9 MiB)
Number Start (sector) End (sector) Size Code Name
1 40 409639 200.0 MiB EF00 EFI system partition
2 409640 1315891423 627.3 GiB AF00 Customer
3 1315891424 1317160959 619.9 MiB AB00 Recovery HD
4 1317160960 1317365759 100.0 MiB 0700 BOOTCAMP
5 1318635296 1953525134 302.7 GiB 0700 Microsoft basic data
Command (? for help):