This gist is for x86_64 (amd64) architecture and UEFI boot mode!
Suppose you have 3 partitions: 1. EFI partition (FAT32); 2. macOS partition (Mac OS Extended); 3. WinPE and multiple Linux distros partition (FAT32).
First of all, you need to install grub2 to your EFI partition. You can go to GNU grub2's official website for documentations. Basically, grub-install.exe --no-floppy --target=x86_64-efi --boot-directory=X:\grub --efi-directory=X:\
will work.
- EFI partition should have: