| 196 |
Another readable file <filename>/var/cache/debconf/questions.dat</filename> |
Another readable file <filename>/var/cache/debconf/questions.dat</filename> |
| 197 |
is used to store the values for variables and the answers given to questions. |
is used to store the values for variables and the answers given to questions. |
| 198 |
A question always refers to the template used to ask it. For obvious |
A question always refers to the template used to ask it. For obvious |
| 199 |
security reasons the values for templates of type <quote>password</quote> |
security reasons the values for questions of type <quote>password</quote> |
| 200 |
are stored in a separate, non-readable file in the same directory. |
are stored in a separate, non-readable file in the same directory. |
| 201 |
|
|
| 202 |
</para> |
</para> |
| 234 |
It is possible to use preseeding to change the default answer for a |
It is possible to use preseeding to change the default answer for a |
| 235 |
question, but still have the question asked. To do this the |
question, but still have the question asked. To do this the |
| 236 |
<firstterm>seen</firstterm> flag must be reset to <quote>false</quote> after |
<firstterm>seen</firstterm> flag must be reset to <quote>false</quote> after |
| 237 |
setting the value for a template. |
setting the value for a question. |
| 238 |
|
|
| 239 |
</para> |
</para> |
| 240 |
|
|
| 318 |
|
|
| 319 |
<para> |
<para> |
| 320 |
|
|
| 321 |
|
Note that <filename>preseed/url</filename> can be shortened to just |
| 322 |
|
<filename>url</filename> and <filename>preseed/file</filename> to just |
| 323 |
|
</filename>file</filename> when they are passed as boot parameters. |
| 324 |
|
</para> |
| 325 |
|
|
| 326 |
|
</para><para> |
| 327 |
|
|
| 328 |
While you're at it, you may want to add a boot parameter |
While you're at it, you may want to add a boot parameter |
| 329 |
<userinput>debconf/priority=critical</userinput>. This will avoid most |
<userinput>priority=critical</userinput>. This will avoid most |
| 330 |
questions even if the preseeding below misses some. |
questions even if the preseeding below misses some. |
| 331 |
|
|
| 332 |
</para> |
</para> |
| 387 |
on the command line. Just pass <userinput>path/to/var=value</userinput> |
on the command line. Just pass <userinput>path/to/var=value</userinput> |
| 388 |
for any of the preseed variables listed in the examples. |
for any of the preseed variables listed in the examples. |
| 389 |
|
|
| 390 |
|
</para><para> |
| 391 |
|
|
| 392 |
|
A <quote>--</quote> in the boot options has special meaning. |
| 393 |
|
Kernel parameters that appear after it will be copied into the installed |
| 394 |
|
bootloader configuration (if supported by the installer for the |
| 395 |
|
bootloader). Note that the <quote>--</quote> may already be |
| 396 |
|
present in the default boot parameters. |
| 397 |
|
|
| 398 |
</para> |
</para> |
| 399 |
<note><para> |
<note><para> |
| 400 |
|
|
| 430 |
a line in a preconfiguration file is: |
a line in a preconfiguration file is: |
| 431 |
|
|
| 432 |
<informalexample><screen> |
<informalexample><screen> |
| 433 |
<owner> <template name> <template type> <value> |
<owner> <question name> <question type> <value> |
| 434 |
</screen></informalexample> |
</screen></informalexample> |
| 435 |
|
|
| 436 |
</para><para> |
</para><para> |
| 447 |
<listitem><para> |
<listitem><para> |
| 448 |
A line can be split into multiple lines by appending a backslash |
A line can be split into multiple lines by appending a backslash |
| 449 |
(<quote><literal>\</literal></quote>) as the line continuation character. |
(<quote><literal>\</literal></quote>) as the line continuation character. |
| 450 |
A good place to split a line is after the template name; a bad place is |
A good place to split a line is after the question name; a bad place is |
| 451 |
between type and value. |
between type and value. |
| 452 |
</para></listitem> |
</para></listitem> |
| 453 |
<listitem><para> |
<listitem><para> |
| 454 |
Most templates need to be preseeded using the values valid in English and |
Most questions need to be preseeded using the values valid in English and |
| 455 |
not the translated values. However, there are some templates (for example |
not the translated values. However, there are some questions (for example |
| 456 |
in <classname>partman</classname> where the translated values need to be |
in <classname>partman</classname> where the translated values need to be |
| 457 |
used. |
used. |
| 458 |
</para></listitem> |
</para></listitem> |
| 459 |
<listitem><para> |
<listitem><para> |
| 460 |
Some templates take a code as value instead of the English text that is |
Some questions take a code as value instead of the English text that is |
| 461 |
shown during installation. |
shown during installation. |
| 462 |
</para></listitem> |
</para></listitem> |
| 463 |
</itemizedlist> |
</itemizedlist> |
| 505 |
|
|
| 506 |
<para> |
<para> |
| 507 |
|
|
| 508 |
To check possible values for templates, you can use <command>nano</command> |
To check possible values for questions, you can use <command>nano</command> |
| 509 |
to examine the files in <filename>/var/lib/cdebconf</filename> while an |
to examine the files in <filename>/var/lib/cdebconf</filename> while an |
| 510 |
installation is in progress. View <filename>templates.dat</filename> for |
installation is in progress. View <filename>templates.dat</filename> for |
| 511 |
the raw templates and <filename>questions.dat</filename> for the current |
the raw templates and <filename>questions.dat</filename> for the current |
| 549 |
|
|
| 550 |
The locale can be used to specify both language and country. |
The locale can be used to specify both language and country. |
| 551 |
To specify the locale as a boot parameter, use |
To specify the locale as a boot parameter, use |
| 552 |
<userinput>debian-installer/locale=<replaceable>en_US</replaceable></userinput>. |
<userinput>locale=<replaceable>en_US</replaceable></userinput>. |
| 553 |
|
|
| 554 |
<informalexample role="example"><screen> |
<informalexample role="example"><screen> |
| 555 |
# Locale sets language and country. |
# Locale sets language and country. |
| 603 |
|
|
| 604 |
If you need to pick a particular interface when netbooting before loading |
If you need to pick a particular interface when netbooting before loading |
| 605 |
a preconfiguration file from the network, use a boot parameter such as |
a preconfiguration file from the network, use a boot parameter such as |
| 606 |
<userinput>netcfg/choose_interface=<replaceable>eth1</replaceable></userinput>. |
<userinput>interface=<replaceable>eth1</replaceable></userinput>. |
| 607 |
|
|
| 608 |
</para> |
</para> |
| 609 |
|
|
| 714 |
|
|
| 715 |
<informalexample role="example"><screen> |
<informalexample role="example"><screen> |
| 716 |
# If the system has free space you can choose to only partition that space. |
# If the system has free space you can choose to only partition that space. |
| 717 |
# Note: this template must be preseeded with a localized (translated) value. |
# Note: this must be preseeded with a localized (translated) value. |
| 718 |
#d-i partman-auto/init_automatically_partition \ |
#d-i partman-auto/init_automatically_partition \ |
| 719 |
# select Use the largest continuous free space |
# select Use the largest continuous free space |
| 720 |
|
|
| 724 |
d-i partman-auto/disk string /dev/discs/disc0/disc |
d-i partman-auto/disk string /dev/discs/disc0/disc |
| 725 |
|
|
| 726 |
# You can choose from any of the predefined partitioning recipes. |
# You can choose from any of the predefined partitioning recipes. |
| 727 |
# Note: this template must be preseeded with a localized (translated) value. |
# Note: this must be preseeded with a localized (translated) value. |
| 728 |
d-i partman-auto/choose_recipe \ |
d-i partman-auto/choose_recipe \ |
| 729 |
select All files in one partition (recommended for new users) |
select All files in one partition (recommended for new users) |
| 730 |
#d-i partman-auto/choose_recipe \ |
#d-i partman-auto/choose_recipe \ |
| 801 |
|
|
| 802 |
# Additional repositories, local[0-9] available |
# Additional repositories, local[0-9] available |
| 803 |
#d-i apt-setup/local0/comment string local server |
#d-i apt-setup/local0/comment string local server |
| 804 |
#d-i apt-setup/local0/repository string \ |
#d-i apt-setup/local0/source string \ |
| 805 |
# deb http://local.server/debian stable main |
# deb http://local.server/debian stable main |
| 806 |
# URL to the public key of the local repository |
# URL to the public key of the local repository |
| 807 |
#d-i apt-setup/local0/key string http://local.server/key |
#d-i apt-setup/local0/key string http://local.server/key |
| 985 |
|
|
| 986 |
<informalexample role="example"><screen> |
<informalexample role="example"><screen> |
| 987 |
# Avoid that last message about the install being complete. |
# Avoid that last message about the install being complete. |
| 988 |
d-i prebaseconfig/reboot_in_progress note |
d-i finish-install/reboot_in_progress note |
| 989 |
|
|
| 990 |
# This will prevent the installer from ejecting the CD during the reboot, |
# This will prevent the installer from ejecting the CD during the reboot, |
| 991 |
# which is useful in some situations. |
# which is useful in some situations. |
| 1119 |
# preconfiguration files, includes those files. |
# preconfiguration files, includes those files. |
| 1120 |
#d-i preseed/include_command \ |
#d-i preseed/include_command \ |
| 1121 |
# string echo if [ "`hostname`" = bob ]; then echo bob.cfg; fi |
# string echo if [ "`hostname`" = bob ]; then echo bob.cfg; fi |
| 1122 |
|
|
| 1123 |
|
# Most flexibly of all, this downloads a program and runs it. The program |
| 1124 |
|
# can use commands such as debconf-set to manupulate the debconf database. |
| 1125 |
|
# Note that if the filenames are relative, they are taken from the same |
| 1126 |
|
# directory as the preconfiguration file that runs them. |
| 1127 |
|
d-i preseed/run string foo.sh |
| 1128 |
</screen></informalexample> |
</screen></informalexample> |
| 1129 |
|
|
| 1130 |
</sect2> |
</sect2> |