I'm attempting to mount my nearly filled up 1TB Mac OS Extended External Hard Drive to my MacBook Air 13" which is running MacOS Catalina 10.15.7. When I do this, the media drive mounts onto the computer (disk2
), but the actual drive itself (disk2s2
) is refusing to mount. Running 'First Aid' on disk2s2
results in "Invalid catalogue PEOF". sudo fsck_hfs -r -d /dev/disk2s2
returns same results.
From Disk Utility:
Running First Aid on “” (disk2s2)
Repairing file system.
Volume is already unmounted.
Performing fsck_hfs -fy -x /dev/rdisk2s2
Checking Journaled HFS Plus volume.
Invalid catalogue PEOF
The volume could not be verified completely.
File system check exit code is 8.
Restoring the original state found as unmounted.
File system verify or repair failed. : (-69845)Operation failed…
From sudo fsck_hfs -r -d /dev/disk2s2
:
journal_replay(/dev/disk2s2) returned 0 ** /dev/rdisk2s2 Using cacheBlockSize=32K cacheTotalBlock=16384 cacheSize=524288K. Executing fsck_hfs (version hfs-522.100.5). ** Checking Journaled HFS Plus volume. Invalid catalog PEOF (4, 0) ** The volume could not be verified completely. volume check failed with error 7 volume type is pure HFS+ primary MDB is at block 0 0x00 alternate MDB is at block 0 0x00 primary VHB is at block 2 0x02 alternate VHB is at block 1952853342 0x74662d5e sector size = 512 0x200 VolumeObject flags = 0x07 total sectors for volume = 1952853344 0x74662d60 total sectors for embedded volume = 0 0x00 CheckHFS returned -1317, fsmodified = 0
Please keep in mind that I'm trying to stay away from DiskWarrior or any other paid tool, so it would be amazing if it can be repaired manually or with a free tool.
Thanks!
Edit:
I've run a quick search on the disk with testdisk
. The disk with the problem is /dev/disk3
. Here's what it says:
Thu May 6 16:43:45 2021
Command line: TestDisk
TestDisk 7.1, Data Recovery Utility, July 2019
Christophe GRENIER <[email protected]>
https://www.cgsecurity.org
OS: Darwin, kernel 19.6.0 (Darwin Kernel Version 19.6.0: Tue Jan 12 22:13:05 PST 2021; root:xnu-6153.141.16~1/RELEASE_X86_64) x86_64
Compiler: GCC 4.2
ext2fs lib: none, ntfs lib: none, reiserfs lib: none, ewf lib: none, curses lib: ncurses 5.7
Hard disk list
Disk /dev/disk2 - 2000 GB / 1863 GiB - 3907029168 sectors (RO), sector size=512
Disk /dev/disk3 - 1000 GB / 931 GiB - 1953525168 sectors, sector size=512
Disk /dev/rdisk2 - 2000 GB / 1863 GiB - 3907029168 sectors (RO), sector size=512
Disk /dev/rdisk3 - 1000 GB / 931 GiB - 1953525168 sectors, sector size=512
Disk /dev/rdisk4 - 2000 GB / 1862 GiB - 488327436 sectors (RO), sector size=4096
Partition table type (auto): EFI GPT
Disk /dev/disk3 - 1000 GB / 931 GiB
Partition table type: EFI GPT
Analyse Disk /dev/disk3 - 1000 GB / 931 GiB - 1953525168 sectors
hdr_size=92
hdr_lba_self=1
hdr_lba_alt=1953525167 (expected 1953525167)
hdr_lba_start=34
hdr_lba_end=1953525134
hdr_lba_table=2
hdr_entries=128
hdr_entsz=128
Current partition structure:
1 P EFI System 40 409639 409600 [EFI System Partition]
2 P Mac HFS 409640 1953262983 1952853344
search_part()
Disk /dev/disk3 - 1000 GB / 931 GiB - 1953525168 sectors
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
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
HFSX magic value at 409640/0/1
HFSX magic value at 409640/0/1
part_size 1952853344
Mac HFS 409640 1953262983 1952853344
HFSX blocksize=4096 + Backup, 999 GB / 931 GiB
Results
P EFI System 40 409639 409600 [EFI System Partition] [EFI]
FAT32, blocksize=512, 209 MB / 200 MiB
P Mac HFS 409640 1953262983 1952853344
HFSX blocksize=4096 + Backup, 999 GB / 931 GiB
Edit 2: Disk Utility instantly fails to create an image.
Creating disk image from “ADATA HD710 Media” (disk3)
Operation cancelled.
testdisk
takes really long time to create an image. Takes 10 minutes just to finish 0.01%. This is a last resort for me. It would be better if the drive could be repaired with the data still preserved in it.
Edit 3: I'm ok if a small amount of recent data gets removed/corrupted, because they were large files being downloaded to the computer, then being transferred to the hard drive.
Edit 4: DiskDrill fails to rebuild the HFS+ catalog.
Edit 5: I've gone through the hard drive with Hex Fiend, and everything is still there. But I don't know what to change in the hex data so that the PEOF becomes correct. I can see the file names, and I can file contents in there, for example, I can see some JSON from one of my JSON files.