3

Previous versons of OS X and macOS automatically converted pure GPT drives to hybrid GPT/MBR format when the 2nd, 3rd, and/or 4th GPT partitions were formatted "MS DOS (FAT)" by the Disk Utility application or the diskutil command. I am not sure when this changed, but this no longer happens under High Sierra (macOS 10.13.2).

My Mac needs the hybrid format in order to BIOS boot the installed Windows operating system.

What is a procedure to manually convert the drive back to the hybrid format?

Below is the output from the command diskutil list disk0.

/dev/disk0 (internal, physical):
   #:                       TYPE NAME                    SIZE       IDENTIFIER
   0:      GUID_partition_scheme                        *500.0 GB   disk0
   1:                        EFI EFI                     209.7 MB   disk0s1
   2:                 Apple_APFS Container disk1         249.5 GB   disk0s2
   3:       Microsoft Basic Data BOOTCAMP                200.0 GB   disk0s3
   4:       Microsoft Basic Data COMMON                  50.0 GB    disk0s4
   5:                  Apple_HFS Refind                  200.0 MB   disk0s5

The BOOTCAMP volume is NTFS formatted and the COMMON volume is FAT32 formatted.

Note: The next two commands were executed after starting up from macOS Recovery.

Below is the output from the command gpt -r show /dev/disk0.

      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  487304680      2  GPT part - 7C3457EF-0000-11AA-AA11-00306543ECAC
  487714320        496         
  487714816  390623232      3  GPT part - EBD0A0A2-B9E5-4433-87C0-68B6B72699C7
  878338048       2048         
  878340096   97654784      4  GPT part - EBD0A0A2-B9E5-4433-87C0-68B6B72699C7
  975994880        696         
  975995576     390616      5  GPT part - 48465300-0000-11AA-AA11-00306543ECAC
  976386192     176315         
  976562507         32         Sec GPT table
  976562539          1         Sec GPT header

Below is the output from the command fdisk /dev/disk0.

Disk: /dev/disk0    geometry: 60788/255/63 [976562540 sectors]
Signature: 0xAA55
         Starting       Ending
 #: id  cyl  hd sec -  cyl  hd sec [     start -       size]
------------------------------------------------------------------------
 1: EE 1023 254  63 - 1023 254  63 [         1 -  976562539] <Unknown ID>
 2: 00    0   0   0 -    0   0   0 [         0 -          0] unused      
 3: 00    0   0   0 -    0   0   0 [         0 -          0] unused      
 4: 00    0   0   0 -    0   0   0 [         0 -          0] unused    
4

Here, I assume you are using High Sierra (macOS 10.13.2).

Unless you disable System Integrity Protection (SIP), the solution given below requires booting to macOS Recovery via the internet, built-in recovery or an USB flash drive macOS installer. Once booted to macOS Recovery, open a Terminal application window.

Note: The Terminal application can be found under "Utilities" on the menu bar.

To update the MBR partition table, a mapping of the partition types needs to be known. Below is a table of some commonly found types.

Note: The mapping is not one-to-one.

            Partition Type              MBR ID              UEFI GUID
--------------------------------------  ------  ------------------------------------
Apple Mac OS Extended (HFS+ or JHFS+)     AF    48465300-0000-11AA-AA11-00306543ECAC
Apple Boot (Recovery HD)                  AB    426F6F74-0000-11AA-AA11-00306543ECAC
Apple Core Storage                        AC    53746F72-6167-11AA-AA11-00306543ECAC
Apple File System (APFS)                  FF    7C3457EF-0000-11AA-AA11-00306543ECAC
Extensible Firmware Interface (EFI)       EE    C12A7328-F81F-11D2-BA4B-00A0C93EC93B
Linux Filesystem Data                     83    0FC63DAF-8483-4772-8E79-3D69D8477DE4
Linux Swap                                82    0657FD6D-A4AB-43C4-84E5-0933C84B4F4F
Linux Logical Volume Manager (LVM)        8E    E6D6D379-F507-44C2-A23C-238F2A3DF928
Microsoft File Attribute Table (FAT32)    0C    EBD0A0A2-B9E5-4433-87C0-68B6B72699C7
Microsoft Windows NT (NTFS) or ExFAT      07    EBD0A0A2-B9E5-4433-87C0-68B6B72699C7
Microsoft Windows Recovery Environment    27    DE94BBA4-06D1-4D40-A16A-BFD50179D6AC

The command given below can be used to partially display the information contained in GPT stored on disk0. You will need this information when editing the MBR table. (See the above question for the output from this command.)

gpt -r show /dev/disk0 

