-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
14
  • 1
    what part of the many answers to thus question on this site does not work for you?
    – mmmmmm
    Commented May 23, 2019 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
    Commented May 23, 2019 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. Commented May 23, 2019 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 Commented May 23, 2019 at 21:15
  • Make it clear in the question which ones you have tried and what were the different results you got.
    – mmmmmm
    Commented May 23, 2019 at 22:14

2 Answers 2

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).

4
  • How to you propose to install this application when the OP can not boot to macOS? Commented May 24, 2019 at 13:30
  • Answered above, its expensive but if you need it, you need it
    – user322985
    Commented May 24, 2019 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. Commented May 24, 2019 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.
    – user322985
    Commented May 24, 2019 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
$ 
13
  • 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? Commented May 24, 2019 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. Commented May 24, 2019 at 16:38
  • Heres the fdisk command, i reentered it and received the same error i.imgur.com/SsAT4sk.jpg and heres the MBR command i.imgur.com/JRBlbZR.jpg Commented May 24, 2019 at 16:48
  • If you compare the current output from fdisk /dev/disk0 with what is shown in 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. Commented May 24, 2019 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” i.imgur.com/5SGzE83.jpg Commented May 24, 2019 at 17:26

Not the answer you're looking for? Browse other questions tagged .