A few musings:
I've been considering how to create a LiveCD with an installer. I
see two approaches:
(1) reconstruct rpms from the LiveCD filesystem, and do the usual
one-at-a-time install. This is likely to be very slow, because
of seeking.
(2) Group rpms into transaction groups by examining installation
prerequisites and preinstall-scriptlet bounds, and then just
apply pre-install scriptlets, copy files from the live filesystem
and apply the post-install scriptlets.
[ PyRPM might be a good starting point for doing this.]
On one FC5 x86_64 install, there are 72 pre-install scriptlets in 1511
packages. Most of these are of the useradd/groupadd variety. Many
others are applicable when doing upgrades.
In order to do this, one would want the source filesystem that is
being copied to represent the pristine file trees from the RPMS.
That would argue in favor of using something like unionfs to layer
LiveCD specific file customizations over a pristine tree.
On another topic, removing the CD/DVD:
One could use (experimental?) dm-mirror to copy the CD contents in
the background. One could use dm over loop, or there's an experimental
dm-loop module that functions like loop, but requires dmsetup instead
of losetup. Using the dm-mirror module, one could set up a mirror
between a loop from the CD and a loop from some other filesystem; when
the (squashfs) filesystem is done copying, the mirror can be broken,
the CD loop removed, and the CD ejected.
-Bill