recover data from FFFFF partition inside an external drive
A few weeks ago, I deleted my Linux partition of my Mac because I was running out of space. After that, I couldn't boot my OS anymore. Because I depend on my computer to work, I decided to backup my whole volume as it was to an external drive and format my Mac.
Now with my Mac working, once I mount my volume backup from the external drive, I can see something like below:
bash-3.2$ diskutil list
/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_APFS Container disk1 250.8 GB disk0s2
/dev/disk1 (synthesized):
#: TYPE NAME SIZE IDENTIFIER
0: APFS Container Scheme - +250.8 GB disk1
Physical Store disk0s2
1: APFS Volume Macintosh HD - Data 74.4 GB disk1s1
2: APFS Volume Preboot 325.8 MB disk1s2
3: APFS Volume Recovery 613.8 MB disk1s3
4: APFS Volume VM 1.1 MB disk1s4
5: APFS Volume Macintosh HD 15.1 GB disk1s5
6: APFS Snapshot com.apple.os.update-... 15.1 GB disk1s5s1
/dev/disk2 (external, physical):
#: TYPE NAME SIZE IDENTIFIER
0: FDisk_partition_scheme *1.0 TB disk2
1: Apple_HFS Seagate Expansi 1.0 TB disk2s1
/dev/disk3 (disk image):
#: TYPE NAME SIZE IDENTIFIER
0: GUID_partition_scheme +251.0 GB disk3
1: EFI EFI 209.7 MB disk3s1
2: FFFFFFFF-FFFF-FFFF-FFFF-FFFFFFFFFFFF 220.8 GB disk3s2
(free space) 30.0 GB -
My question is: Is there any way of getting my data that was once in Macintosh HD ? How can I do that ??
I managed to resolve that. For those who are interested here is the solution:
Install gdisk with the following command:
brew install gdisk
After that, run gdisk passing the disk that has the FFFFFFFF-FFFF-FFFF-FFFF-FFFFFFFFFFFF.
sudo gdisk /dev/disk3
Then you will be prompted with the following questions. Answer like I did below.
Command (? for help): t
Partition number (1-3): 2 // This is because the partition 2 has FFFF (see question)
Current type is 'Unknown'
Hex code or GUID (L to show codes, Enter = AF00): AF0A
Changed type of partition to 'Apple APFS'
Command (? for help): w
Final checks complete. About to write GPT data. THIS WILL OVERWRITE EXISTING
PARTITIONS!!
Do you want to proceed? (Y/N): y
After that your volume will not be FFFFFFFF-FFFF-FFFF-FFFF-FFFFFFFFFFFF anymore and you will be able to mount it and get your files back.