here's a quick guide to using simple-cdd... 

if you have further questions, ask on the debian-custom mailing list:
http://lists.debian.org/debian-custom, or in the debian-custom channel on
irc.debian.org.


Quick Start (from http://wiki.debian.org/Simple-CDD/Howto)

apt-get install bzr rsync debian-cd reprepro apt-utils wget debhelper cdbs libdebian-installer4-dev libdebconfclient0-dev

 bzr get http://cdd.alioth.debian.org/bzr/simple-cdd/etch-simple-cdd

 cd etch-simple-cdd

create a profile named NAME, one package name per line(do not include linux-image packages):

 for p in list of packages you want installed ; do echo $p >> profiles/NAME.packages ; done

build the .udeb:

 debuild -us -uc -I.bzr -b

build the CD with selected profile NAME, and include simple-cdd-profiles .udeb:

 ./build-simple-cdd --profiles NAME --local-packages $(pwd)/../simple-cdd-profiles_0.3.0~1_all.udeb

this will create a partial package mirror in the dir "mirror", and if all goes
well, a .iso CD image in the "images" dir when it is finished.

use qemu to test:

 apt-get install qemu

 ./build-simple-cdd --qemu --profiles NAME --local-packages $(pwd)/../simple-cdd-profiles_0.3.0~1_all.udeb

for more options:

 ./build-simple-cdd --help 


The Less Quick Start

Preparing a Simple-CDD Working Directory

if you're using the packaged version, install it and:

cp -a /usr/share/simple-cdd ~/my-custom-cdd

downloading the latest stable release with bzr:

bzr get http://cdd.alioth.debian.org/bzr/simple-cdd/etch-simple-cdd


Profiles

to make a custom profile, think of a name for it, such as "basic-x".

edit or create files in the "profiles" directory, beginning with the profile
name, and ending in .preseed, .packages, .downloads, etc.  for example:

profiles/basic-x.preseed  
profiles/basic-x.packages
profiles/basic-x.downloads

 *.description

 short, one-line description of the what the profile does

 *.packages
 
 packages installed when the profile is selected.  do not include packages such
 as linux-image or grub, as debian-installer will handle these specially.

 *.downloads
 
 additional packages included on a CD providing the profile, but not installed
 by simple-cdd (though debian-installer may install them)

 *.preseed
 
 debconf questions loaded if the profile is selected

 *.postinst
 
 profile-specific post-install script.  runs in the "finish-install" phase of
 debian-installer.

 *.conf
 
 profile-specific configuration settings.  sourced during CD build.


add the profile to the list of profiles, in simple-cdd.conf:

profiles="basic-x"

or simply select using the commandline option:

 ./build-simple-cdd --profiles basic-x

when installing from the CD, a menu should pop up asking you which profiles you
want to install. select all the profiles you want, and the debconf preseed
files will populate the debconf database, and the packages will be installed. 


Default Profile

the profile named "default" is special, because it always gets installed.

modify the profile/default.* files with care, as simple-cdd relies upon the
default profile working in certain ways (such as installing the
simple-cdd-profiles .udeb).


Debconf Preseeding

debconf preseeding is a way to pre-answer the questions asked during package
installation and debian-installer.

it uses the debconf-set-selections format. for more information on the format:

 man debconf-set-selections

profiles/default.preseed is loaded after the debian-installer CD is mounted.
other profiles preseed files are loaded when the simple-cdd-profile .udeb is
installed. some questions may have to be passed at the boot prompt(see below),
ask they are asked before any of the preseed files are loaded.

these questions are used by simple-cdd, modify at your own risk:

  d-i preseed/early_command


Automatically Selecting Profiles

to automatically select profiles, in profiles/default.preseed, uncomment the
line:

simple-cdd simple-cdd/profiles multiselect 

and add all profiles you want, separated by commas, i.e.:

simple-cdd simple-cdd/profiles multiselect basic-x, ltsp

alternately, use the --auto-profiles commandline option:

 ./build-simple-cdd --profiles basic-x,ltsp --auto-profiles basic-x,ltsp


Language and Country Selection

to pre-select the language and country, it is recommended to use the --locale
commandline option:

 ./build-simple-cdd --locale en_US

alternately, this can be placed in simple-cdd.conf or profiles/*.conf:

locale=en_US


Passing Boot Prompt Parameters

you can alter the default boot parameters by editing simple-cdd.conf, such as
to disable power management (acpi):

KERNEL_PARAMS="preseed/file=/cdrom/simple-cdd/default.preseed acpi=no"


Build the CD

 ./build-simple-cdd

now the mirroring tools will download lots and lots of files.

then CD image will be built, and appear as a file in the "images" directory,
such as "debian-40-i386-CD-1.iso"


Testing With Qemu

you can test that your image works using qemu...

 apt-get install qemu

 ./build-simple-cdd --qemu --profiles basic-x

this will build the CD image, run qemu to install it, and then run qemu for the
initial boot into the system.


Testing With Qemu in Non-Graphical Mode

i tested this code out entirely with qemu over a slow ssh connection,
so i needed to figure out how to get serial console working...

 ./build-simple-cdd --qemu --profiles basic-x --serial-console


More Fun and Adventures

Post and Pre Installation Hooks

if you need to do some customization that cannot be handled by debconf
preseeding, write a script doing what you need to do... and copy that script to either:

default.postinst (for all installs)

or

<profile>.postinst (for profile-specific post-install)


Totally Automatic Partitioning

since automatically over-writing the data on the hard-drive could be
destructive, it is disabled by default.

to enable it, edit profiles/default.preseed and uncomment the following three
lines:

d-i partman/confirm_write_new_label boolean true
d-i partman/choose_partition  select Finish partitioning and write changes to disk
d-i partman/confirm     boolean true


Debian Installer Release

simple-cdd needs debian-installer 20061102 (d-i etch rc1) or newer. 

try to use a mirror where dists/sarge/main/installer-i386/current is 20061102
or greater.  be wary of round-robin mirrors such as http.us.debian.org or
ftp.us.debian.org, as they may be out of sync.  in simple-cdd.conf, edit:

debian_mirror="http://up.to.date.mirror/debian/"

alternately, if you must use an out-of-date mirror, use debian-installer from
sid. in simple-cdd.conf edit:

di_codename="sid"

(or specify di_release="20061102" or di_release="rc1" if that directory is
present on your mirror).
