Recover deleted HFS+ Partion in Mac OS X 10.6 Snow Leopard

Joined
Feb 18, 2011
Messages
7
Reaction score
0
Points
1
While installing my drives into my new NewerTech Guardian MAXimus RAID-1 enclosure I managed to somehow mess up my 2TB Hard drive (they neglect to mention when you put your drive into the enclosure and turn it on it will erase the existing partition on them).

I believe its just the partition table, however I am not 100% sure.

So far I've tried a few utilities to recover the data:

I let DiskDrill run for 3 days and it was only able to recover only some files and with no filename or folder structure at all, I could recover some of the music, but most of my data is completely useless in this format.

I tried a second utility called TestDisk, this seemed to find the deleted partition and have the ability to write the partition back to the drive, but when I tried to write it back I got the error:

Code:
Function write_part_mac not implemented                                         
Use pdisk (Mac) or parted (Linux) to recreate the missing partition             
using values displayed by TestDisk

Now, this would be fine to use pdisk, except I'm using an Intel Mac and according to TestDisk's wiki:

pdisk is for the Mac PowerPC partition table, not for the Mac Intel partition table.

As far as I know I should be able to do it with hdiutil, but not sure how.

I tried:
Code:
hdiutil pmap /dev/disk2

I don't know what I'm doing wrong...:\

Machine Specs:
MacPro3,1 (Intel)
Mac OS X 10.6.6 SL

Drive Specs:
Disk Description: Hitachi HDS722020ALA330 Media
Total Capacity: 2 TB (2,000,398,934,016 Bytes)
Connection Bus: SATA
Write Status: Read/Write
Connection Type: Internal
S.M.A.R.T. Status: Verified
Connection ID: "Bay 3"
Partition Map Scheme: Unformatted

Test Disk Results:

TestDisk 6.12-WIP, Data Recovery Utility, October 2010
Christophe GRENIER <[email protected]>
Main Page - CGSecurity

Disk /dev/disk2 - 2000 GB / 1863 GiB - CHS 3907029168 1 1
Partition Start End Size in sectors
>P HFS 409640 3906766951 3906357312
P HFS 3906766984 3907029127 262144
 

chscag

Well-known member
Staff member
Admin
Joined
Jan 23, 2008
Messages
65,248
Reaction score
1,833
Points
113
Location
Keller, Texas
Your Mac's Specs
2017 27" iMac, 10.5" iPad Pro, iPhone 8, iPhone 11, iPhone 12 Mini, Numerous iPods, Monterey
Give this a try: LINK Partition recovery is not an exact science when dealing with HFS+ (as you found out). If you can rewrite the partition table or at least recover the partition intact, that would make file recovery much easier. Let us know how it goes.
 
OP
O
Joined
Feb 18, 2011
Messages
7
Reaction score
0
Points
1
This software's "Display default volume(s)" and "Scan for volume(s)" show no drives.

Called Apple, not only were they of almost no help at all, and did the usual of recommending overpriced data-recovery centers, they said that pdisk was no longer used and with the "upgrade" of their operating system, it was removed, with no replacement added...SOME UPGRADE.
 

chscag

Well-known member
Staff member
Admin
Joined
Jan 23, 2008
Messages
65,248
Reaction score
1,833
Points
113
Location
Keller, Texas
Your Mac's Specs
2017 27" iMac, 10.5" iPad Pro, iPhone 8, iPhone 11, iPhone 12 Mini, Numerous iPods, Monterey
Sorry to hear that. The only other suggestion I have is to try a good Data Recovery application and recover what you can from the drive.

Data Rescue 3 from Prosoft is about as good as it gets. A bit pricey at $99 but you can give their trial version a run first to see if it can do any better.
 
OP
O
Joined
Feb 18, 2011
Messages
7
Reaction score
0
Points
1
I am trying a program called GPT fdisk, it seems it might be of help, seems to be the program to fix my issue, but documentation on it seems scarce.

I have tried all the recovery software there is, all i need to do is recover a partition table, not bit by bit data, that's days of running...

Does no one know how to recover a GPT?

There seems to be some weird issues between GPT fdisk and TestDisk...

no matter what i do in GPT fdisk:

Number Start (sector) End (sector) Size Code Name
1 2048 409639 199.0 MiB EF00 EFI System
2 411648 3907029127 1.8 TiB AF00 Apple HFS/HFS+


TestDisk still says:
Partition Start End Size in sectors
>P HFS 409640 3906766951 3906357312
P HFS 3906766984 3907029127 262144


