$Progeny: structure.txt,v 1.8 2002/02/21 15:29:48 jdaily Exp $

                                                               initrd (Stage 0)

                               stage0.sh
                                  |
-------------------------------------------------------------------------------
                                  |                              live (Stage 1)
                                  |
                               stage1.sh  --- shellspawn
                                 / \
                                /   \
                               /     \
                              /       \
                             /         \
               installer-text.sh     installer-x.sh
                                           |
                                           |
                                       xinit /live/bin/xinitrc
                                           |
                                           |
                                       /live/share/installer-druid.py

Stage 0
*******

The large horizontal line separates things on the initrd from things on the
live fs.  The only things which go on the initrd are enough modules and
logic to get a live fs, whether that's from the network, a CDROM, or a
local disk.  Once a live filesystem has been located, Stage 1 begins.

Stage 1
*******

stage1.sh will take over the part of our current stage0.sh that determines
whether to run in text or X mode; this is so that installer-text.sh and
installer-x.sh don't have to duplicate any code; it can just move up into
stage1.sh.  Its jobs are starting shellspawn and determining whether to use
text or X mode.  It runs the appropriate installer program accordingly.

installer-x.sh attempts to configure the X server, then runs xinit or
connects to a remote display to start installer-druid.py.  If
installer-x.sh fails to configure or run the X server, it permits the user
to fall back to installer-text.sh.

After termination of installer-{text,x}.sh, control returns to stage1.sh,
which invokes setup-finalize-text.py (unmounting the live fs, among other
tasks).  Finally, stage0.sh pivots into the target filesystem, marking the
beginning of Stage 2.

Stage 2
*******

As you can see, Stage 2 is beyond the scope of PGI.  By default, PGI
unpacks a plain unconfigured Debian distribution without even a root
password.  Not very useful.  Any further functionality is provided by
vendor hooks.

An example vendor hook sets up the system so that the traditional Debian
setup mess with base-config and all that Debconf jazz runs.  Another sets
up the system to run the configlets, resulting in a stage 2 resembling that
of Progeny Debian.

To change that, any needed packages must be added to the list of extra
packages, and the vendor hook must be modified to ensure that the
appropriate stuff happens in the init process (running the configlets, for
example).
