I have encountered a nearly identical issue to the one in this question (and this too: Data Not Backed Up, Partition Type: FFFFFFFF-FFFF-FFFF-FFFF-FFFFFFFFFFFF), but my hard drive's main partition is formatted in APFS. When I tried correcting the GUID error as shown in the answer, after reaching the step in which the following command:
gpt add -i 2 -b 409640 -s 372637568 -t APFS /disk0 had to be entered, it returned an error:
usage: gpt add [-b lba] [-i index] [-s lba] [-t uuid] device ....
I cannot boot into macOS, my computer is in internet recovery environment. What's the uuid of the new APFS format? I cannot seem to find it anywhere in the web, and my computer isn't detecting the type of the main macOS partition.
My computer's model: MacBook Pro late 2013.
My data is not backed up and I would really love to recover it.
gpt -r show disk0:
I created a MacOS High Sierra Installation disk, and rebooted to it. The new disk utility does not recognize the disk0s2 partition at all, and
diskutil list included the size of the main osx partition in
GUID_partition_scheme part of the disk. Would it be possible (and how) to recover the data of the deleted partition (s2) if I reinstalled macOS on an existing unused partition (the Linux partition disk0s4)?