X-Git-Url: https://glassweightruler.freedombox.rocks/gitweb/Ventoy.git/blobdiff_plain/9eb334d99a1d2890fa7b17cf47250e94689d39ee..b0031059256f50ccb806490fbd4e097fee0afc97:/INSTALL/grub/localboot.cfg diff --git a/INSTALL/grub/localboot.cfg b/INSTALL/grub/localboot.cfg index ff83416..7abd3fe 100644 --- a/INSTALL/grub/localboot.cfg +++ b/INSTALL/grub/localboot.cfg @@ -1,6 +1,6 @@ if [ "$grub_platform" = "pc" ]; then - menuentry 'Search and boot Windows' --class=boot_windows { + menuentry 'Search and boot Windows' --class=boot_windows --class=F4boot { set partid=3 while [ $partid -le 128 ]; do @@ -21,7 +21,12 @@ if [ "$grub_platform" = "pc" ]; then if search -n -s -f /Boot/BCD; then for bt in bootmgr BOOTMGR Bootmgr BootMGR; do if [ -f /$bt ]; then - ntldr /$bt + if regexp '^hd0' $root; then + ntldr /$bt + else + drivemap -s hd0 $root + ntldr /$bt + fi break fi done @@ -33,7 +38,7 @@ if [ "$grub_platform" = "pc" ]; then fi } - menuentry 'Search and boot Grub4dos' --class=boot_g4d { + menuentry 'Search and boot Grub4dos' --class=boot_g4d --class=F4boot { if search -n -s -f /grldr; then ntldr /grldr else @@ -41,19 +46,19 @@ if [ "$grub_platform" = "pc" ]; then fi } - menuentry 'Boot the 1st local disk' --class=boot_disk { + menuentry 'Boot the 1st local disk' --class=boot_disk --class=F4boot { set root=(hd0,1) chainloader +1 boot } - menuentry 'Boot the 2nd local disk' --class=boot_disk { + menuentry 'Boot the 2nd local disk' --class=boot_disk --class=F4boot { set root=(hd1,1) chainloader +1 boot } - menuentry 'Boot the 3rd local disk' --class=boot_disk { + menuentry 'Boot the 3rd local disk' --class=boot_disk --class=F4boot { set root=(hd2,1) chainloader +1 boot @@ -61,7 +66,7 @@ if [ "$grub_platform" = "pc" ]; then else - menuentry 'Search and boot Windows' --class=boot_windows { + menuentry 'Search and boot Windows' --class=boot_windows --class=F4boot { set partid=3 while [ $partid -le 128 ]; do @@ -87,15 +92,48 @@ else fi } - menuentry 'Search and boot BOOTX64.EFI' --class=boot_uefi { - 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 - } + if [ "$grub_cpu" = "i386" ]; then + menuentry 'Search and boot BOOTIA32.EFI' --class=boot_uefi --class=F4boot { + 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 + } + elif [ "$grub_cpu" = "arm64" ]; then + menuentry 'Search and boot BOOTAA64.EFI' --class=boot_uefi --class=F4boot { + 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 'Search and boot BOOTX64.EFI' --class=boot_uefi --class=F4boot { + 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 + } + fi + + fi