[PATCH] Add support for getting stage2 image from boot.iso (#1035514)
Martin Kolman
mkolman at redhat.com
Mon Jan 20 18:34:03 UTC 2014
The boot.iso does not have the .discimage file in its
root directory, so we need to check if there is either:
LiveOS/squashfs.img
images/install.img
or
.treeinfo
If there is any one of those, the ISO can be used
for obtaining the stage2 image.
Signed-off-by: Martin Kolman <mkolman at redhat.com>
---
dracut/anaconda-lib.sh | 9 +++++++--
1 file changed, 7 insertions(+), 2 deletions(-)
diff --git a/dracut/anaconda-lib.sh b/dracut/anaconda-lib.sh
index 86ab570..d282297 100755
--- a/dracut/anaconda-lib.sh
+++ b/dracut/anaconda-lib.sh
@@ -22,11 +22,16 @@ config_get() {
}
find_iso() {
- local f="" iso="" isodir="$1" tmpmnt=$(mkuniqdir /run/install tmpmnt)
+ local f="" p="" iso="" isodir="$1" tmpmnt=$(mkuniqdir /run/install tmpmnt)
for f in $isodir/*.iso; do
[ -e $f ] || continue
mount -o loop,ro $f $tmpmnt || continue
- [ -e $tmpmnt/.discinfo ] && iso=$f
+ # Valid ISOs either have stage2 in one of the supported paths
+ # or have a .treeinfo that might tell use where to find the stage2 image.
+ # If it does not have any of those, it is not valid and will not be used.
+ for p in $tmpmnt/LiveOS/squashfs.img $tmpmnt/images/install.img $tmpmnt/.treeinfo; do
+ if [ -e $p ]; then iso=$f; break; fi
+ done
umount $tmpmnt
if [ "$iso" ]; then echo "$iso"; return 0; fi
done
--
1.8.4.2
More information about the anaconda-patches
mailing list