Page 1 of 1

Function write_part_mac not implemented...

Posted: 22 Dec 2014, 05:20
by waldoctg
I need to recover my last partition for my Mac... I may have over written it with the 7 swipe, but I cannot remember. Would that be a problem?

Anyways, when I try to "write" the partition (I found the one I need using "deeper search"), I receive this error:

Code: Select all

Function write_part_mac not implemented
Use pdisk to recreate the missing partition
using values displayed by TestDisk
I found here that pdisk repairs the partition table... But I want to restore a partition, not repair a partition table... (used this tut: http://perrohunter.com/repair-a-mac-os- ... ion-table/)

Also, I found this forum post with something having this problem, but as you can see, it isn't very helpful... http://forum.cgsecurity.org/phpBB3/post ... nted#p7519

Re: Function write_part_mac not implemented...

Posted: 22 Dec 2014, 08:43
by cgrenier
All Mac are using EFI GPT partition table for the last 10 years.
Please post the content of your testdisk.log file after Analyse, Quick Search.

Re: Function write_part_mac not implemented...

Posted: 10 Mar 2015, 00:43
by lakonis
I encounter the same problem: "Function write_part_mac not implemented" with a recent macbook pro and with testdisk 7.0, running from the mac itself looking at an external harddrive (1To)
Here is the log file result, where testdisk has correctly found the partition to be repaired, but is not able to write the repair.
Your diagnostic is much welcomed.
For your information, testdisk suggested to use pdisk, which I did, writing a new partition according to testdisk results but the Mac still cannot mount properly the external HD. Running testdisk again logged the following :

Code: Select all

Mon Mar  9 23:41:49 2015
Command line: TestDisk

TestDisk 7.0-WIP, Data Recovery Utility, March 2015
Christophe GRENIER <grenier@cgsecurity.org>
http://www.cgsecurity.org
OS: Darwin, kernel 11.4.2 (Darwin Kernel Version 11.4.2: Thu Aug 23 16:25:48 PDT 2012; root:xnu-1699.3
Compiler: GCC 4.0
Compilation date: 2015-03-09T19:49:27
ext2fs lib: 1.42.8, ntfs lib: libntfs-3g, reiserfs lib: 0.3.1-rc8, ewf lib: 20120504
Hard disk list
Disk /dev/disk0 - 500 GB / 465 GiB - 976773168 sectors (RO), sector size=512
Disk /dev/disk1 - 1000 GB / 931 GiB - 1953525168 sectors, sector size=512
Disk /dev/rdisk0 - 500 GB / 465 GiB - 976773168 sectors (RO), sector size=512
Disk /dev/rdisk1 - 1000 GB / 931 GiB - 1953525168 sectors, sector size=512

Partition table type (auto): Mac
Disk /dev/disk1 - 1000 GB / 931 GiB
Partition table type: Mac

Analyse Disk /dev/disk1 - 1000 GB / 931 GiB - 1953525168 sectors

HFS+ magic value at 263968/0/1

HFS+ magic value at 263968/0/1
Current partition structure:
 1 P partition_map                  1         63         63
 2 P Free                          64     263967     263904
 3 P HFS                       263968 1953525151 1953261184
 4 P Free                  1953525152 1953525167         16

search_part()
Disk /dev/disk1 - 1000 GB / 931 GiB - 1953525168 sectors

HFS+ magic value at 263968/0/1

HFS+ magic value at 263968/0/1
part_size 1953261184
     HFS                       263968 1953525151 1953261184
     HFS+ blocksize=4096 + Backup, 1000 GB / 931 GiB

Results
   P HFS                       263968 1953525151 1953261184
     HFS+ blocksize=4096 + Backup, 1000 GB / 931 GiB

interface_write()
   P HFS                       263968 1953525151 1953261184
Function write_part_mac not implemented

Interface Advanced

HFS+ magic value at 263968/0/1

HFS+ magic value at 263968/0/1
 1 P partition_map                  1         63         63
 2 P Free                          64     263967     263904
 3 P HFS                       263968 1953525151 1953261184
     HFS+ blocksize=4096 + Backup, 1000 GB / 931 GiB
 4 P Free                  1953525152 1953525167         16

HFS_HFSP_boot_sector
 3 P HFS                       263968 1953525151 1953261184
     HFS+ blocksize=4096 + Backup, 1000 GB / 931 GiB

HFS+ magic value at 263968/0/1

HFS+ magic value at 263968/0/1
Volume header
HFS+ OK

Backup volume header
HFS+ OK

Sectors are not identical.
New options :
 Dump : No
 Align partition: Yes
 Expert mode : No

Interface Advanced

HFS+ magic value at 263968/0/1

HFS+ magic value at 263968/0/1
 1 P partition_map                  1         63         63
 2 P Free                          64     263967     263904
 3 P HFS                       263968 1953525151 1953261184
     HFS+ blocksize=4096 + Backup, 1000 GB / 931 GiB
 4 P Free                  1953525152 1953525167         16

Analyse Disk /dev/disk1 - 1000 GB / 931 GiB - 1953525168 sectors

HFS+ magic value at 263968/0/1

HFS+ magic value at 263968/0/1
Current partition structure:
 1 P partition_map                  1         63         63
 2 P Free                          64     263967     263904
 3 P HFS                       263968 1953525151 1953261184
 4 P Free                  1953525152 1953525167         16

search_part()
Disk /dev/disk1 - 1000 GB / 931 GiB - 1953525168 sectors

HFS+ magic value at 263968/0/1

HFS+ magic value at 263968/0/1
part_size 1953261184
     HFS                       263968 1953525151 1953261184
     HFS+ blocksize=4096 + Backup, 1000 GB / 931 GiB

Results
   P HFS                       263968 1953525151 1953261184
     HFS+ blocksize=4096 + Backup, 1000 GB / 931 GiB

interface_write()
   P HFS                       263968 1953525151 1953261184
simulate write!

TestDisk exited normally.

Re: Function write_part_mac not implemented...

Posted: 10 Mar 2015, 07:57
by cgrenier
The partition table looks ok but honestly as written previsouly, uses EFI GPT.

Re: Function write_part_mac not implemented...

Posted: 10 Mar 2015, 08:03
by lakonis
Thank you, that's certainly a good idea but I don't know what it means :)
should i do something specific or do you mean that with such configuration (EFI GPT), there is nothing you can do ?
N.

Re: Function write_part_mac not implemented...

Posted: 10 Mar 2015, 11:14
by lakonis
I'm not sure if this is a good input, but testdisk clearly "discover" the lost partition with a blocksize=4096, whereas the pdisk (and maybe the testdisk's writing) processes 512 blocksize.

Am I correct ? Does is sound like a possible source of error ?

Code: Select all

Results
   P HFS                       263968 1953525151 1953261184
     HFS+ blocksize=4096 + Backup, 1000 GB / 931 GiB

Re: Function write_part_mac not implemented...

Posted: 14 Mar 2015, 14:31
by lakonis
Since Testdisk has found the lost partition properly, I am still hoping to retrieve my disk and datas as it was.
Yet, it doesn't work and I still haven't figured out why the well found partition cannot be written.

Could it be that some sectors are defective ?
Another cue could be that Testdisk doesn't deal properly with 4096 block size ?

Any idea could be a great help to pursue. Thanks!
la.