-1

Sadly the post tagged as duplicated does not work for me

———————

Quick specs: Macbook Pro Mid2012 500GB SSD thats been in the Macbook for around 4 years MacOS Mojave BOOTCAMP Windows (100GB)

Yesterday while I was browsing on Safari i refreshed a site and my Macbook Pro just hanged and the spinning cursor appeared when hovering over Safari, everything else seemed to be working, so i tried closing Safari via the dock (the icons still enlarged when i moved over then) but as soon as i right clicked on Safari the dock froze as well. So i gave it a few minutes to see if its going to unfreeze but it didnt. So naturally i restarted the machine only for it to show the circle with line across instead of the apple logo. I restarted it and held ALT. A “Mac” came up but not the “Windows” clickable thingy. I selected the Mac and again the same story with the line across the circle. Restarted the Mac again now holding Command-R for internet recovery. Opened Disk Utility and i could see this enter image description here Then i verified the "525.11 GB Crucial..." and i got this: enter image description here

Then i clicked repair volume and it said it was fixed so i restarted the Macbook but i still got the same cross thing and when i got back to Disk Utility and verified the volume again, it again gave me the same error. (forgot to add, tried to reinstall OSX but only the Windows partition showed up)

Fast forward to today I tried to do what i saw in this Stack Exchange. I removed the Windows partition and then removed the Mac one, then i tried to remount the OSX partition but i got no space available error enter image description here Now instead of showing disk0s2 and BOOTCAMP under the Crucial volume, it only shows the BOOTCAMP one. enter image description here


Heres the list before i tried to unmount: enter image description here

And after: enter image description here

Heres a few more pictures i took:

Heres me retrying to repair disk volume after the Macbook was turned off for a day (but before i unmounted it!!!). I tried to repair it a few times but getting th same error and then after like 3-5 times it just said it repaired. Verify still says theres an error but when i click repair it says its repaired enter image description here

Heres a repair volume in terminal, it gives me an error of unrecognized file system (also before i unmounted stuff)

-bash-3.2# diskutil repairVolume /dev/disk0s2
Error starting file system repair for disk0s2: Unrecognized file system (-69846)

Heres the CoreStorage and a command i saw someone request it in some other Stack Exchange

