This version of livecd-iso-to-disk is reworked to use the source root filesystem in a chroot by default, along with the livecd-iso-to-disk script embedded in the source.  A --nochroot as well as a --avoidsourcescript option are available for cases where the launching filesystem and/or installation script is called for.

One can load a Live USB by these steps:
 1. mounting the source.iso
 2. determine its loop device, /dev/loopN
 3. call /mountpoint/LiveOS/livecd-iso-to-disk /dev/loopN /dev/target

All 3 steps could be avoided by providing some appropriate autorun scripts for the iso, or including some standard install scripts that could be invoked by clicking on them in Nautilus.

By mounting the source.iso LiveOS filesystem in a chroot enviroment, the current version of software components, including the installation script, on the source can be used for installation.  (If syslinux-extlinux is not in the source, ext234,btrfs target devices will have to use the --nochroot option and a system with the proper bootloader.)  An --avoidsourcescript option is also added to allow installation with alternative scripts.

This new version of livecd-iso-to-disk prefers builtin functions, finds and offers to unmount mounted targets, and reorders some compatibility checks in order to bailout early, if needed.

If this passes further testing (the DVD and netinst installer paths are untested), I can submit incremental patches for these changes.

Link to the reworked livecd-iso-to-disk script,
https://bugzilla.redhat.com/attachment.cgi?id=610112

Filed on this ticket,
https://bugzilla.redhat.com/show_bug.cgi?id=663986


Testing and comments would be appreciated.

            --Fred