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
read vtInputKey
fi
+for vtTFile in ventoy.json ventoy_grub.cfg; do
+ if [ -f $vtoy_efi_part/ventoy/$vtTFile ]; then
+ clear
+ echo -e "\n You need to put $vtTFile in the 1st partition which hold the ISO files.\n"
+ echo -e " $vtTFile 放错分区了,请放到镜像分区里的 ventoy 目录下(此目录需要手动创建)!\n"
+ echo -e "\n press ENTER to continue (请按 回车 键继续) ..."
+ read vtInputKey
+ fi
+done
+
+
#export necessary variable
export theme
export gfxmode