-bash-3.2# diskutil cs list
No Corestorage logical volume groups found
-bash-3.2# gpt -r show /dev/disk0s2
     start          size      index      contents
         0     829890520
  • 1
    what part of the many answers to thus question on this site does not work for you? – mmmmmm May 23 '19 at 20:54
  • @Mark is correct. This problem already has dozens of accepted answers. Please use the 'search' functionality to see if any of those work for you. – fsb May 23 '19 at 21:11
  • @Mark i tried repairing the volume, tried reinstalling the OSX and went over the steps in the post i linked but none worked. – HandskasMedDet May 23 '19 at 21:11
  • @fsb i went over a lot of them, none of them worked, thats why i posted this. I always search the web and forums and only as last resort i make my own post – HandskasMedDet May 23 '19 at 21:15
  • Make it clear in the question which ones you have tried and what were the different results you got. – mmmmmm May 23 '19 at 22:14
  • @Mark besides the one noted in the question i went over a few ranging from reinstalling the OSX to repairing the volume or trying to connect the SSD to another PC and of course remounting the partition. All of them resulted in my Macbook still not booting up. Besides that all the rest from what i can remember were corrupted by editing partitions while mine got corrupted by simply using the Macbook. Also now i got another problem where the MacOS partition is unmounted and cant be remounted due to lack of space(?) – HandskasMedDet May 23 '19 at 22:26
  • So i tried: http://osxdaily.com/2016/07/28/fix-broken-efi-partition-mac/ https://apple.stackexchange.com/questions/220018/macbook-does-not-mount-does-not-boot-does-not-read-drive https://tutel.me/c/apple/questions/217820/external+disk++unrecognized+file+system+69846 https://apple.stackexchange.com/questions/305706/os-volume-shows-as-type-ffffffff-ffff-ffff-ffff-ffffffffffff https://apple.stackexchange.com/questions/318082/how-can-i-fix-my-partition-table – HandskasMedDet May 24 '19 at 12:26
  • None of those links are hybrid partitioned. You do not see the message Suspicious MBR at sector 0, so the commands will not work when you enter them. Do you know what hybrid partitioned means? – David Anderson May 24 '19 at 12:38
  • @David Anderson not really. Searched around a bit for that before and the one i found said its just due to it being a dual boot – HandskasMedDet May 24 '19 at 12:40
  • Hybrid means you are using two partition tables. So far you have been editing the GUID Partition Table (GPT). The other partition table is called the Master Boot Record (MBR) partition table. You have not even posted what is in this other table. It might be useful to for you to post the contents. (Although, one can probably guess the contents.) Boot to Internet Recovery and post the output from the commands gpt -r show /dev/disk0, fdisk /dev/disk0 and export LC_CTYPE="ASCII"; dd if=/dev/disk0 count=1 skip=409640 | vis -cfw. This will show your current values. – David Anderson May 24 '19 at 12:58
  • @David Anderson Oh sorry did not know about the other commands, here you go https://i.imgur.com/r507fmb.jpg – HandskasMedDet May 24 '19 at 13:19
  • Before I post an answer, I have to recreate your partitioning scheme in a disk image. I will use the image to test the commands you will need to enter. – David Anderson May 24 '19 at 13:28
  • @David Anderson awesome thank you so much! – HandskasMedDet May 24 '19 at 14:06
  • @nohillside: I would suggest (if possible) that this question be marked as a duplicate of FFFFFFFF problem with hybrid partitioned drive, not able to fix with the guide in other topics. Currently, this question is marked as a duplicate of a question which offers nothing that would help fix the problem described here. – David Anderson May 24 '19 at 21:56

2 Answers2

1

The easiest solution is to use DiskWarrior. It is a litte expensive though, its a "no brainer" i.e. no thinking is involved.

You run it/ boot it from the flash drive (which they post to you), and in fact in Mojave thats definitely preferred (arguably the only way).

  • How to you propose to install this application when the OP can not boot to macOS? – David Anderson May 24 '19 at 13:30
  • Answered above, its expensive but if you need it, you need it –  May 24 '19 at 13:42
  • How to you get the software onto the flash drive? I assume you need a Mac booted to macOS to do this. Am I wrong? I did not completely read the website you linked to. – David Anderson May 24 '19 at 14:00
  • They post it to you on a flash drive and you simply plug it in, then "Alt" boot and select "DiskWarrior". You can download the software as well, but you would need a spare Mac and (hopefully) image your corrupted harddrive onto it. –  May 24 '19 at 18:22
0

The drive you are trying to modify is hybrid partitioned. This is why you are having problems entering some of your commands. You have to first remove the corresponding entry in the Master Boot Record (MBR) partition table before adding an entry back into the GUID Partition Table (GPT).

