B.3. Creating a preconfiguration file

The preconfiguration file is in the format used by the debconf-set-selections command. The general format of a line in a preconfiguration file is:

<owner> <question name> <question type> <value>

There are a few rules to keep in mind when writing a preconfiguration file.

The easiest way to create a preconfiguration file is to use the example file linked in Section B.4, “Contents of the preconfiguration file (for wheezy)” as basis and work from there.

An alternative method is to do a manual installation and then, after rebooting, use the debconf-get-selections from the debconf-utils package to dump both the debconf database and the installer's cdebconf database to a single file:

$ debconf-get-selections --installer > file
$ debconf-get-selections >> file

However, a file generated in this manner will have some items that should not be preseeded, and the example file is a better starting place for most users.


This method relies on the fact that, at the end of the installation, the installer's cdebconf database is saved to the installed system in /var/log/installer/cdebconf. However, because the database may contain sensitive information, by default the files are only readable by root.

The directory /var/log/installer and all files in it will be deleted from your system if you purge the package installation-report.

To check possible values for questions, you can use nano to examine the files in /var/lib/cdebconf while an installation is in progress. View templates.dat for the raw templates and questions.dat for the current values and for the values assigned to variables.

To check if the format of your preconfiguration file is valid before performing an install, you can use the command debconf-set-selections -c preseed.cfg.