Recovering/Resolving MacOS Partition Issue

How to use TestDisk to recover lost partition
Forum rules
When asking for technical support:
- Search for posts on the same topic before posting a new question.
- Give clear, specific information in the title of your post.
- Include as many details as you can, MOST POSTS WILL GET ONLY ONE OR TWO ANSWERS.
- Post a follow up with a "Thank you" or "This worked!"
- When you learn something, use that knowledge to HELP ANOTHER USER LATER.
Before posting, please read https://www.cgsecurity.org/testdisk.pdf
Locked
Message
Author
cjscheller
Posts: 2
Joined: 31 Jan 2019, 06:20

Recovering/Resolving MacOS Partition Issue

#1 Post by cjscheller »

Macbook Pro running High Sierra will not boot, diskutil repairDisk returns the following message: "Couldn't repair the partition map because a new EFI system partition couldn't be created"

Testdisk Quick Search generated following report:

Code: Select all

TestDisk 7.1-WIP, Data Recovery Utility, December 2018
Christophe GRENIER <grenier@cgsecurity.org>
https://www.cgsecurity.org
OS: Darwin, kernel 16.7.0 (Darwin Kernel Version 16.7.0: Tue Jan 30 11:27:06 PST 2018; root:xnu-3789.73.11~1/RELEASE_X86_64) x86_64
Compiler: GCC 4.0
Compilation date: 2019-01-11T07:56:50
ext2fs lib: 1.42.8, ntfs lib: libntfs-3g, reiserfs lib: 0.3.1-rc8, ewf lib: 20120504, curses lib: ncurses 5.4
Hard disk list
Disk /dev/disk0 - 500 GB / 465 GiB - 977105060 sectors (RO), sector size=512
Disk /dev/disk1 - 500 GB / 465 GiB - 122086923 sectors, sector size=4096
Disk /dev/disk2 - 500 GB / 465 GiB - 976773168 sectors (RO), sector size=512
Disk /dev/rdisk0 - 500 GB / 465 GiB - 977105060 sectors (RO), sector size=512
Disk /dev/rdisk1 - 500 GB / 465 GiB - 122086923 sectors, sector size=4096
Disk /dev/rdisk2 - 500 GB / 465 GiB - 976773168 sectors (RO), sector size=512

Partition table type (auto): EFI GPT
Media is opened in read-only.
Disk /dev/disk0 - 500 GB / 465 GiB (RO)
Partition table type: EFI GPT

Analyse Disk /dev/disk0 - 500 GB / 465 GiB - 977105060 sectors (RO)
hdr_size=92
hdr_lba_self=1
hdr_lba_alt=977105059 (expected 977105059)
hdr_lba_start=34
hdr_lba_end=977105026
hdr_lba_table=2
hdr_entries=128
hdr_entsz=128
7c3457ef 0000 11aa aa 11 00 30 65 43 ec ac
Current partition structure:
 1 P EFI System                    40     409639     409600 [EFI System Partition]
 2 P Unknown                   409640  977105023  976695384 [Macintosh HD]

search_part()
Disk /dev/disk0 - 500 GB / 465 GiB - 977105060 sectors (RO)
FAT32 at 40/0/1
check_FAT: Unusual media descriptor (0xf0!=0xf8)
FAT1 : 32-3182
FAT2 : 3183-6333
start_rootdir : 6334 root cluster : 2
Data : 6334-409599
sectors : 409600
cluster_size : 1
no_of_cluster : 403266 (2 - 403267)
fat_length 3151 calculated 3151
FAT differs, FAT sectors=608-624/3151
heads/cylinder 16 (FAT) != 1 (HD)
sect/track 32 (FAT) != 1 (HD)

FAT32 at 40/0/1
     EFI System                    40     409639     409600 [EFI System Partition] [EFI]
     FAT32, blocksize=512, 209 MB / 200 MiB
check_FAT: Bad number of sectors per cluster

       0 0000 0000 00 00 00 00 00 00 00 00
     Unknown                280550117 114451516807908 114451236257792
     WBFS, 58599 TB / 53295 TiB
       0 0000 0000 00 00 00 00 00 00 00 00
Partition not added.

LVM magic value at 293835926/0/1

Results
   P EFI System                    40     409639     409600 [EFI System Partition] [EFI]
     FAT32, blocksize=512, 209 MB / 200 MiB


dir_partition inode=0
   P EFI System                    40     409639     409600 [EFI System Partition] [EFI]
     FAT32, blocksize=512, 209 MB / 200 MiB
FAT: cluster=2(0x2), pos=6374
Directory /
       3 drwxr-xr-x     0      0         0 28-Dec-2017 18:45 EFI
    2566 drwxr-xr-x     0      0         0 12-Feb-2013 13:14 .Trashes
   78104 -rwxr-xr-x     0      0    170349 28-Dec-2017 18:45 BOOTLOG

interface_write()
 1 P EFI System                    40     409639     409600 [EFI System Partition] [EFI]

interface_write()
 1 P EFI System                    40     409639     409600 [EFI System Partition] [EFI]
simulate write!

Interface Advanced
hdr_size=92
hdr_lba_self=1
hdr_lba_alt=977105059 (expected 977105059)
hdr_lba_start=34
hdr_lba_end=977105026
hdr_lba_table=2
hdr_entries=128
hdr_entsz=128
7c3457ef 0000 11aa aa 11 00 30 65 43 ec ac
 1 P EFI System                    40     409639     409600 [EFI System Partition]
7c3457ef 0000 11aa aa 11 00 30 65 43 ec ac
 2 P Unknown                   409640  977105023  976695384 [Macintosh HD]
7c3457ef 0000 11aa aa 11 00 30 65 43 ec ac
7c3457ef 0000 11aa aa 11 00 30 65 43 ec ac
7c3457ef 0000 11aa aa 11 00 30 65 43 ec ac
7c3457ef 0000 11aa aa 11 00 30 65 43 ec ac
New options :
 Dump : No
 Align partition: Yes
 Expert mode : No

TestDisk exited normally.
Based on instructions, I'm unclear if best next steps are to use fsck to repair damaged partition or use Testdisk to write new partition. Any suggestions?

User avatar
cgrenier
Site Admin
Posts: 5432
Joined: 18 Feb 2012, 15:08
Location: Le Perreux Sur Marne, France
Contact:

Re: Recovering/Resolving MacOS Partition Issue

#2 Post by cgrenier »

Your partition table lists an Apple APFS filesystem. Since macOS High Sierra, all devices with flash storage are automatically converted to APFS.
The partition table looks OK. Do not try to repair or fix this disk using Sierra or an older version, you really need High Sierra.

cjscheller
Posts: 2
Joined: 31 Jan 2019, 06:20

Re: Recovering/Resolving MacOS Partition Issue

#3 Post by cjscheller »

Got it, thanks. I've created a bootable USB running High Sierra and have been attempting to repair. Have not had success with macOS Disk Utility repair, TestDisk, or Data Rescuse. Was going to give Disk Warrior a shot but APFS not currently supported. Any thoughts/recommendations on what I should try next?

Locked