]> glassweightruler.freedombox.rocks Git - Ventoy.git/commitdiff
Fix the issue when make vlnk for NTFS partition under Linux (#1430)
authorlongpanda <admin@ventoy.net>
Sun, 13 Feb 2022 13:25:58 +0000 (21:25 +0800)
committerlongpanda <admin@ventoy.net>
Sun, 13 Feb 2022 13:25:58 +0000 (21:25 +0800)
Vlnk/VentoyVlnk.sh

index 5037df1517c3c15e232f1071652a469fdba46cf0..e242d071fc4dafbe99b0ffa93ba8670a7ae27b2e 100644 (file)
@@ -153,11 +153,23 @@ if [ "$CMD" = "c" ]; then
     
     #check fs
     if grep -q " ${FULLDIR} " /proc/mounts; then
+        DEV=$(grep " ${FULLDIR} " /proc/mounts | awk '{print $1}')
         FS=$(grep " ${FULLDIR} " /proc/mounts | awk '{print $3}')
-        vlog "File system is $FS"
+        vlog "File system of $DEV is $FS"
         
         if echo $FS | egrep -q "ext2|ext3|ext4|exfat|vfat|fat32|fat16|fat12|ntfs|xfs|udf"; then
             vlog "FS OK"
+        elif [ "$FS" = "fuseblk" ]; then
+            vlog "$DEV is fuseblk"
+            if hexdump -C -n 8 $DEV | grep -q "NTFS"; then
+                vlog "$DEV is NTFS OK"
+            elif hexdump -C -n 8 $DEV | grep -q "EXFAT"; then
+                vlog "$DEV is exFAT OK"
+            else
+                echo "$DEV is not supported!"
+                hexdump -C -n 8 $DEV
+                exit 1
+            fi
         else
             echo "$FS is not supported!"
             exit 1