Here are the steps involving in editing the MBR table to create a hybrid partitioning scheme.

  1. The interactive command to edit the MBR partition table is given below. All changes will be not be entered in CHS mode.

    fdisk -e /dev/disk0
    

    Entering this command produced the following output

    fdisk: could not open MBR file /usr/standalone/i386/boot0: No such file or directory
    Enter 'help' for information
    fdisk: 1> 
    

    Note: The control+C key can be pressed at anytime to terminate the fdisk command without saving any changes.

  2. The only entry, in the initial MBR table, defines a "Protective Partition". This partition needs to be truncated to the end of the first partition in the GPT with the GUID of C12A7328-F81F-11D2-BA4B-00A0C93EC93B. This means the start value should remain 1, but the size value should be reduced to the value start + size - 1. The values use in this equation should be taken from GPT. Below is the resulting output from using the edit command to reduce the size of the first MBR partition.

    fdisk: 1> edit 1
             Starting       Ending
     #: id  cyl  hd sec -  cyl  hd sec [     start -       size]
    ------------------------------------------------------------------------
     1: EE 1023 254  63 - 1023 254  63 [         1 -  976562539] <Unknown ID>
    Partition id ('0' to disable)  [0 - FF]: [EE] (? for help) EE
    Do you wish to edit in CHS mode? [n] N
    Partition offset [0 - 976562540]: [63] 1
    Partition size [1 - 976562539]: [976562539] 409639
    fdisk:*1>
    
  3. Next, enter the correct values for partition 2. The command is enter and the id is FF. The start and size values are the same as shown in the GPT. Doing so, results in what is shown below.

    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 - 976562540]: [409640] 409640
    Partition size [1 - 976152900]: [976152900] 487304680
    fdisk:*1>
    
  4. Repeat the previous step to update partitions 3 and 4. This is shown below. The id for partition 3 is 07 and for partition 4 is 0C.

    fdisk:*1> edit 3
             Starting       Ending
     #: id  cyl  hd sec -  cyl  hd sec [     start -       size]
    ------------------------------------------------------------------------
     3: 00    0   0   0 -    0   0   0 [         0 -          0] unused      
    Partition id ('0' to disable)  [0 - FF]: [0] (? for help) 07
    Do you wish to edit in CHS mode? [n] N
    Partition offset [0 - 976562540]: [487714320] 487714816
    Partition size [1 - 488847724]: [488847724] 390623232
    fdisk:*1> edit 4
             Starting       Ending
     #: id  cyl  hd sec -  cyl  hd sec [     start -       size]
    ------------------------------------------------------------------------
     4: 00    0   0   0 -    0   0   0 [         0 -          0] unused      
    Partition id ('0' to disable)  [0 - FF]: [0] (? for help) 0C
    Do you wish to edit in CHS mode? [n] N
    Partition offset [0 - 976562540]: [878338048] 878340096
    Partition size [1 - 98222444]: [98222444] 97654784
    fdisk:*1> 
    
  5. The next command flags the third partition as bootable. This partition was chosen because this is where the Windows resides.

    fdisk:*1> flag 3
    Partition 3 marked active.
    fdisk:*1> 
    
  6. The next command to enter is print. This command displays what the updated MBR table would look like. The result is shown below. You can use the output to verify your changes.

    fdisk:*1> print
    Disk: /dev/disk0    geometry: 60788/255/63 [976562540 sectors]
    Offset: 0   Signature: 0xAA55
             Starting       Ending
     #: id  cyl  hd sec -  cyl  hd sec [     start -       size]
    ------------------------------------------------------------------------
     1: EE    0   0   2 - 1023 254  63 [         1 -     409639] <Unknown ID>
     2: FF 1023 254  63 - 1023 254  63 [    409640 -  487304680] Xenix BBT   
    *3: 07 1023 254  63 - 1023 254  63 [ 487714816 -  390623232] HPFS/QNX/AUX
     4: 0C 1023 254  63 - 1023 254  63 [ 878340096 -   97654784] Win95 FAT32L
    fdisk:*1> 
    

    Note: The descriptions <Unknown ID>, Xenix BBT and HPFS/QNX/AUX are either wrong and/or outdated.

  7. The final command quit writes the table back to the MBR, then quit fdisk. This is shown below.

    fdisk:*1> quit
    Writing current MBR to disk.
    Device could not be accessed exclusively.
    A reboot will be needed for changes to take effect. OK? [n] Y
    

    As the above message suggests, it would be a good idea to restart the Mac.

0

