From e1d161af4f7df58723e3a59f306aedfb90af62c7 Mon Sep 17 00:00:00 2001 From: longpanda Date: Mon, 2 May 2022 18:21:30 +0800 Subject: [PATCH] Fix a issue when booting easyos 3.4.3+ --- IMG/cpio/ventoy/loop/easyos/ventoy-disk.sh | 4 ++-- INSTALL/grub/grub.cfg | 4 +++- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/IMG/cpio/ventoy/loop/easyos/ventoy-disk.sh b/IMG/cpio/ventoy/loop/easyos/ventoy-disk.sh index 2fa00497..13a9706e 100644 --- a/IMG/cpio/ventoy/loop/easyos/ventoy-disk.sh +++ b/IMG/cpio/ventoy/loop/easyos/ventoy-disk.sh @@ -27,8 +27,8 @@ vtlog "####### $0 $* ########" VTPATH_OLD=$PATH; PATH=$BUSYBOX_PATH:$VTOY_PATH/tool:$PATH -$BUSYBOX_PATH/insmod $VTOY_PATH/modules/dax.ko -$BUSYBOX_PATH/insmod $VTOY_PATH/modules/dm-mod.ko +[ -f $VTOY_PATH/modules/dax.ko ] && $BUSYBOX_PATH/insmod $VTOY_PATH/modules/dax.ko +[ -f $VTOY_PATH/modules/dm-mod.ko ] && $BUSYBOX_PATH/insmod $VTOY_PATH/modules/dm-mod.ko wait_for_usb_disk_ready diff --git a/INSTALL/grub/grub.cfg b/INSTALL/grub/grub.cfg index 91d5713e..ac1e3ea6 100644 --- a/INSTALL/grub/grub.cfg +++ b/INSTALL/grub/grub.cfg @@ -1640,7 +1640,9 @@ function ventoy_img_easyos { if [ -n "$vt_module_ver" ]; then for mod in "kernel/drivers/md/dm-mod.ko" "kernel/drivers/dax/dax.ko"; do - vt_img_extra_initrd_append (easysfs)/lib/modules/$vt_module_ver/$mod + if [ -e (easysfs)/lib/modules/$vt_module_ver/$mod ]; then + vt_img_extra_initrd_append (easysfs)/lib/modules/$vt_module_ver/$mod + fi done fi