Please direct any questions to the [http://lists.debian.org/debian-custom debian-custom list] or debian-custom irc channel on irc.debian.org.

Please review the README file for additional tips/help. (usually located at /usr/share/doc/simple-cdd/README)

To try ["Simple-CDD"], on an etch (Debian 4.0) system:

  $ mkdir ~/my-simple-cdd
  $ cd ~/my-simple-cdd

Because simple-cdd is not part of etch, we need to install it from sid. Add to your sources.list:

  # echo deb http://http.us.debian.org/debian sid main >> /etc/apt/sources.list.d/simple-cdd.list
  # apt-get update
  # apt-get -t stable install simple-cdd

Remove /etc/apt/sources.list.d/simple-cdd.list so you don't accidentally upgrade to sid:

  # rm /etc/apt/sources.list.d/simple-cdd.list

Build a basic CD, and include simple-cdd-profiles .udeb from sid (simple-cdd-profiles is not part of etch):

  $ build-simple-cdd --profiles-udeb-dist sid

This will create a partial package mirror in the directory tmp/mirror, and if all goes well, an .iso CD image in the "images" dir when it is finished. By default, target CDD release version is the same as the host version. You can specify the optional argument --dist to change the targets version. For example, it can be etch, lenny, sid, etc. If this step doesn't work, you need to figure out why before trying more complicated things.

debian_mirror="http://$server/debian"
wget_debian_mirror="ftp://$server/debian"

Create a profile named NAME:

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

Note that you should not include package dependencies, but only the packages you actually want.

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

  $ build-simple-cdd --profiles NAME --profiles-udeb-dist sid

This should create an .iso CD image in the "images" dir when it is finished with your custom profile.

Use qemu to test:

  # apt-get install qemu
  $ build-simple-cdd --qemu --profiles NAME

Optional features:

If you want debconf preseeding, put a debconf-set-selections compatible file into profiles/NAME.preseed.

If you want a custom post-install script, place it in profiles/NAME.postinst.

For more options:

  $ build-simple-cdd --help

Adapted from: http://lists.debian.org/debian-custom/2006/12/msg00001.html

Howto build the install cd with current Daily Debian Installer

This step might be of some interest if you want build Debian ISO in short periods when Debian Installer in the repository does not work together with the rest of the packages. This might happen if the Debian Installer kernel version is older then the version in target distribution and only new .udeb files are available in the repository.

Add the following lines to your profile's conf file:

  export DI_WWW_HOME="default"

This will make debian-cd download latest Debian Installer from the default location and use it to build ISO images.

Howto build the install cd with a custom debian Installer (if you want to add a driver that is not yet supported by the official debian installer):

First build the custom DebianInstaller.

Add this value to the NAME.conf file of your profile: custom_installer="/path/to/debian/installer/"

In the provided path you should have this kind of directory tree: (architecture)/images/ where architecture could be i386 for instance.

Copy the contents of the dest directory in your debian installer build directory to /path/to/debian/installer/(architecture)/images/

Next specify a local packages directory (add the parameter --local-packages /path/to/localpackages/directory/ to build-simple-cdd). Copy all your custom udebs to that directory.

After that, you want to make sure the system will reboot correctly after installation and provide a custom kernel:

Build the custom kernel

Add it to the /path/to/localpackages/directory/ and add the package name to the NAME.packages file for your profile.

If the kernel package name exists in the official repositories, make sure its version is greater or equal to the version in the debian mirror, to prevent simple-cdd from downloading it.

How to deal with missing udeb modules for your d-i kernel

Due to the new etch update that uses a 2.6.18-5 kernel rather than 2.6.18-4, you may have problems building a lenny image, since 2.6.18-5 udeb modules are not in lenny repository. It means that your d-i is running the 2.6.18-5 kernel while you are trying to load 2.6.18.4 modules during the installation of your new debian image. To solve this problem, there is a new feature in simple-cdd version 0.3.4. Just pass 'etch' to extra_udeb_dist var before running simple-cdd:

  $ export extra_udeb_dist=etch

or use the --extra-udeb-dist commandline option:

  $ build-simple-cdd --extra-udeb-dist etch

How to cache repeated downloads

If your bandwidth is limited, you can use [http://packages.debian.org/approx approx] to cache downloads: just invoke simple-cdd with --debian-mirror http://localhost:9999/debian