From: Erik Ziegenbalg Date: Fri, 16 Mar 2018 19:48:18 +0000 (+0000) Subject: fromiso: add support for local ISO (ONIE) X-Git-Tag: debian/1%20180328~7 X-Git-Url: http://git.grml.org/?p=live-boot-grml.git;a=commitdiff_plain;h=0bfbe98e1363a0617b35d528907fbd5cf669a97d fromiso: add support for local ISO (ONIE) An ONIE system on boot will uncompress a local ISO image. Handle that case in live-boot to support it. --- diff --git a/components/9990-misc-helpers.sh b/components/9990-misc-helpers.sh index 23024eb..1b89e59 100755 --- a/components/9990-misc-helpers.sh +++ b/components/9990-misc-helpers.sh @@ -120,7 +120,24 @@ check_dev () if [ "$ISO_DEVICE" = "/" ] then - echo "Warning: device for bootoption fromiso= ($FROMISO) not found.">>/boot.log + # not a block device, check if it's an iso file, for + # example an ISO when booting on an ONIE system + if echo "${FROMISO}" | grep -q "\.iso$" + then + fs_type=$(get_fstype "${FROMISO}") + if is_supported_fs ${fs_type} + then + mkdir /run/live/fromiso + mount -t $fs_type "${FROMISO}" /run/live/fromiso + if [ "$?" != 0 ] + then + echo "Warning: unable to mount ${FROMISO}." >>/boot.log + fi + devname="/run/live/fromiso" + fi + else + echo "Warning: device for bootoption fromiso= ($FROMISO) not found.">>/boot.log + fi else fs_type=$(get_fstype "${ISO_DEVICE}") if is_supported_fs ${fs_type}