0

I am using a 2010 27" iMac with Mac OS High Sierra and Windows 10 via Bootcamp. Recently, I have had an issue where every Mac update renders the Windows partition unbootable. This means that after every Mac OS update, I need to use Gdisk to fix the hybrid partition table so I can boot Windows again. Unfortunately, this time after I did the repair the Mac partition will no longer boot. Is there a way of fixing the hybrid partition table from Windows so I can get the Mac Partition to boot again, it doesn't show up in the ALT menu on startup and if I try to boot using Refind, the boot process begins but doesn't complete with a crossed out circle on the screen.

When I open Fdisk and run list partition, I get the following:

DISKPART> LIST PARTITION

  Partition ###  Type              Size     Offset
  -------------  ----------------  -------  -------
  Partition 1    Primary           1370 GB    512 B
  Partition 2    Primary             14 GB  1370 GB
  Partition 3    Primary            478 GB  1384 GB
  Partition 4    Primary             16 KB  1863 GB

The Mac OS is installed on Partition 1, Partition 3 is the Boot Camp one. The Mac OS partition still doesn't show up, even if I try to reinstall High Sierra from a USB drive.

Running the commands suggested below gave the following results, sorry for including them as an image, I could not work out how to save them from the USB boot drive. Screenshot

What is the procedure to try and restore the Mac Partition? I think I will need to use GDisk from the Boot Camp partition. I think I messed up the last time I used GDisk on the Mac to get Windows working again so I want to be careful this time! Windows is working so how can anyone help me use FDisk/GDisk on Windows to restore the partition table to a working state?

8
  • Do you know if you were using APFS or Core Storage? Was macOS encrypted? Jun 2, 2019 at 11:26
  • No to all the above questions, it is a standard 3TB HDD formatted as Mac OS extended (journaled), there is also a Bootcamp partitition and Linux on there. Jun 4, 2019 at 9:21
  • Are you sure this is a 3 TB drive? Jun 4, 2019 at 9:59
  • Sorry my mistake, its a 2 or 2.5TB Drive, I'll check when I get home. Jun 4, 2019 at 11:10
  • Its a 2TB HDD drive. Roughly 1.5TB for the Mac OS and 500TB split between Windows and Ubuntu. Jun 4, 2019 at 16:22

1 Answer 1

1

The usual request is for the OP to post the output from the commands gpt -r show /dev/disk0 and fdisk /dev/disk0. You can enter these commands while booted to macOS Recovery. Normally, you boot to macOS Recovery by turning on your Mac and immediately pressing and holding Command (⌘)-R key combination. Continue holding until you see the Apple logo. Startup is complete when you see an utilities window similar to what is shown below.

Once boot to macOS Recovery, you can select to open a Terminal window from the menu bar.

If you can not boot to macOS Recovery and can boot Windows, then you can download and use GPT fdisk to print the contents of the GPT and MBR partition tables. After downloading and extracting, you will need to enter the command gdisk64 \\.\PhysicalDrive0 from an "Administrator: Command Prompt" window. To print the tables, enter the following when prompted by gdisk64.

r
p
o
q

After posting the content of these tables to your question, I would hopefully be able to advise on the next step.

Update:

Here are instructions for using gdisk under Windows to fix the MBR partition table.

Start by entering the command gdisk64 \\.\PhysicalDrive0 in an "Administrator: Command Prompt" window. Here, I assume the current directory in the window contains the gdisk64.exe file downloaded from gptfdisk at SourceForge.

Below are the commands to enter in to gdisk.

R
H
2 7
Y
AF
N
07
Y
N
W
Y

Below is sample output. Note: Your output might vary slightly from what is shown below.

GPT fdisk (gdisk) version 1.0.4

Partition table scan:
  MBR: hybrid
  BSD: not present
  APM: not present
  GPT: present

Found valid GPT with hybrid MBR; using GPT.

Command (? for help): R

Recovery/transformation command (? for help): H

WARNING! Hybrid MBRs are flaky and dangerous! If you decide not to use one,
just hit the Enter key at the below prompt and your MBR partition table will
be untouched.

Type from one to three GPT partition numbers, separated by spaces, to be
added to the hybrid MBR, in sequence: 2 7
Place EFI GPT (0xEE) partition first in MBR (good for GRUB)? (Y/N): Y

Creating entry for GPT partition #2 (MBR partition #2)
Enter an MBR hex code (default AF): AF
Set the bootable flag? (Y/N): N

Creating entry for GPT partition #7 (MBR partition #3)
Enter an MBR hex code (default 07): 07
Set the bootable flag? (Y/N): Y

Unused partition space(s) found. Use one to protect more partitions? (Y/N): N

Recovery/transformation command (? for help): W

Final checks complete. About to write GPT data. THIS WILL OVERWRITE EXISTING
PARTITIONS!!

Do you want to proceed? (Y/N): Y
OK; writing new GUID partition table (GPT) to \\.\PhysicalDrive0.
Disk synchronization succeeded! The computer should now use the new
partition table.
The operation has completed successfully.

Note: If you get macOS to boot, but Windows fails to boot, then you will need to rebuild your Windows BCD file.

6
  • I have posted the information in my original question. I have installed GPT Fdisk on the Windows partition. Can you see what I need to do to get Mac OS working again? Jun 9, 2019 at 10:27
  • Is it possible to repair from a USB "install" disk? My recovery partition won't boot either, just the Windows. Jun 11, 2019 at 22:15
  • Do I need to add any further information in order to know what I need to do next? It looks like the Mac OS was on partition 2. Hopefully I will be able to get both Mac and Windows able to boot eventually... Jun 18, 2019 at 18:24
  • @Simon Baidwin: I have not been avoiding you. The problem is you need to reinstall your operating systems in order to properly fix the problem you describe. Unfortunately, doing so will lead to a "Blue Screen of Death" error message. I have the same problem with my 2011 iMac. I posted a question with regard to this error. I am close to my own answer, but first what to see if someone else has a better solution. Jun 18, 2019 at 20:34
  • I am more bothered about getting the Mac side booting again. My Time Machine backup failed and I have loads of photos, music etc. It can still be accessed but would be more convenient to just be able to boot into Mac again. Reinstalling Mac OS is not an option either, the installer doesn't recognise the Mac partition. Jun 19, 2019 at 11:36

You must log in to answer this question.

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