You could then make a hybrid disk by using the Disk Utility application included with Sierra. First, you install regular Sierra into a new partition. When you're done, boot to regular Sierra, open the Disk utility, create the FAT partition, and you have a hybrid partition.

  • Do you mean to run the Disk Utility after installing Sierra to the internal drive? Or, do you mean to run the Disk Utility after booting to the Sierra installer? This Sierra installer could be from internet recovery or a USB flash drive. – David Anderson Jan 2 at 20:33
  • I meant for you to install regular Sierra first, then when you're done, go to regular Sierra , open Disk utility, create the Fat partition, and you have a hybrid partition. I've benn trying to install Windows 10 on my iMac, and finally I know. – Rishab Tirupathi Jan 2 at 21:20
  • The regular Sierra installer has the Disk Utility application. I was just pointing out that you could have run that Disk Utility application to create the hybrid disk. You would not need to actually install regular Sierra. Did you keep regular Sierra partition after running the Disk Utility application or did you delete the partition? – David Anderson Jan 2 at 21:45
  • yeah, you could've used the installer... I haven't tried this yet, but I would delete the partition. – Rishab Tirupathi Jan 2 at 22:38
  • Tonight I'm gonna try installing windows by partitioning the drive in Sierra installer to make it hybrid. – Rishab Tirupathi Jan 3 at 23:54
0

I post my experience, I think it could be useful for someone....

Installing Windows 10 in iMac 2011: Working video and audio (Through USB installer)

After 3 days visiting several pages with tutorials, forums in which it is mentioned that it is impossible to do it and others in which partially possible but losing partial functionality of graphics and sound totally, as well as searched the online help of Microsoft to consult information about options of some specific commands, I have found the solution.

Starting point:

Apple iMac Mid 2011, without optical disc. Two SSDs have been installed in each of the available Sata III ports, and an HDD in the Sata II port of the optical unit (optical unit obviously have been removed).

Goals:

Install the macOS Sierra system in SSD Nº1. Move the "Users" folder to the HDD (about how to do this there are tutorials on the internet, it is not the subject of this tutorial) Install Windows 10 on the SSD No. 2, so that the graphics work well, as well as the sound works.

Step 1: Create the Windows 10 USB installation disc

Download the last ISO of the installation of Windows 10 from the official Microsoft page. Format with the “OSX Disk Utility” a USB with at least 8GB with the following format: MBR / ExtFAT. Mount the downloaded Windows 10 installer ISO image, and copy all the files to the newly formatted USB (I’ve used “ditto” command to do that).

Step 2: Boot the USB installer.

Restart the computer and keep the “Alt / Option” key pressed. Choose the USB as the boot unit. Wait for the Windows 10 installer to load. Press “SHIFT + F10” to open the command window. Open the partition editor:

diskpart

List the system disks:

list disk

Select the disk on which we are going to install Windows 10. In my case, this is Disk 1.

Note: Make sure that the selected disk is the correct one.

select disk 1

Now we are going to clean the partition table of the selected disk:

clean

Now create the partition table system, in my case MBR, I do not know if it works as GPT:

convert mbr

Now create the partition in which we will later copy the system boot files (100MB):

create partition primary size=100

Now format it with the NTFS file system:

format fs=ntfs quick label=System

Now assign letter “S” to the partition:

assign letter=S

Now mark this partition as active:

active

Now create the partition in which we will then copy the Windows files. In my case, I want this partition to occupy the rest of the disk, starting from the end of the System partition to the end of the disk:

create partition primary

Now format it with the NTFS file system:

format fs=ntfs quick label=Windows

Now assign a letter to the partition:

assign letter=C

Now, before leaving diskpart, observe on the list partition the letter that has been assigned in the partition table the USB disk of installation of windows 10. In my case it is the letter E:

list volume

We finished with diskpart, we get out with:

exit

Now we are going to list all the Windows 10 images available:

Note: In my case, the letter E is the USB drive.

X:
cd X:\Windows\System32
dism /get-imageinfo /imagefile:E:\sources\install.wim

Note: Depending on the ISO file you download, you may need to to substitute install.esd for install.wim.

Now we are going to dump the first Windows 10 image directly from the USB:

Note: In my case, the letter E is the USB drive and the letter C is the destination partition where the Windows 10 image will be copied.

dism /apply-image /imagefile:E:\sources\install.wim /index:1 /applydir:C:\

Now we will use the bcdboot command, which will enable the system boot. ATTENTION. This point is important since the boot that must be created is BIOS type and not EFI type, since in this last case, the sound will not work.

C:
bcdboot C:\Windows /l es-es /s S: /f BIOS

Note: The option “/l”, in which you specify the language in which the windows installer will start by default, is optional, in my case "es-es". The option “/f BIOS” is mandatory, since the EFI type boot will be installed by default otherwise.

Once all this is done, close the Windows 10 installer that we are using from USB, and restart the computer.

Restart the computer and keep the Alt / Option key pressed.

Choose the Windows option to boot it.

Once here, comes the configuration of windows installation.

Once Windows installed, we can install the bootcamp utilities and drivers, specific for iMac Mid 2011, which can be downloaded from here: Boot Camp Support Software 5.1.5621

Good luck guys!

  • 1
    This is a nice answer, but not to the question I posted. If I post a new question better suited to your answer, would you be willing to move your answer to this question? – David Anderson Feb 25 at 21:25

You must log in to answer this question.

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