Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

AshFriedrich

macrumors newbie
Original poster
Jul 25, 2015
26
2
My Macbook Pro (2012, latest Mojave) started having some hickups not long ago where the screen would freeze for a minute or two and then go back to normal. Then one time it just got really slow and froze up every 10 seconds so I tried to shut it down but it would only shut down to a black screen with the mouse pointer still on the screen and stayed there for over an hour. I decided to force it to power off by holding the power button but when I turned it back on I then got the dreaded "no entry" sign. I held cmd+v for verbose and got told that it could not find the APFS boot partition.

My 3 year old SSD is 1TB, partitioned into OS (apfs) and MEDIA (hfs+). Connecting the drive to another computer the MEDIA partition still mounts fine but not OS. In disk utility OS is greyed out and displays a different name (see image) but not AppleAPFSMedia which I assume is the container?


Screenshot 2021-10-15 at 16.09.25.png



Trying to run First Aid on the OS partition gives me this:

Code:
Running First Aid on “” (disk2s2)

Repairing storage system
Performing fsck_apfs -y -x /dev/disk2s2
Checking the container superblock.
Checking the EFI jumpstart record.
error: (oid 0x401) nr: invalid o_oid (0x7d11eb)
error: (oid 0x401) nr: invalid o_type (0x80000003, expected 0x80000011)
error: verification/reading of the nx_reaper object failed: Illegal byte sequence
The volume /dev/disk2s2 could not be verified completely.
Storage system check exit code is 8.
Storage system verify or repair failed. : (-69716)

Operation failed…

Trying to run First Aid on the AppleAPFSMedia gives me this:

Code:
Running First Aid on “AppleAPFSMedia” (disk3)

Fixing damaged partition map.
Invalid disk.

Operation failed…


I have now run a full backup with Disk Drill which seems to find probably all the files on the OS partition.

Is the SSD maybe old and gone or is this only the partition map, EFI or something that needs a fix? Anyone have an idea how I can go about troubleshooting this further or how to fix the partition map?
 
I'll bump this with some more information that I'm unsure what to do with as this is still unresolved for me and it seems I'm at risk of loosing a lot of data.

In this stackexchange post it is suggested to remove and create GPT entries but the values in the example are specific to his case. I need help understanding what values to use and which GPT entries to remove and add.

I will provide the same information that the original poster linked above did:

This is the result of diskutil list disk2

Code:
/dev/disk2 (external, physical):
   #:                       TYPE NAME                    SIZE       IDENTIFIER
   0:      GUID_partition_scheme                        *1.0 TB     disk2
   1:                        EFI EFI                     209.7 MB   disk2s1
   2:                 Apple_APFS Container disk3         377.0 GB   disk2s2


This is the result of sudo gpt -r show disk2

Code:
gpt show: disk2: Suspicious MBR at sector 0
       start        size  index  contents
           0           1         MBR
           1           1         Pri GPT header
           2          32         Pri GPT table
          34           6         
          40      409600      1  GPT part - C12A7328-F81F-11D2-BA4B-00A0C93EC93B
      409640   736324336      2  GPT part - 7C3457EF-0000-11AA-AA11-00306543ECAC
   736733976  1216529008      3  GPT part - 48465300-0000-11AA-AA11-00306543ECAC
  1953262984      262150         
  1953525134          32         Sec GPT table
  1953525166           1         Sec GPT header


This is the result of sudo dd if=/dev/disk2 bs=512 count=1 skip=409640 | hexdump -Cv

