]> glassweightruler.freedombox.rocks Git - Ventoy.git/blobdiff - INSTALL/grub/grub.cfg
Fix the issue when booting the latest recalbox img file. (#1423)
[Ventoy.git] / INSTALL / grub / grub.cfg
index 4840c576f262a20dad92b09c08fa4438b4327eed..950d38ced7283e2b6f132b7a15fc39f986303fcc 100644 (file)
@@ -1688,9 +1688,23 @@ function ventoy_img_ubos {
 }
 
 function ventoy_img_recalbox {
+    if [ $vtoy_img_max_part_end -gt $vt_chosen_size ]; then
+        echo -e "\nPlease extend the img file size before boot it. \n"
+        ventoy_pause
+        return
+    fi
+
     vt_load_cpio  $vtoy_path  "${vt_chosen_path}" ${vtoy_iso_part} "busybox=$ventoy_busybox_ver"
     vt_trailer_cpio ${vtoy_iso_part} "${vt_chosen_path}" noinit
 
+    if [ -e (vtimghd,1)/boot/recalbox ]; then
+        loopback recalbox (vtimghd,1)/boot/recalbox
+        vt_get_lib_module_ver (recalbox) /lib/modules/ vt_module_ver
+        if [ -n "$vt_module_ver" ]; then        
+            vt_img_extra_initrd_append  (recalbox)/lib/modules/$vt_module_ver/kernel/drivers/md/dm-mod.ko
+        fi
+    fi
+
     ventoy_debug_pause
 
     #boot image file
@@ -1971,7 +1985,7 @@ function img_common_menuentry {
         ventoy_img_batocera
     elif vt_str_begin "$vtImgHd1Label" "Tails"; then
         ventoy_img_tails
-    elif [ "$vtImgHd2Label" = "RECALBOX" ]; then
+    elif [ "$vtImgHd2Label" = "RECALBOX" -o "$vtImgHd1Label" = "RECALBOX" ]; then
         ventoy_img_recalbox
     elif [ "$vtImgHd1Label" = "ESYSRESCUE" ]; then
         ventoy_img_esysrescue