This apparently has been broken since 15 Feb 2011 with commit 5e8c294abe448bc15839c7781174ea9b7156228b.
Sorry for not noticing sooner.
commit 357799425eefea9599c559c8e001f33bdd52f4cb Author: Frederick Grose fgrose@sugarlabs.org Date: Sun Feb 26 20:05:42 2012 -0800
Restore capability to load the running LiveOS image.
If the source is /dev/live or /dev/sr0, mount it on a loop device.
diff --git a/tools/livecd-iso-to-disk.sh b/tools/livecd-iso-to-disk.sh index 3ae88a2..3b1add8 100755 --- a/tools/livecd-iso-to-disk.sh +++ b/tools/livecd-iso-to-disk.sh @@ -906,13 +906,15 @@ fi
# do some basic sanity checks. checkMounted $TGTDEV - # FIXME: would be better if we had better mountpoints SRCMNT=$(mktemp -d /media/srctmp.XXXXXX) -if [ -b "$SRC" ]; then - mount -o ro "$SRC" $SRCMNT || exitclean -elif [ -f "$SRC" ]; then +if [[ -f $SRC || /dev/live == $1 || /dev/sr0 == $1 ]]; then mount -o loop,ro "$SRC" $SRCMNT || exitclean + imgtype='iso' + [[ /dev/live == $1 ]] && imgtype='live' +elif [[ -b $SRC ]]; then + mount -o ro "$SRC" $SRCMNT || exitclean + imgtype='blk' else echo "$SRC is not a file or block device." exitclean
On Sun, Feb 26, 2012 at 08:36:11PM -0800, Frederick Grose wrote:
This apparently has been broken since 15 Feb 2011 with commit 5e8c294abe448bc15839c7781174ea9b7156228b.
Sorry for not noticing sooner.
commit 357799425eefea9599c559c8e001f33bdd52f4cb Author: Frederick Grose fgrose@sugarlabs.org Date: Sun Feb 26 20:05:42 2012 -0800
Restore capability to load the running LiveOS image. If the source is /dev/live or /dev/sr0, mount it on a loop device.
diff --git a/tools/livecd-iso-to-disk.sh b/tools/livecd-iso-to-disk.sh index 3ae88a2..3b1add8 100755 --- a/tools/livecd-iso-to-disk.sh +++ b/tools/livecd-iso-to-disk.sh @@ -906,13 +906,15 @@ fi
# do some basic sanity checks. checkMounted $TGTDEV
# FIXME: would be better if we had better mountpoints SRCMNT=$(mktemp -d /media/srctmp.XXXXXX) -if [ -b "$SRC" ]; then
- mount -o ro "$SRC" $SRCMNT || exitclean
-elif [ -f "$SRC" ]; then +if [[ -f $SRC || /dev/live == $1 || /dev/sr0 == $1 ]]; then mount -o loop,ro "$SRC" $SRCMNT || exitclean
- imgtype='iso'
- [[ /dev/live == $1 ]] && imgtype='live'
+elif [[ -b $SRC ]]; then
- mount -o ro "$SRC" $SRCMNT || exitclean
- imgtype='blk'
else echo "$SRC is not a file or block device." exitclean
imgtype conflicts with the current code where I use it to keep track of the type of the iso's install image.
Also, I haven't done any testing with using /dev/live or sr0 as a source -- I'm not sure if that still works.
livecd@lists.fedoraproject.org