If you notice, those are both totally different partition layouts, yet, both claim theirs exists :[
 
OP
O
Joined
Feb 18, 2011
Messages
7
Reaction score
0
Points
1
Just wanted to say I successfully recovered the partition by using the identical drive I had (for the RAID-1 enclosure). I formatted the identical drive and copied the partition table for it and viola, fixed EVERYTHING, no 3-4 days of deep scanning with $100+ applications to recover only a 10th of what I lost, no lost data at all.

Thanks chscag for the prompt responses and attempt to help me. Much appreciated.

I must say, I'm rather disappointed that both Apple Support and mac users don't seem to deal with this type of issue more often. It seems to me this is a very common problem, caused by a simple reformat, or deleting of a partition, an easy fix.

Well, either way, glad I beat the odds and recovered EVERYTHING. First thing Monday is to give NewerTech a peice of my mind...
 

chscag

Well-known member
Staff member
Admin
Joined
Jan 23, 2008
Messages
65,248
Reaction score
1,833
Points
113
Location
Keller, Texas
Your Mac's Specs
2017 27" iMac, 10.5" iPad Pro, iPhone 8, iPhone 11, iPhone 12 Mini, Numerous iPods, Monterey
Glad it worked out for you. Actually, that was a very good solution, one that slipped by me.

I'm also a bit disappointed in the availability of recovery software for the Mac since there is so much out there for Windows. Even free. However, having dealt with Unix for years in the business world, it was rare to lose partitions and files. Perhaps that's the reason.

Anyway, have fun and visit us often.
 
Joined
Feb 1, 2011
Messages
4,433
Reaction score
2,148
Points
113
Location
Sacramento, California
I'm also a bit disappointed in the availability of recovery software for the Mac since there is so much out there for Windows.

There's a lot of recovery software available for the Macintosh, too. Though I'm not sure that I would trust every program that is available. (Which I'm sure is also the case for Windows.)

See:
http://www.mac-forums.com/forums/os...h-os-x-data-recovery-options.html#post1180402

___________________________________________

Randy B. Singer
Co-author of The Macintosh Bible (4th, 5th, and 6th editions)

Macintosh OS X Routine Maintenance
OS X Maintenance And Troubleshooting
___________________________________________
 

chscag

Well-known member
Staff member
Admin
Joined
Jan 23, 2008
Messages
65,248
Reaction score
1,833
Points
113
Location
Keller, Texas
Your Mac's Specs
2017 27" iMac, 10.5" iPad Pro, iPhone 8, iPhone 11, iPhone 12 Mini, Numerous iPods, Monterey
I probably should have been more specific. While there is recovery software for OS X available (actually more than I thought) it's usually more expensive than the Windows counterpart. And there is more free recovery software available for Windows. However, as I said above it's rare to lose partitions and files in Unix. As a matter of fact, all the years working with VAX-VMS and some older AT&T Unix systems, I can't remember ever losing a partition.
 
Joined
Aug 12, 2011
Messages
1
Reaction score
0
Points
1
Can you explain in more detail?

Just wanted to say I successfully recovered the partition by using the identical drive I had (for the RAID-1 enclosure). I formatted the identical drive and copied the partition table for it and viola, fixed EVERYTHING, no 3-4 days of deep scanning with $100+ applications to recover only a 10th of what I lost, no lost data at all.

I have a similar problem - I accidentally erased the 1.0 TB disk I had been using for Time Machine backups of a few different computers. Before I erased the disk, a single GUID HFS+ data partition occupied the disk (other than, presumably, a small EFI partition, right?). The disk was "erased" in Disk Utility and renamed, but I have not written to the disk at all, and I believe all of the data is still there but the partition table(s) have been overwritten.

I would gladly buy a new, blank, identical 1.0 TB disk if, as your post seems to indicate, that would somehow enable me to recover my 600+ GB of Time Machine Backups which, when I looked at them with the PhotoRec utility, looked like a jumbled mess.

Does my case sound like it could be solved the same way you solved yours, oxnard? If so, do you mind explaining in a bit more detail what my recovery would entail?

Thanks ton.
 

BBG


Joined
Jun 30, 2012
Messages
1
Reaction score
0
Points
1
How do I recreate a missing partition using pdisk

I have run testdisk, and it has displayed a message stating that I need to recreate the missing partiton in pdisk.

How do i recreate the partition with this information in pdisk?

The following is a screen dump of the information in testdisk:


~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
TestDisk 6.14-WIP, Data Recovery Utility, May 2012
Christophe GRENIER <[email protected]>
CGSecurity

Disk /dev/disk5 - 500 GB / 465 GiB - CHS 976773168 1 1
Partition Start End Size in sectors
>P DOS_FAT_32 40 409639 409600 [EFI]
P HFS 409640 682050279 681640640
P HFS 682050280 683319823 1269544
P HFS 975503584 976773127 1269544

Structure: Ok. Use Up/Down Arrow keys to select partition.
Use Left/Right Arrow keys to CHANGE partition characteristics:
P=Primary D=Deleted
Keys A: add partition, L: load backup, T: change type, P: list files,
Enter: to continue
FAT32, blocksize=512, 209 MB / 200 MiB

Function write_part_mac not implemented
Use pdisk (Mac) or parted (Linux) to recreate the missing partition
using values displayed by TestDisk
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

How do i recreate the partition with this information in pdisk?
 
Joined
Aug 24, 2010
Messages
3
Reaction score
0
Points
1
Hello I'm having the same problem, but I don't have a identical drive, I was thinking I could make a clone of this HD, but I don't a equal HD to make this clone... I only have a 2TB Seagate green.. and the drive in question is a 1TB G-Drive... I don't now what I can do.... any suggestion?

thanks
 
OP
O
Joined
Feb 18, 2011
Messages
7
Reaction score
0
Points
1
I feel it is neccessary to mention that I believe the reason I was able to fix my problem so simply was that
I had an identical drive to copy the partition from (this was just random chance that I was setting up a raid array and had purchased 2 identical drives.)

While I believe it would be possible to do this without having identical drives or even drives of the same size (seems to me like you could copy the partition table off a freshly formatted drive, in the same format as the recovery drive, then just extend the partition to the end of the recovery drive), I do not know if this will work in reality. Another possible solution might be to build the recovery partition table manually? However again, I am not sure how this would work. It would take a smarter man than I.

Feel free to continue to pm me your questions, but I don't want to mislead people into false hope, I do not believe this post has successfully helped ANYONE recover data besides me, I'm very sorry for this...
 
Joined
Mar 20, 2014
Messages
1
Reaction score
0
Points
1
Steps you did?

Well that's weird, this thread hasn't had a post in exactly a year. Searched for

Code:
Function write_part_mac not implemented
Use pdisk (Mac) or parted (Linux) to recreate the missing partition
using values displayed by TestDisk

... and was brought here.

oxnard, do you remember how to perform those steps? I happen to have access to a drive that the same as the one that failed on me....
 
OP
O
Joined
Feb 18, 2011
Messages
7
Reaction score
0
Points
1
Well that's weird, this thread hasn't had a post in exactly a year. Searched for

Code:
Function write_part_mac not implemented
Use pdisk (Mac) or parted (Linux) to recreate the missing partition
using values displayed by TestDisk

... and was brought here.

oxnard, do you remember how to perform those steps? I happen to have access to a drive that the same as the one that failed on me....

Sadly it was many years ago and your guess is as good as mine, the steps above are the most aid i can offer, i know the reason i was able to do it was because i had the same identical drive and had partitioned the entire thing into one big drive, so when i formatted the other the same way, i could duplicate it's partition table and the drive knew were everthing was., hope this helps you.
 
Joined
Mar 26, 2007
Messages
3
Reaction score
0
Points
1
This is a very old thread, and I'm sorry--but I just went through this and have a solution that I couldn't find immediately. I deleted my GPT partition table on my system Mac OS X hard drive using a misguided "clean" command with diskpart while trying to install Windows 7 on a bootcamp partition. I had to make a bootable CD that could run Testdisk and gdisk, and the Parted Magic recovery environment on the Ultimate Boot CD worked great for me:

Ultimate Boot CD - Overview

I mainly used this site as a source:

Mac GPT partition table recovery

I used Testdisk in Parted Magic to figure out what my GPT partition table should look like. In my case, the output looked like this:

partition start end size in sectors
p hfs 409640 1400654471 1400244832
p hfs 1401379592 1402649127 1269536
p hfs 1463879592 1465149127 1269536

Unfortunately, Testdisk will not write these Apple partition tables, giving an error:

"function write_part_mac not implemented
use pdisk (mac) or parted (linux) to recreate the missing partition using values displayed by test disk"

gdisk is another command line tool in Parted Magic that will make your GPT for you. Create a new table, change your default sector size from 2048 to 1 using the expert settings (since you know your partitions precisely), and use the well-documented commands to make a new partition table. Obviously, the big one in the middle is going to be the most important to you to get yourself booting again.

Once I had the GPT looking like my Testdisk output, I used the w command to write the GPT and rebooted into the glorious Mac OS X desktop I know and love.
 

Shop Amazon


Shop for your Apple, Mac, iPhone and other computer products on Amazon.
We are a participant in the Amazon Services LLC Associates Program, an affiliate program designed to provide a means for us to earn fees by linking to Amazon and affiliated sites.
Top