Code:
1+0 records in
1+0 records out
512 bytes transferred in 0.004883 secs (104852 bytes/sec)
00000000  c2 f9 f4 f8 b1 61 fd 24  01 00 00 00 00 00 00 00  |.....a.$........|
00000010  5d 7f 5c 00 00 00 00 00  01 00 00 80 00 00 00 00  |].\.............|
00000020  4e 58 53 42 00 10 00 00  5e 6d 7c 05 00 00 00 00  |NXSB....^m|.....|
00000030  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|
00000040  02 00 00 00 00 00 00 00  3e 87 ef 07 9e 5b 40 14  |........>....[@.|
00000050  89 f7 e7 da ca 29 7d 4c  13 f8 7c 00 00 00 00 00  |.....)}L..|.....|
00000060  5e 7f 5c 00 00 00 00 00  18 01 00 00 2c 6c 00 00  |^.\.........,l..|
00000070  34 21 9f 02 00 00 00 00  2c 80 9e 02 00 00 00 00  |4!......,.......|
00000080  3a 00 00 00 04 0d 00 00  38 00 00 00 02 00 00 00  |:.......8.......|
00000090  ca 0c 00 00 3a 00 00 00  d3 ef 03 00 00 00 00 00  |....:...........|
000000a0  73 7c 0b 00 00 00 00 00  01 04 00 00 00 00 00 00  |s|..............|
000000b0  00 00 00 00 64 00 00 00  03 04 00 00 00 00 00 00  |....d...........|
000000c0  06 04 00 00 00 00 00 00  ca ef 03 00 00 00 00 00  |................|
000000d0  c1 93 04 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|
000000e0  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|
000000f0  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|
00000100  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|
00000110  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|
00000120  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|
00000130  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|
00000140  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|
00000150  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|
00000160  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|
00000170  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|
00000180  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|
00000190  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|
000001a0  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|
000001b0  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|
000001c0  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|
000001d0  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|
000001e0  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|
000001f0  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|
00000200


And lastly this is the result of sudo dd if=/dev/disk2 bs=512 count=1 skip=736733976 | hexdump -Cv

Code:
1+0 records in
1+0 records out
512 bytes transferred in 0.004882 secs (104878 bytes/sec)
00000000  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|
00000010  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|
00000020  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|
00000030  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|
00000040  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|
00000050  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|
00000060  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|
00000070  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|
00000080  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|
00000090  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|
000000a0  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|
000000b0  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|
000000c0  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|
000000d0  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|
000000e0  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|
000000f0  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|
00000100  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|
00000110  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|
00000120  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|
00000130  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|
00000140  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|
00000150  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|
00000160  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|
00000170  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|
00000180  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|
00000190  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|
000001a0  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|
000001b0  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|
000001c0  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|
000001d0  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|
000001e0  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|
000001f0  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|
00000200


This post suggests "To correct the GPT, you need to remove the second and third entries" with:
Code:
sudo gpt remove -i 2 /dev/disk0
sudo gpt remove -i 3 /dev/disk0
...which would be disk2 in my case, but should I also remove the second and third entries?

And then "The command below will add the APFS container to the GPT."
Code:
sudo gpt add -i 2 -b 409640 -s 1875036440 -t apfs /dev/disk0

This post details that I need to use my own numbers in the gpt add command - would that be
Code:
sudo gpt add -i 2 -b 409640 -s 736324336 -t apfs /dev/disk2
for me?

I'm scared to mess this up and want to be sure that I do this correctly. Thanks for any input on this!
 
Select View > Show All Devices and then post another picture from Disk Utility.
 
Thanks for that. I didn't realize you were on Catalina. The icons in the sidebar are different than the icons in Monterey and I wasn't sure what I was seeing.

Your external SSD doesn't look like it's formatted as APFS (despite the names) as there are no Containers within. It's just weird. You might have to reformat it.
 
Thanks for that. I didn't realize you were on Catalina. The icons in the sidebar are different than the icons in Monterey and I wasn't sure what I was seeing.

Your external SSD doesn't look like it's formatted as APFS (despite the names) as there are no Containers within. It's just weird. You might have to reformat it.
Oh sorry, I should have mentioned that my rescue machine is running Catalina.

Do you think it's worth a shot to correct the gpt as mentioned above somewhere?
 
Last edited:
I have no idea. Disk Utility is a GUI to the same commands you an run in Terminal. But there are more options available through the command line. I am no expert on those.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.