]> glassweightruler.freedombox.rocks Git - Ventoy.git/blobdiff - IMG/cpio/ventoy/hook/alpine/udev_disk_hook.sh
Auto use memdisk mode for KolibriOS.iso
[Ventoy.git] / IMG / cpio / ventoy / hook / alpine / udev_disk_hook.sh
index 930009bc0ab27c44a3c11a35983951df392373cf..91391cca10393bd85ffecbbf93d99d3262e6b7b1 100644 (file)
@@ -59,7 +59,15 @@ mkdir -p $VTOY_PATH/mnt
 mount /vt_modloop $VTOY_PATH/mnt
 
 KoModPath=$(find $VTOY_PATH/mnt/ -name 'dm-mod.ko*')
-vtlog "insmod $KoModPath"
+vtlog "KoModPath=$KoModPath"
+
+if modinfo $KoModPath | grep -q 'depend.*dax'; then
+    vtlog "First install dax mod ..."
+    DaxModPath=$(echo $KoModPath | sed 's#md/dm-mod#dax/dax#')
+    vtlog "insmod $DaxModPath"
+    insmod $DaxModPath
+fi
+
 insmod $KoModPath
 
 umount $VTOY_PATH/mnt