Hybrid MBR issue when installing Windows 10

I apologize in advance as I'm aware that this has been

answered ad nauseam but I'm unable to put together the solution myself.


Specs: 27in iMac Late 2012, Mojave 10.14.5, APFS Fusion Drive, 1TB, diskutil list below.



Summary: Using BCA, I created a partition for a Windows 10

bootcamp install. Rebooted into Windows installer (external USB) without issue,

entered my serial # etc. When Windows presented the list of Hard Drives to

install Windows, all available partition options were unusable. I deleted the

bootcamp partition to create a new one and format it but was still denied.


Upon further research, I learned that this is due to a

Hybrid MBR issue because I use Mojave and have APFS Fusion drives and Windows

is unable to see the hard drive to correctly install it. I installed Gdisk and

attempted to fix it following instructions I had found somewhere but was unable

to proceed due to an error running disk (problem opening /dev/disk1 for

reading! Error is 1.)



/dev/disk0 (internal, physical):


   #:                       TYPE NAME                    SIZE                          IDENTIFIER


   0:      GUID_partition_scheme                        *1.0 TB            disk0

   1:                        EFI EFI                                    209.7 MB         disk0s1

   2:                 Apple_APFS Container disk2      786.9 GB         disk0s2

   3:       Microsoft Basic Data                             213.1 GB         disk0s3


/dev/disk1 (internal, physical):


   #:                       TYPE NAME                    SIZE                           IDENTIFIER

   0:      GUID_partition_scheme                        *121.3 GB        disk1

   1:                        EFI EFI                                    209.7 MB         disk1s1

   2:                 Apple_APFS Container disk2         121.1 GB       disk1s2


/dev/disk2 (synthesized):


   #:                       TYPE NAME                    SIZE                          IDENTIFIER

   0:      APFS Container Scheme -                      +908.0 GB        disk2

                                 Physical Stores disk1s2, disk0s2

   1:                APFS Volume Macintosh HD            686.1 GB     disk2s1

   2:                APFS Volume Preboot                 23.5 MB            disk2s2

   3:                APFS Volume Recovery                506.8 MB         disk2s3

   4:                APFS Volume VM                      24.6 KB                disk2s4


Please help! Thank you!

iMac 27", macOS 10.14

Posted on Jun 28, 2019 7:36 AM

Reply
Question marked as Top-ranking reply

Posted on Jun 29, 2019 2:50 PM

Rebuild MBR to match the new GPT information thus resetting the Hybrid MBR. Use defaults for other questions (like partition codes). The only values that need modifications are the Boot flags and step 10. Accept all other defaults that Gdisk offers. Please see thesample Q&A as an example. These steps can be repeated if you make a mistake before you get to Step 12, otherwise start from Step 1 for these steps. Step 6 has numbers which are typed with a space between the numbers. Please see the sample Q&A before you execute these steps.



  1. Sudo gdisk /dev/rdisk1
  2. P (Print list of parts)
  3. R (Recover)
  4. O (print current Hybrid MBR)
  5. H (chooses Hybrid)
  6. Partitions numbers to be hybridized: 2 3
  7. Y (Good for GRUB question)
  8. N (part 2 boot flag)
  9. Y (part 3 boot flag make NTFS bootable partition)
  10. O (print current Hybrid MBR)
  11. W (Write the new MBR)
  12. Y (Yes! write the new MBR)
  13. Reboot


Here is sample Q&A for this section. Please notice the Press Enter/Return.


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): Press Enter/Return
Set the bootable flag? (Y/N): N

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



Similar questions

24 replies
Question marked as Top-ranking reply

Jun 29, 2019 2:50 PM in response to VirajS

Rebuild MBR to match the new GPT information thus resetting the Hybrid MBR. Use defaults for other questions (like partition codes). The only values that need modifications are the Boot flags and step 10. Accept all other defaults that Gdisk offers. Please see thesample Q&A as an example. These steps can be repeated if you make a mistake before you get to Step 12, otherwise start from Step 1 for these steps. Step 6 has numbers which are typed with a space between the numbers. Please see the sample Q&A before you execute these steps.



  1. Sudo gdisk /dev/rdisk1
  2. P (Print list of parts)
  3. R (Recover)
  4. O (print current Hybrid MBR)
  5. H (chooses Hybrid)
  6. Partitions numbers to be hybridized: 2 3
  7. Y (Good for GRUB question)
  8. N (part 2 boot flag)
  9. Y (part 3 boot flag make NTFS bootable partition)
  10. O (print current Hybrid MBR)
  11. W (Write the new MBR)
  12. Y (Yes! write the new MBR)
  13. Reboot


