I am trying to recover an external drive (Western Digital, MyPassport, 4TB, WDBYFT0040BBK-0A) formatted in HFS+.
/dev/disk0 (internal, physical):
#: TYPE NAME SIZE IDENTIFIER
0: GUID_partition_scheme *251.0 GB disk0
1: EFI EFI 209.7 MB disk0s1
2: Apple_HFS Macintosh HD 250.1 GB disk0s2
3: Apple_Boot Recovery HD 650.0 MB disk0s3
/dev/disk1 (external, physical):
#: TYPE NAME SIZE IDENTIFIER
0: *4.0 TB disk1
➜ ~ diskutil repairDisk disk1
Nonexistent, unknown, or damaged partition map scheme
If you are sure this disk contains a (damaged) APM, MBR, or GPT partition map,
you can hereby try to repair it enough to be recognized as a map; another
"diskutil repairDisk disk1" might then be necessary for further repairs
Proceed? (y/N) y
Error repairing map: MediaKit reports bad partition or no map found (-5324)
I tried Hard drive no longer accessible and every related solution from @klanomath.
gpt
gives me the following:
➜ ~ sudo gpt -r show disk1
Password:
gpt show: unable to open device 'disk1': Input/output error
I also used gdisk
where I confirmed an invalid partition table.
➜ ~ sudo gdisk /dev/disk1
GPT fdisk (gdisk) version 1.0.4
Caution: invalid main GPT header, but valid backup; regenerating main header
from backup!
Warning! Read error 5! Misbehavior now likely!
Caution! After loading partitions, the CRC doesn't check out!
Caution! After loading partitions, the CRC doesn't check out!
Warning! Error 5 reading partition table for CRC check!
Warning! One or more CRCs don't match. You should repair the disk!
Main header: ERROR
Backup header: OK
Main partition table: ERROR
Backup partition table: ERROR
Partition table scan:
MBR: not present
BSD: not present
APM: not present
GPT: damaged
Found invalid MBR and corrupt GPT. What do you want to do? (Using the
GPT MAY permit recovery of GPT data.)
1 - Use current GPT
2 - Create blank GPT
Your answer: 1
Command (? for help): p
Disk /dev/disk1: 7813969920 sectors, 3.6 TiB
Sector size (logical): 512 bytes
Disk identifier (GUID): 770B430F-0A25-45EC-8CEF-2808B061016B
Partition table holds up to 128 entries
Main partition table begins at sector 2 and ends at sector 33
First usable sector is 34, last usable sector is 7813969886
Partitions will be aligned on 2048-sector boundaries
Total free space is 7813969853 sectors (3.6 TiB)
Number Start (sector) End (sector) Size Code Name
Command (? for help):
Using testdisk
I had:
Disk /dev/rdisk1 - 4000 GB / 3725 GiB - 7813969920 sectors
Partition Start End Size in sectors
1 P EFI System 40 409639 409600 [EFI System Partitio
2 P Mac HFS 409640 7813707735 7813298096