OS X testdisk vs. pdisk "size" numbers - trying to fix parti

How to use TestDisk to recover lost partition
Post Reply
Message
Author
tomatomic
Posts: 4
Joined: 13 Jul 2015, 07:13

OS X testdisk vs. pdisk "size" numbers - trying to fix parti

#1 Post by tomatomic » 13 Jul 2015, 07:42

Hey all,

First time here,
Running a mac pro with 4 drives, multiple partitions - 2 drives for mac partitions and 2 for windows partitions,
Finally got around to trying to repair an unbootable windows installation using windows system restore.

well, windows system restore failed and in the process it seems to have initialized all my mac partitions to showing unmounted partitions named as "disk1s2", etc.

i found instructions online to use testdisk and then pdisk to fix the partition.
(http://perrohunter.com/repair-a-mac-os- ... ion-table/)

in the online instructions, he shows an example of typing in the same numbers from testdisk partition size output (sectors?) in pdisk (blocks?) and it seemed to work for him.

HOWEVER
I am getting a different "device" size of 42949672295 blocks, rather than 7814037127 sectors. This doesn't make sense, and when i try his approach I get "map is not big enough"

I should think this could be a difference in blocks vs sectors. I have a decent understanding of what blocks are, but not so much with sectors.

Does someone know how this really should work? should I and Is there a way to convert sector numbers to blocks?
Or could someone provide some information or instruction on how to proceed?


Any help would be appreciated!
Cheers,
Tom

(btw, his screencaps show he was using TestDisk 6.1, I have 7.0)

Sponsored links

User avatar
Fiona
Posts: 2836
Joined: 18 Feb 2012, 17:19
Location: Ludwigsburg/Stuttgart - Germany

Re: OS X testdisk vs. pdisk "size" numbers - trying to fix p

#2 Post by Fiona » 13 Jul 2015, 09:03

(btw, his screencaps show he was using TestDisk 6.1, I have 7.0)
Probably a very old article?
I'm not as much an apple tech savvy.
But I've had a case and it's a long time ago.
As far as I can remember, if you have to initialize your disk, you shouldn't use pdisk.
Probably disk utilities instead of?
You shouldn't modify your disk like formatting nor anything else.
Then you can use the values provided by testdisk to write your partitions using pdisk into your partition map.
Info:
http://www.cgsecurity.org/wiki/OS_Notes ... PowerPC.29

Fiona

tomatomic
Posts: 4
Joined: 13 Jul 2015, 07:13

Re: OS X testdisk vs. pdisk "size" numbers - trying to fix p

#3 Post by tomatomic » 13 Jul 2015, 17:07

Morning,

on my way to work, and checked for replies :-)

I did see you mention this pdisk shouldn't be used on intel macs.
As fas as tech savvy, I do not think disk utility will be able to do this. It may do a "quick erase" or create partitions but am unsure if it will leave the origiial partition information intact. I do have diskwarrior 5, and in theory if everything is there it can rescue the file system, but thats all i know at this point.

after work ill do what I can..

and of course, further help would be appreciated!
Thanks Fiona

Tom

tomatomic
Posts: 4
Joined: 13 Jul 2015, 07:13

Re: OS X testdisk vs. pdisk "size" numbers - trying to fix p

#4 Post by tomatomic » 13 Jul 2015, 17:29

oh, there is a terminal app in os x's os that is called diskutil - anyone have success with this?

User avatar
Fiona
Posts: 2836
Joined: 18 Feb 2012, 17:19
Location: Ludwigsburg/Stuttgart - Germany

Re: OS X testdisk vs. pdisk "size" numbers - trying to fix p

#5 Post by Fiona » 14 Jul 2015, 06:20

I did see you mention this pdisk shouldn't be used on intel macs.
Nope, pdisk shouldn't be used on an Intel Mac!
Intel Mac has no partition map but EFI GPT instead!
Do you have an Intel Mac or Power PC?
If you have an Intel Mac you should use partition table type EFI GPT.
TestDisk can write GPT partitions right into a GUID partition table.
Now there is the point where I'm unsure:
Writing a GUID partition, GUID partition table must be supported.
I've no idea would it be possible, if your drives are not initialized?

Fiona

tomatomic
Posts: 4
Joined: 13 Jul 2015, 07:13

Re: OS X testdisk vs. pdisk "size" numbers - trying to fix p

#6 Post by tomatomic » 25 Jul 2015, 00:30

I actually did use pdisk on an intel mac, and it was successful - as has many in the posts on that site I posted.

The discrepancy I found was that I was using a 4TB drive, where the block size was 4096 - once i changed the geometry before analysis, it gave me numbers that i could match with pdisk, and I was able to resurrect the partition.

I have other more important utilities running at the moment, but I will use that drive (with time machine data on it) to restore the last 2 partitions. :-)

Cheers!!!

edit:spelling

logician
Posts: 5
Joined: 24 Aug 2015, 04:18

Re: OS X testdisk vs. pdisk "size" numbers - trying to fix p

#7 Post by logician » 30 Sep 2015, 23:53

(edit)
Glad you were successful. So was I. SUCCESS! It took a bunch of work, educated guess work, and trial and error, but with the help of pdisk and DiskWarrior, I got the data back - filenames, folders and all.

It IS still appropriate to use pdisk on an Intel Mac - IF the disk being repaired was APT formatted. :ugeek:

Post Reply

Who is online

Users browsing this forum: No registered users and 3 guests