From 3e46c7ee3b2f2c290dcc740d047e9fe1196b742d Mon Sep 17 00:00:00 2001 From: Greg Darke Date: Thu, 19 May 2022 16:00:29 +1000 Subject: [PATCH] multiboot: Allow iso files to be placed in directory. We now also scan the contents of the iso directory on the USB stick for images. We treat these the same as if they were in the root directory. While we were here, add status messages about what is being loaded. --- hacks/multiboot-setup | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/hacks/multiboot-setup b/hacks/multiboot-setup index 8abc2be..05d0457 100755 --- a/hacks/multiboot-setup +++ b/hacks/multiboot-setup @@ -118,7 +118,7 @@ function setup_arch { initrd (loop)/arch/boot/*.img (loop)/arch/boot/x86_64/initramfs-*.img } } -for iso in /archlinux-*.iso; do +for iso in /archlinux-*.iso /isos/archlinux-*.iso; do if [ -f "\$iso" ]; then setup_arch \$iso fi @@ -158,11 +158,13 @@ function setup_fedora { menuentry "\$1" { loopback loop \$1 probe -s iso_label -l (loop) + echo "Loading kernel..." linux (loop)/isolinux/vmlinuz root=live:CDLABEL=\$iso_label rd.live.image quiet iso-scan/filename=\$1 + echo "Loading initrd..." initrd (loop)/isolinux/initrd.img } } -for iso in /Fedora-Workstation-Live-*.iso; do +for iso in /Fedora-Workstation-Live-*.iso /isos/Fedora-Workstation-Live-*.iso; do if [ -f "\$iso" ]; then setup_fedora \$iso fi @@ -171,11 +173,13 @@ done function setup_ubuntu { menuentry "\$1" { loopback loop \$1 - linux (loop)/casper/vmlinuz* boot=casper quiet iso-scan/filename=\$1 + echo "Loading kernel..." + linux (loop)/casper/vmlinuz* boot=casper quiet iso-scan/filename=\$1 \$maybe_to_ram + echo "Loading initrd..." initrd (loop)/casper/initrd* } } -for iso in /ubuntu-*-desktop-*.iso; do +for iso in /ubuntu-*-desktop-*.iso /isos/ubuntu-*-desktop-*.iso; do if [ -f "\$iso" ]; then setup_ubuntu \$iso fi -- 2.39.2