2

Attempted to install Linux on my MacBook Pro 15" 2015 one day for school, but then the install failed and I had a GRUB issue similar to this: How do I recover/fix my OS X partition?.

Weirdest part was that before this I was able to boot into macOS Catalina just fine, and then after taking a look at Disk Utility (noticed swap partition exists, but not ext4) and shutting down (and then rebooting), the drive disappears.

Being shocked, I thought that deleting the Linux partition would solve my problems. WRONG (don't ask why plz). I formatted it to FAT32, then realized that did nothing. The linux partition(s) should be around 115 GB (since I allocated 40 GB for swap and 75 GB for Linux - tho I could be wrong). So, then I combined those two partitions and had a ~110 GB FAT32 partition.

I went into recovery ALT+CMD+R, and the drives couldn't be repaired.

I followed these directions: MacOS Disk Partition FFFFFFFF-FFFF-FFFF-FFFF-FFFFFFFFFFFF

However, I realized that I typed in the incorrect start and size for all of my partitions and I don't remember the size of original partitions. Now I'm just stuck wondering how I could recover the data off my drive.

My main issue is after running gpt destroy ..., how would I know the original contents and can I still recover my files?

In Disk Utility, I wiped the FAT32 partition and replaced it with APFS, but the mac partition will not mount.

I'm also quite bad with terminal commands, but I'm willing to type whatever is necessary to get the data from my computer, since there's a lot of schoolwork on it.

I'm using an OWC Aura Pro 2 TB SSD, and I'm wondering if this could also be a factor.

Output of diskutil list and gpt -r show disk1:

diskutil list

gpt -r show disk1


Edit: scratch that, I only see disk1s1 now, and that the other two partitions are gone completely:

enter image description here

enter image description here


Edit2: heres the output from running commands from klanomath (thank you!)

-bash-3.2# export LC_CTYPE="ASCII"
-bash-3.2# dd if=/dev/disk1s2 bs=512 count=1 2>/dev/null | vis -wc; 
'\M^Q9\r\M-/\^X\s\M^E\^A\0\0\0\0\0\0\0\M-7q\a\0\0\0\0\0\^A\0\0\M^@\0\0\0\0NXSB\0\^P\0\0\M-3\M-mA\^Z\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\^B\0\0\0\0\0\0\0T\M-6\^\\M-C\M-k\M-\Kk\M-(bL\M-"\M^D?\M-^Z\M-d\M-4\a\0\0\0\0\0\M-8q\a\0\0\0\0\0\^X\^A\0\0\M^\l\0\0\^Z\M^M\^B\0\0\0\0\0~\s\^B\0\0\0\0\0\M-L\0\0\0\^R\^_\0\0\M-J\0\0\0\^B\0\0\0\M-~\^^\0\0\^T\0\0\0z\M-.\a\0\0\0\0\0\M-xA\s\0\0\0\0\0\^A\^D\0\0\0\0\0\0\0\0\0\0d\0\0\0\^B\^D\0\0\0\0\0\0\^F\^D\0\0\0\0\0\0\b\^D\0\0\0\0\0\0\n\^D\0\0\0\0\0\0\f\^D\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0-bash-3.2# dd if=/dev/disk1s2 bs=512 count=1 2>/dev/
-bash-3.2# 
-bash-3.2# 
tyboi
  • 23
  • 5
  • Currently disk0 is your Recovery volume (which doesn't require an EFI) 2. Please enter export LC_CTYPE="ASCII" then dd if=/dev/diskXsY bs=512 count=1 2>/dev/null | vis -wc; echo (with diskXsY the 2nd partition of the SSD; currently disk1s2) in the terminal. Add the output of the 2nd command as text here. You can access apple stackexchange with Safari in Recovery Mode (and your credentials here)!
  • – klanomath Apr 13 '20 at 07:27
  • @klanomath woah I didn't know that was even possible! the text is posted in edit2. thank you!! – tyboi Apr 13 '20 at 18:04
  • The important part translates to 4e 58 53 42 00 10 00 00 b3 ed 41 1a 00 00 00 00 |NXSB......A.....|. This means 3,524,226,456 blocks(512) for the APFS container (~1.804 TB). The partition (disk1s2 in the screenshot 2) is too small - it should have the same size as the container! – klanomath Apr 13 '20 at 18:14
  • To fix this you have to remove the second partition of the SSD and add it slightly larger: 1st step: gpt remove -i 2 /dev/disk1 2nd step: gpt add -i 2 -b 409640 -s 3524226456 -t 7C3457EF-0000-11AA-AA11-00306543ECAC /dev/disk1. – klanomath Apr 13 '20 at 18:19
  • as soon as I saw ur previous (previous) comment without looking, I did that exactly and it worked!!!!!!! thank you so much! the drive was detected and I'm going to backup ASAP! thanks again!!! – tyboi Apr 13 '20 at 18:23
  • Did you verify disk and container scheme? (diskutil verifyDisk disk1 and diskutil verifyVolume diskX with diskX=the device identifier of the synthesized APFS container scheme - in the 1st screenshot it would be disk2. But it may change - you can get the new device number though by simply entering diskutil list) – klanomath Apr 13 '20 at 18:26
  • yup! everything seems to be correct and was successful! I was able to boot into it and everything was where it was supposed to be! – tyboi Apr 13 '20 at 18:28