Last active
March 21, 2020 14:54
-
-
Save JhoLee/4f9469ea78a09788acb7e1bf9eb59409 to your computer and use it in GitHub Desktop.
multibootusb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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 /bootmgr.efi ]; then | |
menuentry "Microsoft Windows Vista/7/8/8.1 UEFI Boot (bootmgr.efi)" { | |
insmod part_gpt | |
insmod fat | |
insmod search_fs_uuid | |
insmod chain | |
# search --fs-uuid --set=root $hints_string $fs_uuid | |
chainloader /bootmgr.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 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment