Probe the device where the Grml ISO is being stored using ${grub_probe} instead of...
[grml-rescueboot.git] / 42_grml
diff --git a/42_grml b/42_grml
index e30519f..6913346 100755 (executable)
--- a/42_grml
+++ b/42_grml
@@ -34,9 +34,11 @@ for grmliso in $list ; do
 
   cat << EOF
 menuentry "${title}" {
-$(prepare_grub_to_access_device ${GRUB_DEVICE_BOOT} | sed -e "s/^/        /")
-        iso_path="${rel_dirname}/$grml $CUSTOM_BOOTOPTIONS"
+$(prepare_grub_to_access_device $(${grub_probe} -t device ${grmliso}) | sed -e "s/^/        /")
+        iso_path="${rel_dirname}/${grml}"
         export iso_path
+        kernelopts="$CUSTOM_BOOTOPTIONS"
+        export kernelopts
         loopback loop "${rel_dirname}/$grml"
         set root=(loop)
         configfile /boot/grub/loopback.cfg