I have Macbook pro with mavericks and 512GB SSD i accidentally deleted a partition and suddenly my mac could not boot any more and after i tried to do something with disk utility this is gpt -r show disk0
command output:
start size index contents
0 1 PMBR
1 1 Pri GPT header
2 32 Pri GPT table
34 409606
409640 823778456 1 GPT part - 48465300-0000-11AA-AA11-00306543ECAC
824188096 1269536 2 GPT part - 426F6F74-0000-11AA-AA11-00306543ECAC
825457632 24695840
850153472 126951424 3 GPT part - C12A7328-F81F-11D2-BA4B-00A0C93EC93B
977104896 131
977105027 32 Sec GPT table
977105059 1 Sec GPT header
So i followed the soultion on this link and do this command sudo gpt remove -i 1 disk0
then i countinued with this command:
sudo gpt add -b 40 -i 1 -s 409600 -t C12A7328-F81F-11D2-BA4B-00A0C93EC93B disk0
and the gpt -r show disk0
command output become like this:
start size index contents
0 1 PMBR
1 1 Pri GPT header
2 32 Pri GPT table
34 6
40 409600 1 GPT part - C12A7328-F81F-11D2-BA4B-00A0C93EC93B
409640 823778456
824188096 1269536 2 GPT part - 426F6F74-0000-11AA-AA11-00306543ECAC
825457632 24695840
850153472 126951424 3 GPT part - C12A7328-F81F-11D2-BA4B-00A0C93EC93B
977104896 131
977105027 32 Sec GPT table
977105059 1 Sec GPT header
and i realized i deleted Macintosh HD volume index so i kept manipulating the table until the gpt -r show disk0
command output becomes like this
start size index contents
0 1 PMBR
1 1 Pri GPT header
2 32 Pri GPT table
34 6
40 409600 1 GPT part - C12A7328-F81F-11D2-BA4B-00A0C93EC93B
409640 823778456 2 GPT part - 48465300-0000-11AA-AA11-00306543ECAC
824188096 1269536 3 GPT part - 426F6F74-0000-11AA-AA11-00306543ECAC
825457632 151647395
977105027 32 Sec GPT table
977105059 1 Sec GPT header
but still have the same problem here i did this command dd if=/dev/disk0s2 of=/Volumes/APP/Mac.iso
to backup this volume in external HDD and i tried to open this iso with peazip in windows vista but i can not see nothing inside did i backup my data with the command i mentioned? and how can i get the data out of Mac.iso file?
then i tried this command newfs_msdos -v EFI /dev/disk0s1
and suddenly the SDD turns to MBR and no volumes there, so i used command to create gpt table and this was successfully done and i make the changes to go to the original table also i play with disk utility and this is my current situation:
diskutil list disk0
command output:
#: TYPE NAME SIZE IDENTIFIER
0: GUID_partition_scheme *500.3 GB disk0
1: Apple_HFS 421.8 GB disk0s1
2: Apple_Boot 650.0 MB disk0s2
3: Apple_HFS Untitled 2 12.5 GB disk0s3
4: EFI 65.0 GB disk0s4
and this is gpt -r show disk0
output:
start size index contents
0 1 PMBR
1 1 Pri GPT header
2 32 Pri GPT table
34 409606
409640 823778456 1 GPT part - 48465300-0000-11AA-AA11-00306543ECAC
824188096 1269536 2 GPT part - 426F6F74-0000-11AA-AA11-00306543ECAC
825457632 24433696 3 GPT part - 48465300-0000-11AA-AA11-00306543ECAC
849891328 262144
850153472 126951424 4 GPT part - C12A7328-F81F-11D2-BA4B-00A0C93EC93B
977104896 131
977105027 32 Sec GPT table
977105059 1 Sec GPT header
Now, the Macintosh HD volume shows in disk utility as disk0s1 and it is not mountable and also i tried linux live cd and gparted (disk management application) could not recognize volumes types accept for Untitled 2 volume that i created with disk utility not by using commands.
Please help me in fixing my problem to enter OS X and my data or in mounting Macintosh HD volume and put volumes types without format because i want to backup my data before re-install OS X.
Thank you.
Best Answer
If you have a spare linux box you can try to use SystemRescueCD to mount and possibly recover the data on your Mac (hfs+) partitions.
The SystemRescueCD contains TestDisk which I have used to recover data from Linux, Windows as well as Mac file systems:
I think there is also a TestDisk Mac app you can install and run from a Mac OS computer, so as long as you can mount your bad drive you can use TaskDisk to try to receover the data. But I have not tried this so you might have to test it out first on a dummy drive before working on your real drive.