]> code.delx.au - monosys/commitdiff
multiboot - support for old Ubuntu images as well
authorJames Bunton <jamesbunton@delx.net.au>
Mon, 12 Jun 2023 02:38:00 +0000 (12:38 +1000)
committerJames Bunton <jamesbunton@delx.net.au>
Mon, 12 Jun 2023 02:38:00 +0000 (12:38 +1000)
hacks/multiboot-setup

index aafcb4883d2f9f0cf9e4515844d1e61431de3f37..30bbe589cf04b9cc88da6662f944f2310568e324 100755 (executable)
@@ -224,8 +224,16 @@ done
 function setup_ubuntu {
   menuentry "\$1" {
     loopback loop \$1
+    set maybe_layerfs_path=''
+    for f in minimal.standard.live.squashfs; do
+      if [ -f "(loop)/casper/\$f" ]; then
+        echo " \$f"
+        set maybe_layerfs_path="layerfs-path=\$f"
+        echo "Setting \$maybe_layerfs_path"
+      fi
+    done
     echo "Loading kernel..."
-    linux (loop)/casper/vmlinuz* layerfs-path=minimal.standard.live.squashfs boot=casper iso-scan/filename=\$1 \$maybe_to_ram \$maybe_quiet
+    linux (loop)/casper/vmlinuz* \$maybe_layerfs_path boot=casper iso-scan/filename=\$1 \$maybe_to_ram \$maybe_quiet
     echo "Loading initrd..."
     initrd (loop)/casper/initrd*
   }