]> glassweightruler.freedombox.rocks Git - Ventoy.git/commitdiff
1.0.63 release v1.0.63
authorlongpanda <admin@ventoy.net>
Mon, 20 Dec 2021 12:20:07 +0000 (20:20 +0800)
committerlongpanda <admin@ventoy.net>
Mon, 20 Dec 2021 12:20:07 +0000 (20:20 +0800)
.github/ISSUE_TEMPLATE/issue_template.yml
INSTALL/grub/grub.cfg
INSTALL/tool/VentoyWorker.sh
INSTALL/tool/ventoy_lib.sh

index d0e78bb331adebe2e938c0870e63552db7dd2963..e174da7e61c922d510e8da75b1287ca5e6bf6a5b 100644 (file)
@@ -21,7 +21,7 @@ body:
     attributes:
       label: Ventoy Version
       description: What version of ventoy are you running?
-      placeholder: 1.0.62
+      placeholder: 1.0.63
     validations:
       required: true
   - type: dropdown
index 570fed3684858180816f1683e856812dd8842c12..c32ef94720f025af1fe625417c00d8b3c0c1657a 100644 (file)
@@ -166,6 +166,8 @@ function vt_check_compatible_pe {
 function vt_check_compatible_linux {
     if vt_str_begin "$vt_volume_id" "embootkit"; then
         set ventoy_compatible=YES
+    elif [ -e "$1/casper/tinycore.gz" ]; then
+        set ventoy_compatible=YES
     fi
 
     return
@@ -2020,7 +2022,7 @@ function img_unsupport_menuentry {
 #############################################################
 #############################################################
 
-set VENTOY_VERSION="1.0.62"
+set VENTOY_VERSION="1.0.63"
 
 #ACPI not compatible with Window7/8, so disable by default
 set VTOY_PARAM_NO_ACPI=1
index 22c3de0508b742b28d523ceb494edab3b5bc1f7d..9754e5ed5c01b9716b784425a854b1613d86a25f 100644 (file)
@@ -291,8 +291,23 @@ if [ "$MODE" = "install" -a -z "$NONDESTRUCTIVE" ]; then
     dd status=none conv=fsync if=/dev/zero of=$DISK bs=512 count=32 seek=$part2_start_sector
 
     #format part1
-    vtinfo "Format partition 1 ..."
-    mkexfatfs -n "$VTNEW_LABEL" -s $cluster_sectors ${PART1}
+    wait_and_create_part ${PART1} ${PART2}    
+    if [ -b ${PART1} ]; then
+        vtinfo "Format partition 1 ${PART1} ..."
+        mkexfatfs -n "$VTNEW_LABEL" -s $cluster_sectors ${PART1}
+        if [ $? -ne 0 ]; then
+            echo "mkexfatfs failed, now retry..."
+            mkexfatfs -n "$VTNEW_LABEL" -s $cluster_sectors ${PART1}
+            if [ $? -ne 0 ]; then
+                echo "######### mkexfatfs failed, exit ########"
+                exit 1
+            fi
+        else
+            echo "mkexfatfs success"
+        fi        
+    else
+        vterr "${PART1} NOT exist"
+    fi
 
     vtinfo "writing data to disk ..."    
     dd status=none conv=fsync if=./boot/boot.img of=$DISK bs=1 count=446
index 04eea6429b2f03079f01538f6b697593295d5df8..dbf9475cf3c00c9c96a4cc00fe5c9a6abd9d2e55 100644 (file)
@@ -206,6 +206,48 @@ get_disk_ventoy_version() {
     ventoy_false
 }
 
+wait_and_create_part() {
+    vPART1=$1
+    vPART2=$2
+    echo 'Wait for partitions ...'
+    for i in 0 1 2 3 4 5 6 7 8 9; do
+        if ls -l $vPART1 2>/dev/null | grep -q '^b'; then
+            if ls -l $vPART2 2>/dev/null | grep -q '^b'; then
+                break
+            fi
+        else
+            echo "Wait for $vPART1/$vPART2 ..."
+            sleep 1
+        fi
+    done
+
+    if ls -l $vPART1 2>/dev/null | grep -q '^b'; then
+        echo "$vPART1 exist OK"
+    else
+        MajorMinor=$(sed "s/:/ /" /sys/class/block/${vPART1#/dev/}/dev)        
+        echo "mknod -m 0660 $vPART1 b $MajorMinor ..."
+        mknod -m 0660 $vPART1 b $MajorMinor
+    fi
+    
+    if ls -l $vPART2 2>/dev/null | grep -q '^b'; then
+        echo "$vPART2 exist OK"
+    else
+        MajorMinor=$(sed "s/:/ /" /sys/class/block/${vPART2#/dev/}/dev)        
+        echo "mknod -m 0660 $vPART2 b $MajorMinor ..."
+        mknod -m 0660 $vPART2 b $MajorMinor        
+    fi
+
+    if ls -l $vPART1 2>/dev/null | grep -q '^b'; then
+        if ls -l $vPART2 2>/dev/null | grep -q '^b'; then
+            echo "partition exist OK"
+        fi
+    else
+        echo "[FAIL] $vPART1/$vPART2 does not exist"
+        exit 1
+    fi
+}
+
+
 format_ventoy_disk_mbr() {
     reserve_mb=$1
     DISK=$2