]> glassweightruler.freedombox.rocks Git - Ventoy.git/blobdiff - IMG/cpio/ventoy/init
support language font in partition Configuration Dialog
[Ventoy.git] / IMG / cpio / ventoy / init
index 61659fc38aab8d2c2b80a8b0a63d5ec325e5414c..e46aceb62c1fc97562db5fae8cdcedb448b29a2b 100644 (file)
@@ -72,6 +72,13 @@ ventoy_is_initrd_ramdisk() {
     fi
 }
 
+ventoy_mount_squashfs() {
+    mkdir /dev
+    mount -t devtmpfs devtmpfs /dev    
+    dd if=$1 of=/dev/ram0 status=none
+    umount /dev && rm -rf /dev
+}
+
 # param: file skip magic tmp
 ventoy_unpack_initramfs() {        
     vtfile=$1; vtskip=$2; vtmagic=$3; vttmp=$4    
@@ -83,6 +90,11 @@ ventoy_unpack_initramfs() {
     #    vtmagic='1F8B'
     #fi
     
+    if [ "${vtmagic:0:4}" = '6873' ]; then
+        ventoy_mount_squashfs $vtfile
+        return
+    fi
+    
     for vtx in '1F8B zcat' '1F9E zcat' '425A bzcat' '5D00 lzcat' 'FD37 xzcat' '894C lzopcat' '0221 lz4cat' '28B5 zstdcat' '3037 cat'; do
         if [ "${vtx:0:4}" = "${vtmagic:0:4}" ]; then
             echo "vtx=$vtx" >> $VTLOG