X-Git-Url: https://glassweightruler.freedombox.rocks/gitweb/Ventoy.git/blobdiff_plain/390eec4218444c0e3583ee0ccf5ec8b27b3273dd..a37c6af8d083a98e64bb6c30efccf60eb3f71a6d:/INSTALL/grub/grub.cfg diff --git a/INSTALL/grub/grub.cfg b/INSTALL/grub/grub.cfg index 15fe1e6..2a61314 100644 --- a/INSTALL/grub/grub.cfg +++ b/INSTALL/grub/grub.cfg @@ -964,7 +964,19 @@ function iso_common_menuentry { unset vt_volume_id vt_chosen_img_path vt_chosen_path vt_chosen_size - vt_parse_iso_volume "${vtoy_iso_part}${vt_chosen_path}" vt_system_id vt_volume_id + + vt_parse_iso_volume "${vtoy_iso_part}${vt_chosen_path}" vt_system_id vt_volume_id vt_volume_space + if [ $vt_volume_space -ne $vt_chosen_size ]; then + vt_mod $vt_chosen_size 2048 vt_chosen_size_mod + if [ $vt_volume_space -gt $vt_chosen_size -o $vt_chosen_size_mod -ne 0 ]; then + echo -e "\n $vt_volume_space $vt_chosen_size $vt_chosen_size_mod\n" + echo -e "\n The size of the iso file \"$vt_chosen_size\" is invalid. File corrupted ?\n" + echo -e " 此ISO文件的大小 \"$vt_chosen_size\" 有问题,请确认文件是否损坏。\n" + echo -e "\n press ENTER to exit (请按 回车 键返回) ..." + read vtInputKey + return + fi + fi if vt_check_password "${vt_chosen_path}"; then return