Note: The commands in this answer need to be entered while booted to Internet Recovery.

  1. Enter the commands shown below to remove the 2nd entry from the MBR partition table.

    Note: fdisk is an interactive command.

    fdisk -e /dev/disk0
    setpid 2
    0
    q
    y
    

    Before entering the above commands, the output from fdisk /dev/disk0 should appear as shown below. These are the values stored in the MBR partition table.

    Disk: /dev/disk0        geometry: 63841/255/63 [1025610768 sectors]
    Signature: 0xAA55
             Starting       Ending
     #: id  cyl  hd sec -  cyl  hd sec [     start -       size]
    ------------------------------------------------------------------------
     1: EE 1023 254  63 - 1023 254  63 [         1 -     409639] <Unknown ID>
     2: FF 1023 254  63 - 1023 254  63 [    409640 -  829890520] Xenix BBT   
    *3: 0C 1023 254  63 - 1023 254  63 [ 830300160 -  195309568] Win95 FAT32L
     4: 00    0   0   0 -    0   0   0 [         0 -          0] unused      
    

    After entering the above commands, the output from fdisk /dev/disk0 should appear as shown below. The 2nd entry has been removed from the MBR partition table.

    Disk: /dev/disk0        geometry: 63841/255/63 [1025610768 sectors]
    Signature: 0xAA55
             Starting       Ending
     #: id  cyl  hd sec -  cyl  hd sec [     start -       size]
    ------------------------------------------------------------------------
     1: EE 1023 254  63 - 1023 254  63 [         1 -     409639] <Unknown ID>
     2: 00    0   0   0 -    0   0   0 [         0 -          0] unused      
    *3: 0C 1023 254  63 - 1023 254  63 [ 830300160 -  195309568] Win95 FAT32L
     4: 00    0   0   0 -    0   0   0 [         0 -          0] unused      
    
  2. Enter the commands shown below to add the 2nd entry to GPT.

    diskutil unmountdisk /dev/disk0
    gpt add -i 2 -b 409640 -s 829890520 -t 7C3457EF-0000-11AA-AA11-00306543ECAC /dev/disk0
    
  3. Enter the following commands to undo step 1.

    fdisk -e /dev/disk0
    edit 2
    ff
    n
    409640
    829890520
    q
    y
    

Below is an approximate example of what you should encounter.

$ fdisk -e /dev/disk0
fdisk: could not open MBR file /usr/standalone/i386/boot0: No such file or directory
Enter 'help' for information
fdisk: 1> setpid 2
         Starting       Ending
 #: id  cyl  hd sec -  cyl  hd sec [     start -       size]
------------------------------------------------------------------------
 2: FF 1023 254  63 - 1023 254  63 [    409640 -  829890520] Xenix BBT   
Partition id ('0' to disable)  [0 - FF]: [FF] (? for help) 0
fdisk:*1> q
Writing current MBR to disk.
Device could not be accessed exclusively.
A reboot will be needed for changes to take effect. OK? [n] y
$ diskutil unmountdisk /dev/disk0
Unmount of all volumes on disk0 was successful
$ gpt add -i 2 -b 409640 -s 829890520 -t 7C3457EF-0000-11AA-AA11-00306543ECAC /dev/disk0
gpt add: /dev/disk0: Suspicious MBR at sector 0
/dev/disk0s2 added
$ fdisk -e /dev/disk0
fdisk: could not open MBR file /usr/standalone/i386/boot0: No such file or directory
Enter 'help' for information
fdisk: 1> edit 2
         Starting       Ending
 #: id  cyl  hd sec -  cyl  hd sec [     start -       size]
------------------------------------------------------------------------
 2: 00    0   0   0 -    0   0   0 [         0 -          0] unused      
Partition id ('0' to disable)  [0 - FF]: [0] (? for help) ff
Do you wish to edit in CHS mode? [n] n
Partition offset [0 - 1027343790]: [409640] 409640
Partition size [1 - 1026934150]: [1026934150] 829890520
fdisk:*1> q
Writing current MBR to disk.
Device could not be accessed exclusively.
A reboot will be needed for changes to take effect. OK? [n] y
$ 

You also seem to be getting error messages regarding the EFI partition (disk0s1). You can reformat this partition by entering the command given below.

newfs_msdos -F 32 -v EFI /dev/rdisk0s1

Below is example output.

