Hi, I have tried the same way but it didn't worked for me in the last 2 steps(Check the last 4 lines):
Can you help in providing some workaround for this.
Last login: Mon Jan 30 17:48:12 on ttys000
MaddyApples-MacBook-Pro:~ MaddyApple$ sudo gpt -r -vv show disk0
Password:
gpt show: disk0: mediasize=500107862016; sectorsize=512; blocks=976773168
gpt show: disk0: Suspicious MBR at sector 0
gpt show: disk0: Pri GPT at sector 1
gpt show: disk0: Sec GPT at sector 976773167
start size index contents
0 1 MBR
1 1 Pri GPT header
2 32 Pri GPT table
34 6
40 409600 1 GPT part - C12A7328-F81F-11D2-BA4B-00A0C93EC93B
409640 682125496 2 GPT part - 48465300-0000-11AA-AA11-00306543ECAC
682535136 1269536 3 GPT part - 426F6F74-0000-11AA-AA11-00306543ECAC
683804672 292968448 4 GPT part - EBD0A0A2-B9E5-4433-87C0-68B6B72699C7
976773120 15
976773135 32 Sec GPT table
976773167 1 Sec GPT header
MaddyApples-MacBook-Pro:~ MaddyApple$ sudo fdisk /dev/disk0
Disk: /dev/disk0 geometry: 60801/255/63 [976773168 sectors]
Signature: 0xAA55
Starting Ending
#: id cyl hd sec - cyl hd sec [ start - size]
------------------------------------------------------------------------
1: EE 1023 254 63 - 1023 254 63 [ 1 - 409639] <Unknown ID>
2: AF 1023 254 63 - 1023 254 63 [ 409640 - 682125496] HFS+
3: AB 1023 254 63 - 1023 254 63 [ 682535136 - 1269536] Darwin Boot
4: 0C 1023 254 63 - 1023 254 63 [ 683804672 - 292968448] Win95 FAT32L
MaddyApples-MacBook-Pro:~ MaddyApple$ sudo fdisk -e /dev/disk0
Password:
fdisk: could not open MBR file /usr/standalone/i386/boot0: No such file or directory
Enter 'help' for information
fdisk: 1> p
Disk: /dev/disk0 geometry: 60801/255/63 [976773168 sectors]
Offset: 0 Signature: 0xAA55
Starting Ending
#: id cyl hd sec - cyl hd sec [ start - size]
------------------------------------------------------------------------
1: EE 1023 254 63 - 1023 254 63 [ 1 - 409639] <Unknown ID>
2: AF 1023 254 63 - 1023 254 63 [ 409640 - 682125496] HFS+
3: AB 1023 254 63 - 1023 254 63 [ 682535136 - 1269536] Darwin Boot
4: 0C 1023 254 63 - 1023 254 63 [ 683804672 - 292968448] Win95 FAT32L
fdisk: 1> setpid 4
Starting Ending
#: id cyl hd sec - cyl hd sec [ start - size]
------------------------------------------------------------------------
4: 0C 1023 254 63 - 1023 254 63 [ 683804672 - 292968448] Win95 FAT32L
Partition id ('0' to disable) [0 - FF]: [C] (? for help) 07
fdisk:*1> flag 4
Partition 4 marked active.
fdisk:*1> p
Disk: /dev/disk0 geometry: 60801/255/63 [976773168 sectors]
Offset: 0 Signature: 0xAA55
Starting Ending
#: id cyl hd sec - cyl hd sec [ start - size]
------------------------------------------------------------------------
1: EE 1023 254 63 - 1023 254 63 [ 1 - 409639] <Unknown ID>
2: AF 1023 254 63 - 1023 254 63 [ 409640 - 682125496] HFS+
3: AB 1023 254 63 - 1023 254 63 [ 682535136 - 1269536] Darwin Boot
*4: 07 1023 254 63 - 1023 254 63 [ 683804672 - 292968448] HPFS/QNX/AUX
fdisk:*1> write
fdisk: /dev/disk0: Operation not permitted
MaddyApples-MacBook-Pro:~ MaddyApple$ y
-bash: y: command not found