Jump to content

[HOW TO] Custom entry in OpenCore to boot Windows

1 post in this topic

Recommended Posts

(These instructions are already posted on various Internet sites but from time to time they are requested by a user so I publish them in the guides).
To add an entry in Misc> Entries of config.plist you need to know the path to the operating system boot loader.

For a Windows disk, you must know the path to the BOOTX64.EFI file located in the EFI\BOOT folder into the EFI partition. This path must be in EFI format and must match the PCI device where BOOTX64.EFI is located.


The simplest method to find out the path the is using the UEFI Shell (OpenShell.efi), an OpenCore tool that is usually displayed in the start menu. Selecting UEFI Shell, runs a shell in which we can write commands.


On startup it displays a list of all detected EFI paths, they may have different prefixes:

  • BLKX: they are all scanned disks / partitions.
  • FSX: these are all file systems that can be browsed.
  • PciRoot (0x0) / Pci (AxB, CxD) / Sata (or Nvme)... are disk types (SATA AHCI or NVMe).
  • HD (X, GPT, <PARTUUID>, ...) or HD (X, MBR) are partitions where X is a number, GPT / MBR is the partitioning scheme followed by the partition identifier PARTUUID.


To find which of those paths is the macOS EFI partition you must do so:
1. FSX command: (where X is a number starting from zero) places the prompt on that partition. For example, typing FS0: (note colon) the prompt is placed in the root directory of FS0.
2. To find out if it is what we are looking for, use the ls command to list files and folders (dir also works) and cd to change to a directory (cd.. go up one level in the directory). If there is an EFI folder, you have to enter it (cd EFI) to find out if it is the Windows folder (EFI> Microsoft> Boot). If there is no EFI folder or the one there is is not from Windows, we move to the next device with FS1: and repeat the process. Sometimes it is necessary to enter several devices to find the correct one (FS0:, FS1:, FS2:, FS3:, etc.).

3. Once the Windows EFI folder is located, its FSX number must be noted.
4. Run map> map_table.txt. This creates a text file map_table.txt where the prompt was located when using the map command.
5. Exit the Shell with exit and restart to enter macOS.
Back on macOS, mount the volume that contains the map_table.txt file:


diskutil list
sudo diskutil mount disk0s1

(change disk0s1 by the real volume).
Open map_table.txt with a text editor and locate the EFI path of the FSX device you noted in a previous step.

The path to the Windows boot loader consists of 2 parts, an EFI path to the partition with the EFI folder + a path to the boot loader within the EFI folder. We already know that the path to the boot loader is EFI\BOOT\BOOTX64.EFI. The EFI path to the EFI partition is taken from map_table.txt by copying the line that corresponds to the Windows EFI folder.
The line with the EFI path looks like this (example):


The path to the boot loader is like this:


 You have to join both paths by inserting a forward slash / and a backslash \ between the 2 strings:


This is the path to be entered in the Path key of the custom entry in Misc> Entries in the config.plist file. The custom entry would look like this (example):

                <string>Windows 10</string>
                <string>PciRoot(0x0)/Pci(0x1D,0x0)/Pci(0x0,0x0)/NVMe(0x1,18-CC-1C-49-8B-44-1B-00)/HD(1,GPT,DF3F0348-A4F8-4A34-9C86-963B0E98F2BE,0x800,0x54747)/\EFI\BOOT\BOOTX64.EFI </string>

Note1: Notice that there are no spaces in the Path key.


Note2: Notice that I have written the path to the Windows boot loader like this:


as it is in OpenCore's Sample.plist. But there is a backup copy of BOOTX64.EFI in EFI\Microsoft\Boot named bootmgfw.efi, so we can also write the Windows boot loader path in this way:



Edited by miliuco
  • Like 1
  • Thanks 1
  • Create New...