Here is sample Q&A for this section. Please notice the Press Enter/Return.


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): Press Enter/Return
Set the bootable flag? (Y/N): N

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



Jun 29, 2019 7:34 PM in response to VirajS

VirajS wrote:

Ok here we are:

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 /dev/rdisk1.

Warning: Devices opened with shared lock will not have their
partition table automatically reloaded!
Warning: The kernel may continue to use old or deleted partitions.
You should reboot or remove the drive.
The operation has completed successfully.

VIRAJs-iMac:~ Viraj$ sudo gpt -vv -r show /dev/disk1

Password:
gpt show: /dev/disk1: mediasize=1000204886016; sectorsize=512; blocks=1953525168
gpt show: /dev/disk1: Suspicious MBR at sector 0
gpt show: /dev/disk1: Pri GPT at sector 1
gpt show: /dev/disk1: Sec GPT at sector 1953525167
       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  1536868944      2  GPT part - 7C3457EF-0000-11AA-AA11-00306543ECAC
  1537278584        1416         
  1537280000   416243712      3  GPT part - EBD0A0A2-B9E5-4433-87C0-68B6B72699C7
  1953523712        1423         
  1953525135          32         Sec GPT table
  1953525167           1         Sec GPT header

Looks fine, and the two table entries are in sync. Much better than the following error you posted previously.


disk1:
gpt show: /dev/disk1: mediasize=1000204886016; sectorsize=512; blocks=1953525168
gpt show: /dev/disk1: Suspicious MBR at sector 0
gpt show: /dev/disk1: Pri GPT at sector 1
gpt show: error: bogus map
gpt show: unable to open device '/dev/disk1': Undefined error: 0


Now try to install Windows using your USB2 Installer.


Jun 29, 2019 1:21 AM in response to VirajS

VirajS wrote:

Yes, I ran the command on disk0 (as I understand from your instructions and per my diskutil list output):

sudo gpt -vv -r show /dev/disk0

gpt show: /dev/disk0: mediasize=121332826112; sectorsize=512; blocks=236978176


This is the 121Gb SSD and shows only EFI and Core Storage partitions, but no MSD partition. Try disk1.

Jun 29, 2019 7:23 PM in response to Loner T

Ok here we are:


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 /dev/rdisk1.


Warning: Devices opened with shared lock will not have their

partition table automatically reloaded!

Warning: The kernel may continue to use old or deleted partitions.

You should reboot or remove the drive.

The operation has completed successfully.


VIRAJs-iMac:~ Viraj$ sudo gpt -vv -r show /dev/disk1


Password:

gpt show: /dev/disk1: mediasize=1000204886016; sectorsize=512; blocks=1953525168

gpt show: /dev/disk1: Suspicious MBR at sector 0

gpt show: /dev/disk1: Pri GPT at sector 1

gpt show: /dev/disk1: Sec GPT at sector 1953525167

       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  1536868944      2  GPT part - 7C3457EF-0000-11AA-AA11-00306543ECAC

  1537278584        1416         

  1537280000   416243712      3  GPT part - EBD0A0A2-B9E5-4433-87C0-68B6B72699C7

  1953523712        1423         

  1953525135          32         Sec GPT table

  1953525167           1         Sec GPT header

Jun 28, 2019 9:18 AM in response to Loner T

Ok, i've rebooted and disabled SIP and rebooted into OS X. Will this allow me to continue the installation of Windows? My understanding is that I need to use gdisk to do something to my current MBR to allow Windows to "see" the partition and allow installation to continue? Could I please request the next steps on this? Thank you in advance.

Jun 28, 2019 10:00 PM in response to Loner T

Yes, I ran the command on disk0 (as I understand from your instructions and per my diskutil list output):


sudo gpt -vv -r show /dev/disk0


gpt show: /dev/disk0: mediasize=121332826112; sectorsize=512; blocks=236978176

gpt show: /dev/disk0: PMBR at sector 0

gpt show: /dev/disk0: Pri GPT at sector 1

