Ventoy/INSTALL/grub/localboot.cfg

105 lines
2.8 KiB
INI
Raw Normal View History

2020-06-14 13:41:33 -04:00
if [ "$grub_platform" = "pc" ]; then
2020-09-12 10:31:21 -04:00
menuentry 'Search and boot Windows' --class=boot_windows {
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
ntldr /$bt
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
}
2020-06-25 11:01:48 -04:00
menuentry 'Search and boot Grub4dos' --class=boot_g4d {
if search -n -s -f /grldr; then
ntldr /grldr
else
echo "Grub4dos NOT found ..."
fi
}
menuentry 'Boot the 1st local disk' --class=boot_disk {
2020-06-14 13:41:33 -04:00
set root=(hd0,1)
chainloader +1
boot
}
2020-06-25 11:01:48 -04:00
menuentry 'Boot the 2nd local disk' --class=boot_disk {
2020-06-14 13:41:33 -04:00
set root=(hd1,1)
chainloader +1
boot
}
2020-06-25 11:01:48 -04:00
menuentry 'Boot the 3rd local disk' --class=boot_disk {
2020-06-14 13:41:33 -04:00
set root=(hd2,1)
chainloader +1
boot
}
else
2020-06-25 11:01:48 -04:00
menuentry 'Search and boot Windows' --class=boot_windows {
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
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
else
echo "Windows NOT found ..."
fi
}
2020-06-25 11:01:48 -04:00
menuentry 'Search and boot BOOTX64.EFI' --class=boot_uefi {
2020-06-14 13:41:33 -04:00
if search -n -s -f /efi/boot/bootx64.efi; then
terminal_output console
chainloader /efi/boot/bootx64.efi
boot
else
echo "BOOTX64.EFI NOT found ..."
fi
}
fi
2020-07-22 11:30:01 -04:00
menuentry 'Return to previous menu [Esc]' --class=vtoyret VTOY_RET {
2020-06-14 13:41:33 -04:00
echo 'Return ...'
}