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>
The file should start with
There are a few rules to keep in mind when writing a preconfiguration file.
Put only a single space or tab between type and value: any additional whitespace will be interpreted as belonging to the value.
A line can be split into multiple lines by appending a backslash («
\») as the line continuation character. A good place to split a line is after the question name; a bad place is between type and value. Split lines will be joined into a single line with all leading/trailing whitespace condensed to a single space.
For debconf variables (templates) used only in the installer itself, the owner should be set to «d-i»; to preseed variables used in the installed system, the name of the package that contains the corresponding debconf template should be used. Only variables that have their owner set to something other than «d-i» will be propagated to the debconf database for the installed system.
Most questions need to be preseeded using the values valid in English and not the translated values. However, there are some questions (for example in
partman) where the translated values need to be used.
Some questions take a code as value instead of the English text that is shown during installation.
A comment consists of a line which starts with a hash character («
#») and extends up to the length of that line.
The easiest way to create a preconfiguration file is to use the example file linked in Seksjon B.4, «Contents of the preconfiguration file (for bullseye)» 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:
$ echo "#_preseed_V1" >
file$ debconf-get-selections --installer >>
file$ debconf-get-selections >>
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
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