gpt show: /dev/disk0: Sec GPT at sector 236978175

      start       size  index  contents

          0          1         PMBR

          1          1         Pri GPT header

          2         32         Pri GPT table

         34          6         

         40     409600      1  GPT part - C12A7328-F81F-11D2-BA4B-00A0C93EC93B

     409640  236568496      2  GPT part - 7C3457EF-0000-11AA-AA11-00306543ECAC

  236978136          7         

  236978143         32         Sec GPT table

  236978175          1         Sec GPT header

Jun 29, 2019 7:21 AM in response to Loner T

I couldn't figure out why disk0 was showing as 121 GB when my diskutil list output shows it as 1tb (as in my OP). So I reran it and now i have a different output. Here is that:


/dev/disk0 (internal, physical):

   #:                       TYPE NAME                    SIZE       IDENTIFIER

   0:      GUID_partition_scheme                        *121.3 GB   disk0

   1:                        EFI EFI                     209.7 MB   disk0s1

   2:                 Apple_APFS Container disk2       21.1 GB   disk0s2



/dev/disk1 (internal, physical):

   #:                       TYPE NAME                    SIZE       IDENTIFIER

   0:      GUID_partition_scheme                        *1.0 TB     disk1

   1:                        EFI EFI                     209.7 MB   disk1s1

   2:                 Apple_APFS Container disk2     786.9 GB   disk1s2

   3:       Microsoft Basic Data                         213.1 GB   disk1s3



/dev/disk2 (synthesized):


   #:                       TYPE NAME                    SIZE       IDENTIFIER

   0:      APFS Container Scheme -                      +908.0 GB   disk2

                                 Physical Stores disk0s2, disk1s2

   1:                APFS Volume Macintosh HD        686.2 GB   disk2s1

   2:                APFS Volume Preboot                 23.5 MB    disk2s2

   3:                APFS Volume Recovery               506.8 MB   disk2s3

   4:                APFS Volume VM                      24.6 KB    disk2s4


I reran sudo gpt -vv -r show /dev/disk(X) here are the various outputs of the drives:


disk0:

gpt show: /dev/disk0: mediasize=121332826112; sectorsize=512; blocks=236978176

gpt show: /dev/disk0: PMBR at sector 0

gpt show: /dev/disk0: Pri GPT at sector 1

gpt show: /dev/disk0: Sec GPT at sector 236978175

      start       size  index  contents

          0          1         PMBR

          1          1         Pri GPT header

          2         32         Pri GPT table

         34          6         

         40     409600      1  GPT part - C12A7328-F81F-11D2-BA4B-00A0C93EC93B

     409640  236568496      2  GPT part - 7C3457EF-0000-11AA-AA11-00306543ECAC

  236978136          7         

  236978143         32         Sec GPT table

  236978175          1         Sec GPT header



disk1:

gpt show: /dev/disk1: mediasize=1000204886016; sectorsize=512; blocks=1953525168

gpt show: /dev/disk1: Suspicious MBR at sector 0

gpt show: /dev/disk1: Pri GPT at sector 1

gpt show: error: bogus map

gpt show: unable to open device '/dev/disk1': Undefined error: 0



disk2:

gpt show: unable to open device '/dev/disk2': Resource busy

Jun 29, 2019 2:40 PM in response to Loner T

Sure:


sudo gdisk -l /dev/disk1


GPT fdisk (gdisk) version 1.0.4


Warning: Devices opened with shared lock will not have their partition table automatically reloaded!


Partition table scan:

  MBR: hybrid

  BSD: not present

  APM: not present

  GPT: present


Found valid GPT with hybrid MBR; using GPT.

Disk /dev/disk1: 1953525168 sectors, 931.5 GiB

Sector size (logical): 512 bytes

Disk identifier (GUID): FF09AC6A-FD06-4F9B-9259-D4BE5A8490E1

Partition table holds up to 128 entries

Main partition table begins at sector 2 and ends at sector 33

First usable sector is 34, last usable sector is 1953525134

Partitions will be aligned on 8-sector boundaries

Total free space is 2845 sectors (1.4 MiB)


Number  Start (sector)    End (sector)  Size       Code  Name


   1              40          409639   200.0 MiB   EF00  EFI System Partition

   2          409640      1537278583   732.8 GiB   AF0A  iMac HDD

   3      1537280000      1953523711   198.5 GiB   0700  

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

Hybrid MBR issue when installing Windows 10

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.