The grub.cfg file contains most of the GRUB configuration. To add more complex constructs to the GRUB configuration, create a /pool-name/boot/grub/custom.cfg file to contain these customizations. This file shares the same location as the grub.cfg and menu.conf files. GRUB then processes the contents of the custom.cfg file through code at the end of the grub.cfg file.
On a system with 64-bit UEFI firmware, entries in the custom.cfg file might look like the following:
menuentry "Windows (64-bit UEFI)" { insmod part_gpt insmod fat insmod search_fs_uuid insmod chain search --fs-uuid --no-floppy --set=root cafe-f4ee chainloader /efi/Microsoft/Boot/bootmgfw.efi }
On a system with BIOS firmware, entries might look like the following:
menuentry "Windows" { insmod chain set root=(hd0,msdos1) chainloader --force +1 }