Ventoy/INSTALL/grub/localboot.cfg

185 lines
6.1 KiB
INI
Raw Normal View History

2020-06-14 13:41:33 -04:00
if [ "$grub_platform" = "pc" ]; then
menuentry '@VTMENU_LB_SBOOT_WINDOWS' --class=boot_windows --class=F4boot {
2020-09-12 10:31:21 -04:00
set partid=3
while [ $partid -le 128 ]; do
if vt_check_part_exist $partid; then
for bt in bootmgr BOOTMGR Bootmgr BootMGR; do
if [ -f ($vtoydev,$partid)/$bt ]; then
set root=($vtoydev,$partid)
ntldr /$bt
boot
fi
done
else
break
fi
vt_incr partid 1
done
if search -n -s -f /Boot/BCD; then
for bt in bootmgr BOOTMGR Bootmgr BootMGR; do
if [ -f /$bt ]; then
2020-10-31 07:06:30 -04:00
if regexp '^hd0' $root; then
ntldr /$bt
else
drivemap -s hd0 $root
ntldr /$bt
fi
2020-09-12 10:31:21 -04:00
break
fi
done
elif search -n -s -f /NTDETECT.COM; then
drivemap -s hd0 $root
ntldr /ntldr
2020-06-14 13:41:33 -04:00
else
echo "Windows NOT found ..."
fi
}
menuentry '@VTMENU_LB_SBOOT_G4D' --class=boot_g4d --class=F4boot {
2020-06-25 11:01:48 -04:00
if search -n -s -f /grldr; then
ntldr /grldr
else
echo "Grub4dos NOT found ..."
fi
}
menuentry '@VTMENU_LB_SBOOT_HDD1' --class=boot_disk --class=F4boot {
2020-06-14 13:41:33 -04:00
set root=(hd0,1)
chainloader +1
boot
}
menuentry '@VTMENU_LB_SBOOT_HDD2' --class=boot_disk --class=F4boot {
2020-06-14 13:41:33 -04:00
set root=(hd1,1)
chainloader +1
boot
}
menuentry '@VTMENU_LB_SBOOT_HDD3' --class=boot_disk --class=F4boot {
2020-06-14 13:41:33 -04:00
set root=(hd2,1)
chainloader +1
boot
}
else
menuentry '@VTMENU_LB_SBOOT_WINDOWS' --class=boot_windows --class=F4boot {
2020-09-12 10:31:21 -04:00
set partid=3
while [ $partid -le 128 ]; do
if vt_check_part_exist $partid; then
if [ -f ($vtoydev,$partid)/EFI/Microsoft/Boot/bootmgfw.efi ]; then
set root=($vtoydev,$partid)
terminal_output console
chainloader /EFI/Microsoft/Boot/bootmgfw.efi
boot
elif [ -f ($vtoydev,$partid)/efi/Microsoft/Boot/bootmgfw.efi ]; then
set root=($vtoydev,$partid)
terminal_output console
chainloader /efi/Microsoft/Boot/bootmgfw.efi
boot
2020-09-12 10:31:21 -04:00
fi
else
break
fi
vt_incr partid 1
done
2020-06-14 13:41:33 -04:00
if search -n -s -f /EFI/Microsoft/Boot/bootmgfw.efi; then
terminal_output console
chainloader /EFI/Microsoft/Boot/bootmgfw.efi
boot
elif search -n -s -f /efi/Microsoft/Boot/bootmgfw.efi; then
terminal_output console
chainloader /efi/Microsoft/Boot/bootmgfw.efi
boot
2020-06-14 13:41:33 -04:00
else
echo "Windows NOT found ..."
fi
}
2020-12-11 18:56:52 -05:00
if [ "$grub_cpu" = "i386" ]; then
menuentry '@VTMENU_LB_SBOOT_IA32EFI' --class=boot_uefi --class=F4boot {
2020-12-11 18:56:52 -05:00
set VTOY_SEARCH_NO_VTOYEFI=1
if search -n -s -f /efi/boot/bootia32.efi; then
unset VTOY_SEARCH_NO_VTOYEFI
terminal_output console
chainloader /efi/boot/bootia32.efi
boot
else
unset VTOY_SEARCH_NO_VTOYEFI
echo "BOOTIA32.EFI NOT found ..."
fi
}
2021-08-17 02:44:43 -04:00
menuentry '@VTMENU_LB_SBOOT_XORBOOT' --class=boot_xorboot --class=F4boot {
2021-08-17 02:44:43 -04:00
set VTOY_SEARCH_NO_VTOYEFI=1
if search -n -s -f /efi/xorboot/xorboot32.xor; then
unset VTOY_SEARCH_NO_VTOYEFI
terminal_output console
if [ -f /efi/xorboot/bootia32.efi ]; then
chainloader /efi/xorboot/bootia32.efi
elif [ -f /efi/xorboot/xorboot.efi ]; then
chainloader /efi/xorboot/xorboot.efi
fi
boot
else
unset VTOY_SEARCH_NO_VTOYEFI
echo "xorboot NOT found ..."
fi
}
2020-12-11 18:56:52 -05:00
elif [ "$grub_cpu" = "arm64" ]; then
menuentry '@VTMENU_LB_SBOOT_AA64EFI' --class=boot_uefi --class=F4boot {
2020-12-11 18:56:52 -05:00
set VTOY_SEARCH_NO_VTOYEFI=1
if search -n -s -f /efi/boot/bootaa64.efi; then
unset VTOY_SEARCH_NO_VTOYEFI
terminal_output console
chainloader /efi/boot/bootaa64.efi
boot
else
unset VTOY_SEARCH_NO_VTOYEFI
echo "BOOTAA64.EFI NOT found ..."
fi
}
else
menuentry '@VTMENU_LB_SBOOT_X64EFI' --class=boot_uefi --class=F4boot {
2020-12-11 18:56:52 -05:00
set VTOY_SEARCH_NO_VTOYEFI=1
if search -n -s -f /efi/boot/bootx64.efi; then
unset VTOY_SEARCH_NO_VTOYEFI
terminal_output console
chainloader /efi/boot/bootx64.efi
boot
else
unset VTOY_SEARCH_NO_VTOYEFI
echo "BOOTX64.EFI NOT found ..."
fi
}
2021-08-17 02:44:43 -04:00
menuentry '@VTMENU_LB_SBOOT_XORBOOT' --class=boot_xorboot --class=F4boot {
2021-08-17 02:44:43 -04:00
set VTOY_SEARCH_NO_VTOYEFI=1
if search -n -s -f /efi/xorboot/xorboot.xor; then
unset VTOY_SEARCH_NO_VTOYEFI
terminal_output console
if [ -f /efi/xorboot/bootx64.efi ]; then
chainloader /efi/xorboot/bootx64.efi
elif [ -f /efi/xorboot/xorboot.efi ]; then
chainloader /efi/xorboot/xorboot.efi
fi
boot
else
unset VTOY_SEARCH_NO_VTOYEFI
echo "xorboot NOT found ..."
fi
}
2020-12-11 18:56:52 -05:00
fi
2020-06-14 13:41:33 -04:00
fi
menuentry '@VTMENU_RETURN_PREVIOUS' --class=vtoyret VTOY_RET {
2020-06-14 13:41:33 -04:00
echo 'Return ...'
}