X-Git-Url: http://git.grml.org/?a=blobdiff_plain;f=components%2F9990-misc-helpers.sh;h=75338e06a9ee4fa03580e585d5003a37ede32740;hb=d825b74dd44ee4f58f5eb45f468e3cc7c273dfb2;hp=23024eb61d934ff266df6bec04e37c7e4b75e859;hpb=00b1535be06d4c045033a7f7b8a8226d44e40ded;p=live-boot-grml.git diff --git a/components/9990-misc-helpers.sh b/components/9990-misc-helpers.sh index 23024eb..75338e0 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} @@ -455,6 +472,14 @@ is_supported_fs () fi # Try to look if it is already supported by the kernel + # For ntfs, since user space program ntfs-3g will be used. Check ntfs-3g instead of kernel module. + if [ "${fstype}" = "ntfs" ]; then + if type ntfs-3g >/dev/null 2>&1; then + return 0 + else + return 1 + fi + fi if grep -q ${fstype} /proc/filesystems then return 0