$ newfs_msdos -F 32 -v EFI /dev/rdisk0s1
512 bytes per physical sector
/dev/rdisk0s1: 403266 sectors in 403266 FAT32 clusters (512 bytes/cluster)
bps=512 spc=1 res=32 nft=2 mid=0xf8 spt=32 hds=32 hid=40 drv=0x80 bsec=409600 bspf=3151 rdcl=2 infs=1 bkbs=6
$ 
  • Thank you so much for the answer! Going through it now but when i input the first command, besides the no such file or directory, theres another line that says “The signature for this MBR is invalid” and then another line that says “Would you like to initialize the partition table? [y]” do i just press y and continue? – HandskasMedDet May 24 '19 at 16:03
  • Do not press y and continue. Are you sure you entered the command fdisk -e /dev/disk0? I ask because the last image you posted shows the correct value for the signature. If you think you entered the correct command, then you could dump the output of the MBR by executing export LC_CTYPE="ASCII"; dd if=/dev/disk0 count=1 | vis -cfw. Post the output so I can compare with my MBR. – David Anderson May 24 '19 at 16:38
  • Heres the fdisk command, i reentered it and received the same error https://i.imgur.com/SsAT4sk.jpg and heres the MBR command https://i.imgur.com/JRBlbZR.jpg – HandskasMedDet May 24 '19 at 16:48
  • If you compare the current output from fdisk /dev/disk0 with what is shown in https://i.imgur.com/r507fmb.jpg, you will see the values have changed. I do not know how that could have happened unless you are having some sort of hardware failure. – David Anderson May 24 '19 at 17:05
  • Restarted the Macbook and it seems to have fixed itself, but now im stuck on step 2 “no space available on device” https://i.imgur.com/5SGzE83.jpg – HandskasMedDet May 24 '19 at 17:26
  • You can again post the output from export LC_CTYPE="ASCII"; dd if=/dev/disk0 count=1 | vis -cfw and I will see if step 1 succeeded. However, you probably still have some sort of hardware failure. BTW, what version of Windows do you have installed? Did you install the current version using the Boot Camp Assistant or did you install an older version of Windows, then upgrade to the current version? – David Anderson May 24 '19 at 21:31
  • Here you go: https://i.imgur.com/O8WHWDf.jpg (Also i think it failed before cause I accidentally pressed the power button while internet recovery was booting up, havent had the same problem since so im guessing it was that and not some hardware issue) Its Windows 10, but i have no idea what version cause i rarely used it – HandskasMedDet May 24 '19 at 22:31
  • Step 1 did not change the MBR partition table. Basically, the MBR partition table still contains the same values that appeared in the fdisk /dev/disk0 output shown in the https://i.imgur.com/r507fmb.jpg image you posted. I updated my answer to show what the output should be. – David Anderson May 25 '19 at 07:57
  • Followed the answer and it went all fine without any errors so i restarted the Macbook but MacOS still hasnt appeared, booted it back into internet recovery and found that it didnt add the 2nd entry back, did the third step again, didnt work, then tried to redo the whole thing again and tried the third step a few times but it still doesnt add it back https://i.imgur.com/z9tddkn.jpg – HandskasMedDet May 25 '19 at 11:07
  • UPDATE: redid the answer a few times for the past hour while restarting the Macbook. Then one restart it for some reason updated itself to Mojave and that time the step 3 worked, so now i have the #2 back when i enter “fdisk /dev/disk0” but the volume is still not appearing in the Disk Utility and its not on the list when i enter the command “diskutil list” and when i enter “gpt -r show /dev/disk0” it gives me “MBR part 255” in the 2 index, exactly the same as il the original question – HandskasMedDet May 25 '19 at 18:01
  • Are you booting to Internet Recovery before entering the commands? In other words, are you holding down the Option-⌘-R key combination at startup? Release the keys when you see the Apple logo, a spinning globe, or a prompt for a firmware password. When you see the Utilities window, you've started up from macOS Recovery. – David Anderson May 25 '19 at 19:55
  • I hold Option-Command-R every time and release it when the globe with text “starting internet recovery” appears, after inputing the wifi pass and waiting for a few min with the globe spinning the utilities window pops up, then i select terminal in the top bar and input all the command there, am i doing something wrong? – HandskasMedDet May 25 '19 at 22:39
  • it still doesnt work :/ – HandskasMedDet May 29 '19 at 23:14