# Show menu entries only when booting from BIOS PC if [ ${grub_platform} == "pc" ]; then if [ -e /bootmgr ]; then menuentry "Microsoft Windows Vista/7/8/8.1 Boot (/bootmgr)" { insmod part_msdos insmod ntfs insmod search_fs_uuid insmod ntldr # search --fs-uuid --set=root --hint-bios=hd1,msdos1 --hint-efi=hd1,msdos1 --hint-baremetal=ahci1,msdos1 $fs_uuid ntldr /bootmgr } fi if [ -e /ntldr ]; then menuentry "Windows XP (/ntldr)" { insmod part_msdos insmod ntldr insmod ntfs ntldr /ntldr } fi fi if [ ${grub_platform} == "efi" ]; then # Detect and add menu entries for various Windows installers under UEFI if [ -e /EFI/Microsoft/Boot/bootmgfw.efi ]; then menuentry "Microsoft Windows Vista/7/8/8.1 UEFI Boot (bootmgfw.efi)" { insmod part_gpt insmod fat insmod search_fs_uuid insmod chain # search --fs-uuid --set=root $hints_string $fs_uuid chainloader /EFI/Microsoft/Boot/bootmgfw.efi } fi if [ -e /EFI/BOOT_WINDOWS/bootx64.efi ]; then menuentry "Microsoft Windows Vista/7/8/8.1 UEFI Boot (bootx64.efi)" { insmod part_gpt insmod fat insmod search_fs_uuid insmod chain # search --fs-uuid --set=root $hints_string $fs_uuid chainloader /EFI/BOOT_WINDOWS/bootx64.efi } fi if [ -e /efi/Microsoft/Boot/cdboot_noprompt.efi ]; then menuentry "Microsoft Windows UEFI-GPT Setup (cdboot_noprompt.efi)" { insmod usbms insmod part_gpt insmod part_msdos insmod fat insmod search_fs_uuid insmod chain chainloader /efi/Microsoft/Boot/cdboot_noprompt.efi } fi fi