diff --git a/boot/grub/script/autoiso.cfg b/boot/grub/script/autoiso.cfg index ea9bd29..7ed6594 100755 --- a/boot/grub/script/autoiso.cfg +++ b/boot/grub/script/autoiso.cfg @@ -14,12 +14,14 @@ # You should have received a copy of the GNU General Public License # along with GRUB. If not, see . +# NOTE: iso_path sometimes has a special meaning to the next stage of the boot. + function pathname { regexp -s 2:"$2" '^(\(.*\))/*(/.*)$' "$1"; } function devname { regexp -s "$2" '^(\(.*\)).*$' "$1"; } function isolinux_iso_entry { realdev="$1" - isopath="$2" + iso_path="$2" loopdev="$3" if test -f /boot/isolinux/isolinux.cfg; then @@ -34,15 +36,15 @@ function isolinux_iso_entry { return 1; fi - echo isolinux based $isopath: yes + echo isolinux based $iso_path: yes probe -s label -l $realdev - menuentry "${indent}${isopath} (isolinux)" "$realdev" "$isopath" "$cfgpath" { + menuentry "${indent}${iso_path} (isolinux)" "$realdev" "$iso_path" "$cfgpath" { set device="$2" - set isopath="$3" + set iso_path="$3" set cfgpath="$4" probe -s rootuuid -u $device - loopback loop "${device}${isopath}" + loopback loop "${device}${iso_path}" set root=(loop) # this flag requires a hacked grub!! @@ -51,31 +53,31 @@ function isolinux_iso_entry { set linux_extra="$langset" # arch based - set linux_extra="${linux_extra} img_dev=/dev/disk/by-uuid/$rootuuid img_loop=$isopath earlymodules=loop" + set linux_extra="${linux_extra} img_dev=/dev/disk/by-uuid/$rootuuid img_loop=$iso_path earlymodules=loop" # gentoo based - set linux_extra="${linux_extra} isofrom=$isopath" + set linux_extra="${linux_extra} isofrom=$iso_path" # ubuntu based, fedora, opensuse, rosa - set linux_extra="${linux_extra} iso-scan/filename=$isopath" + set linux_extra="${linux_extra} iso-scan/filename=$iso_path" # antiX based - set linux_extra="${linux_extra} from=all fromiso=$isopath" + set linux_extra="${linux_extra} from=all fromiso=$iso_path" # Grml Live Linux - set linux_extra="${linux_extra} findiso=$isopath" + set linux_extra="${linux_extra} findiso=$iso_path" # sysrcd - set linux_extra="${linux_extra} isoloop=$isopath" + set linux_extra="${linux_extra} isoloop=$iso_path" # MagOS Linux (UIRD) - set linux_extra="${linux_extra} uird.from=${isopath},/MagOS uird.force scantimeout=3" + set linux_extra="${linux_extra} uird.from=${iso_path},/MagOS uird.force scantimeout=3" # TODO: SUSE based - set linux_extra="${linux_extra} isofrom_device=/dev/disk/by-uuid/$rootuuid isofrom_system=$isopath" + set linux_extra="${linux_extra} isofrom_device=/dev/disk/by-uuid/$rootuuid isofrom_system=$iso_path" # others? - set linux_extra="${linux_extra} isoboot=$isopath" + set linux_extra="${linux_extra} isoboot=$iso_path" export linux_extra syslinux_configfile $cfgpath @@ -85,7 +87,7 @@ function isolinux_iso_entry { function loopback_iso_entry { realdev="$1" - isopath="$2" + iso_path="$2" loopdev="$3" if test -f /boot/grub/loopback.cfg; then @@ -96,19 +98,17 @@ function loopback_iso_entry { return 1 fi - echo loopback.cfg $isopath: yes - probe -s label -l $realdev - menuentry "${indent}${isopath} (loopback)" "$realdev" "$isopath" "$cfgpath" { + echo loopback.cfg $iso_path: yes + menuentry "${indent}${iso_path} (loopback)" "$realdev" "$iso_path" "$cfgpath" { set device="$2" - set isopath="$3" + set iso_path="$3" set cfgpath="$4" - loopback loop "${device}${isopath}" + loopback loop "${device}${iso_path}" set root=(loop) probe -s rootuuid -u $device - set isopath="$isopath $langset" - export isopath + export iso_path configfile $cfgpath loopback -d loop @@ -125,15 +125,15 @@ function scan_isos { for file in ${dev}${dir}/*.iso ${dev}${dir}/*.ISO; do if ! test -f "$file"; then continue; fi - pathname $file isopath + pathname $file iso_path if ! loopback loopdev_scan "$file"; then continue; fi saved_root=$root set root=(loopdev_scan) if false; then true; - elif loopback_iso_entry $dev $isopath (loopdev_scan); then true; - elif isolinux_iso_entry $dev $isopath (loopdev_scan); then true; + elif loopback_iso_entry $dev $iso_path (loopdev_scan); then true; + elif isolinux_iso_entry $dev $iso_path (loopdev_scan); then true; else true; fi set root=$saved_root diff --git a/release b/release new file mode 100755 index 0000000..2b28322 --- /dev/null +++ b/release @@ -0,0 +1,5 @@ +pushd grub && { + ./grub-install --boot-directory=../boot dummy.img + popd +} +tar cvf grub-iso-multiboot.tar.gz boot/