# install md-modules
LINE=$($GREP ' md-modules.*\.udeb' $VTOY_PATH/iso_file_list)
if [ $? -eq 0 ]; then
+ LINTCNT=$($GREP -c ' md-modules.*\.udeb' $VTOY_PATH/iso_file_list)
+ if [ $LINTCNT -gt 1 ]; then
+ vtlog "more than one pkgs, need to filter..."
+ VER=$($BUSYBOX_PATH/uname -r)
+
+ LINE=$($GREP ' md-modules.*\.udeb' $VTOY_PATH/iso_file_list | $GREP $VER)
+ LINTCNT=$($GREP ' md-modules.*\.udeb' $VTOY_PATH/iso_file_list | $GREP -c $VER)
+ if [ $LINTCNT -gt 1 ]; then
+ vtlog "Still more than one pkgs, use the first one..."
+ LINE=$($GREP ' md-modules.*\.udeb' $VTOY_PATH/iso_file_list | $GREP -m1 $VER)
+ fi
+ fi
install_udeb_from_line "$LINE" ${vt_usb_disk}
fi
if $GREP -q 'device-mapper' /proc/devices; then
vtlog "device mapper module is loaded"
else
- vtlog"device mapper module is NOT loaded, now load it..."
+ vtlog "device mapper module is NOT loaded, now load it..."
VER=$($BUSYBOX_PATH/uname -r)
KO=$($FIND /lib/modules/$VER/kernel/drivers/md -name "dm-mod*")
exit 0
fi
+vtlog "==== $0 $* ===="
+
dmsetup_path=$(ventoy_find_bin_path dmsetup)
if [ -z "$dmsetup_path" ]; then
ventoy_os_install_dmsetup "/dev/${1:0:-1}"