/[d-i]/trunk/manual/en/appendix/preseed.xml
ViewVC logotype

Diff of /trunk/manual/en/appendix/preseed.xml

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 33719 by joeyh, Tue Jan 3 18:17:58 2006 UTC revision 38231 by joeyh, Mon Jun 19 22:15:58 2006 UTC
# Line 3  Line 3 
3    
4  <!--  <!--
5  Be carefull with the format of this file as it is parsed to generate  Be carefull with the format of this file as it is parsed to generate
6  the example preseed file.  the example preconfiguration file.
7  In that file all text between <informalexample> tags that have the  In that file all text between <informalexample> tags that have the
8  attribute 'role="example"' set is included, except if a 'condition'  attribute 'role="example"' set is included, except if a 'condition'
9  attribute is in force that does not match the specified release or if an  attribute is in force that does not match the specified release or if an
# Line 12  attribute is in force that does not matc Line 12  attribute is in force that does not matc
12  Currently only a single variant of the example file is generated (for i386).  Currently only a single variant of the example file is generated (for i386).
13  -->  -->
14    
15  <appendix id="appendix-preseed" condition="etch">  <appendix id="appendix-preseed">
16  <title>Automating the installation using preseeding</title>  <title>Automating the installation using preseeding</title>
17    
18  <para>  <para>
# Line 23  This appendix explains the intricacies o Line 23  This appendix explains the intricacies o
23  </para><para>  </para><para>
24    
25  The configuration fragments used in this appendix are also available as an  The configuration fragments used in this appendix are also available as an
26  example preseed file from &urlset-example-preseed;.  example preconfiguration file from &urlset-example-preseed;.
27    
28  </para>  </para>
29    
# Line 49  There are three methods that can be used Line 49  There are three methods that can be used
49  installation method and supports preseeding of more things, but it requires  installation method and supports preseeding of more things, but it requires
50  the most preparation. File and network preseeding each can be used with  the most preparation. File and network preseeding each can be used with
51  different installation methods. With file and network preseeding the first  different installation methods. With file and network preseeding the first
52  few installer questions cannot be preseeded because the preseed configuration  few installer questions cannot be preseeded because the preconfiguration
53  file is only loaded after they have been asked.  file is only loaded after they have been asked.
54    
55  </para><para>  </para><para>
# Line 105  installation methods. Line 105  installation methods.
105  </para><para>  </para><para>
106    
107  An important difference between the preseeding methods is the point at which  An important difference between the preseeding methods is the point at which
108  the preseed configuration file is loaded and processed. For initrd preseeding  the preconfiguration file is loaded and processed. For initrd preseeding
109  this is right at the start of the installation, before the first question is  this is right at the start of the installation, before the first question is
110  even asked. For file preseeding this is after the CD or CD image has been  even asked. For file preseeding this is after the CD or CD image has been
111  loaded. For network preseeding it is only after the network has been  loaded. For network preseeding it is only after the network has been
# Line 123  also already have been processed. Line 123  also already have been processed.
123  </para><para>  </para><para>
124    
125  Obviously, any questions that have been processed before the  Obviously, any questions that have been processed before the
126  preseeding configuration file is loaded, cannot be preseeded.  preconfiguration file is loaded cannot be preseeded.
127  <xref linkend="preseed-bootparms"/> offers a way to avoid these  <xref linkend="preseed-bootparms"/> offers a way to avoid these
128  questions being asked.  questions being asked.
129    
# Line 137  questions being asked. Line 137  questions being asked.
137  Although most questions used by &d-i; can be preseeded using this method,  Although most questions used by &d-i; can be preseeded using this method,
138  there are some notable exceptions. You must (re)partition an entire disk  there are some notable exceptions. You must (re)partition an entire disk
139  or use available free space on a disk; it is not possible to use existing  or use available free space on a disk; it is not possible to use existing
140  partitions. You currently cannot use preseeding to set up RAID and LVM.  partitions. You currently cannot use preseeding to set up RAID.
141    
142  </para>  </para>
143    </sect2>    </sect2>
# Line 196  runtime. Line 196  runtime.
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>
# Line 207  are stored in a separate, non-readable f Line 207  are stored in a separate, non-readable f
207    <title>Running custom commands during the installation</title>    <title>Running custom commands during the installation</title>
208  <para>  <para>
209    
210  A very powerfull and flexible option offered by the preseeding tools is the  A very powerful and flexible option offered by the preconfiguration tools
211  ability to run commands or scripts at certain points in the installation.  is the ability to run commands or scripts at certain points in the
212  See <xref linkend="preseed-shell"/> for details.  installation. See <xref linkend="preseed-shell"/> for details.
213    
214  </para>  </para>
215    
216  <itemizedlist>  <itemizedlist>
217  <listitem><para>  <listitem><para>
218    <userinput>preseed/early_command</userinput>: is run as soon as the the    <userinput>preseed/early_command</userinput>: is run as soon as the
219    preseeding configuration file has been loaded    preconfiguration file has been loaded
220  </para></listitem>  </para></listitem>
221  <listitem><para>  <listitem><para>
222    <userinput>preseed/late_command</userinput>: is run just before the reboot    <userinput>preseed/late_command</userinput>: is run just before the reboot
# Line 234  See <xref linkend="preseed-shell"/> for Line 234  See <xref linkend="preseed-shell"/> for
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    
# Line 250  d-i foo/bar seen false Line 250  d-i foo/bar seen false
250   <title>Using preseeding</title>   <title>Using preseeding</title>
251  <para>  <para>
252    
253  Of course you will first need to create a preseed file and place it in the  Of course you will first need to create a preconfiguration file and place it in
254  location from where you want to use it. Creating the preseed file is covered  the location from where you want to use it. Creating the preconfiguration file
255  later in this appendix. Putting it in the correct location is fairly  is covered later in this appendix. Putting it in the correct location is fairly
256  straightforward for network preseeding or if you want to read the file off  straightforward for network preseeding or if you want to read the file off
257  a floppy or usb-stick. If you want to include the file on a CD or DVD, you  a floppy or usb-stick. If you want to include the file on a CD or DVD, you
258  will have to remaster the ISO image. How to get the preseed file included  will have to remaster the ISO image. How to get the preconfiguration file
259  in the initrd is outside the scope of this document; please consult the  included in the initrd is outside the scope of this document; please consult
260  developers documentation for &d-i;.  the developers documentation for &d-i;.
261    
262  </para><para>  </para><para>
263    
264  An example preseed file that you can use as basis for your preseed file is  An example preconfiguration file that you can use as basis for your own
265  available from &urlset-example-preseed;. This file is based on the  preconfiguration file is available from &urlset-example-preseed;. This file is
266  configuration fragments included in this appendix.  based on the configuration fragments included in this appendix.
267    
268  </para>  </para>
269    
270    <sect2 id="preseed-loading">    <sect2 id="preseed-loading">
271    <title>Loading the preseed file</title>    <title>Loading the preconfiguration file</title>
272  <para>  <para>
273    
274  If you are using initrd preseeding, you only have to make sure a file named  If you are using initrd preseeding, you only have to make sure a file named
# Line 278  load it. Line 278  load it.
278    
279  </para><para>  </para><para>
280    
281  For the other preseeding methods you need to tell the installer what file to  For the other preseeding methods you need to tell the installer what file
282  use when you boot it. This is done by passing the kernel a boot parameter,  to use when you boot it. This is normally done by passing the kernel a boot
283  either manually at boot time or by editing the bootloader configuration file  parameter, either manually at boot time or by editing the bootloader
284  (e.g. <filename>syslinux.cfg</filename>) and adding the parameter to the end  configuration file (e.g. <filename>syslinux.cfg</filename>) and adding the
285  of the append line(s) for the kernel.  parameter to the end of the append line(s) for the kernel.
286    
287  </para><para>  </para><para>
288    
289  If you do specify the preseed file in the bootloader configuration, you might  If you do specify the preconfiguration file in the bootloader configuration,
290  change the configuration so you don't need to hit enter to boot the installer.  you might change the configuration so you don't need to hit enter to boot the
291  For syslinux this means setting the timeout to 1 in  installer. For syslinux this means setting the timeout to <literal>1</literal>
292  <filename>syslinux.cfg</filename>.  in <filename>syslinux.cfg</filename>.
293    
294  </para><para>  </para><para>
295    
296  To make sure the installer gets the right preseed file, you can optionally  To make sure the installer gets the right preconfiguration file, you can
297  specify a checksum for the file. Currently this needs to be a md5sum, and if  optionally specify a checksum for the file. Currently this needs to be a
298  specified it must match the preseed file or the installer will refuse to use it.  md5sum, and if specified it must match the preconfiguration file or the
299    installer will refuse to use it.
300    
301  </para>  </para>
302    
# Line 309  Boot parameters to specify: Line 310  Boot parameters to specify:
310    preseed/file=/cdrom/preseed.cfg    preseed/file=/cdrom/preseed.cfg
311    preseed/file/checksum=5da499872becccfeda2c4872f9171c3d    preseed/file/checksum=5da499872becccfeda2c4872f9171c3d
312    
313  - if you're installing from USB media (put the preseed file in the  - if you're installing from USB media (put the preconfiguration file in the
314    toplevel directory of the USB stick):    toplevel directory of the USB stick):
315    preseed/file=/hd-media/preseed.cfg    preseed/file=/hd-media/preseed.cfg
316    preseed/file/checksum=5da499872becccfeda2c4872f9171c3d    preseed/file/checksum=5da499872becccfeda2c4872f9171c3d
# Line 317  Boot parameters to specify: Line 318  Boot parameters to specify:
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>
333    </sect2>    </sect2>
334    
335      <sect2 id="preseed-dhcp">
336      <title>Using a DHCP server to specify preconfiguration files</title>
337    <para>
338    
339    It's also possible to use DHCP to specify a preconfiguration file to download
340    from the network. DHCP allows specifying a filename. Normally this is a file
341    to netboot, but if it appears to be an URL then installation media that
342    support network preseeding will download the file from the URL and use it as a
343    preconfiguration file. Here is an example of how to set it up in the dhcpd.conf
344    for version 3 of the ISC DHCP server (the dhcp3-server Debian package).
345    
346    </para>
347    
348    <informalexample><screen>
349    if substring (option vendor-class-identifier, 0, 3) = "d-i" {
350        filename "http://host/preseed.cfg";
351    }
352    </screen></informalexample>
353    
354    <para>
355    
356    Note that the above example limits this filename to DHCP clients that identify
357    themselves as "d-i", so it will not affect regular DHCP clients, but only
358    the installer. You can also put the text in a stanza for only one particular
359    host to avoid preseeding all installs on your network.
360    
361    </para><para>
362    
363    A good way to use the DHCP preseeding is to only preseed values specific to
364    your network, such as the Debian mirror to use. This way installs on your
365    network will automatically get a good mirror selected, but the rest of the
366    installation can be performed interactively. Using DHCP preseeding to fully
367    automate Debian installs should only be done with care.
368    
369    </para>
370      </sect2>
371    
372    <sect2 id="preseed-bootparms">    <sect2 id="preseed-bootparms">
373    <title>Using boot parameters to supplement preseeding</title>    <title>Using boot parameters to supplement preseeding</title>
374  <para>  <para>
375    
376  Some parts of the installation process cannot be automated using some forms  Some parts of the installation process cannot be automated using some forms
377  of preseeding because the questions are asked before the preseed file is  of preseeding because the questions are asked before the preconfiguration
378  loaded. For example, if the preseed file is downloaded over the network,  file is loaded. For example, if the preconfiguration file is downloaded over
379  the network setup must be done first. One reason to use initrd preseeding  the network, the network setup must be done first. One reason to use initrd
380  is that it allows preseeding of even these early steps of the installation  preseeding is that it allows preseeding of even these early steps of the
381  process.  installation process.
382    
383  </para><para>  </para><para>
384    
385  If a preseed file cannot be used to preseed some steps, the install can  If a preconfiguration file cannot be used to preseed some steps, the install
386  still be fully automated, since you can pass preseed values to the kernel  can still be fully automated, since you can pass preseed values to the kernel
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    
# Line 355  you can use 32 command line options and Line 408  you can use 32 command line options and
408  <para>  <para>
409    
410  For most installations some of the default options in your bootloader  For most installations some of the default options in your bootloader
411  configuration file, like 'vga=normal', may be safely removed which may  configuration file, like <literal>vga=normal</literal>, may be safely
412  allow you to add more options for preseeding.  removed which may allow you to add more options for preseeding.
413    
414  </para>  </para>
415  <note><para>  <note><para>
# Line 368  parameters, even if you delimit them wit Line 421  parameters, even if you delimit them wit
421    </sect2>    </sect2>
422   </sect1>   </sect1>
423    
424   <sect1 condition="FIXME" id="preseed-creating">   <sect1 id="preseed-creating">
425   <title>Creating a preseed file</title>   <title>Creating a preconfiguration file</title>
426  <para>  <para>
427    
428  The preconfiguration file is in the format used by the  The preconfiguration file is in the format used by the
429  <command>debconf-set-selections</command> command.  <command>debconf-set-selections</command> command. The general format of
430    a line in a preconfiguration file is:
431    
432    <informalexample><screen>
433    &lt;owner&gt; &lt;question name&gt; &lt;question type&gt; &lt;value&gt;
434    </screen></informalexample>
435    
436    </para><para>
437    
438    There are a few rules to keep in mind when writing a preconfiguration file.
439    
440  </para>  </para>
441    
442  <itemizedlist>  <itemizedlist>
443  <listitem><para>  <listitem><para>
444    File format    Put only a single space or tab between type and value: any additional
445      whitespace will be interpreted as belonging to the value.
446  </para></listitem>  </para></listitem>
447  <listitem><para>  <listitem><para>
448    Only single space allowed between template type and value    A line can be split into multiple lines by appending a backslash
449      (<quote><literal>\</literal></quote>) as the line continuation character.
450      A good place to split a line is after the question name; a bad place is
451      between type and value.
452  </para></listitem>  </para></listitem>
453  <listitem><para>  <listitem><para>
454    Relation with /var/lib/(c)debconf/templates    Most questions need to be preseeded using the values valid in English and
455      not the translated values. However, there are some questions (for example
456      in <classname>partman</classname> where the translated values need to be
457      used.
458  </para></listitem>  </para></listitem>
459  <listitem><para>  <listitem><para>
460    Types of templates and how to provide values for them    Some questions take a code as value instead of the English text that is
461  </para></listitem>    shown during installation.
 <listitem><para>  
   Most values need to be in English or codes  
 </para></listitem>  
 <listitem><para>  
   Using a manual installation as base  
 </para></listitem>  
 <listitem><para>  
   Finding other possible values  
462  </para></listitem>  </para></listitem>
463  </itemizedlist>  </itemizedlist>
464    
465  <para>  <para>
466    
467  To check if the format of your preseed file is valid before performing an  The easiest way to create a preconfiguration file is to use the example file
468  install, you can use the command <command>debconf-set-selections -c  linked in <xref linkend="preseed-contents"/> as basis and work from there.
469    
470    </para><para>
471    
472    An alternative method is to do a manual installation and then, after
473    rebooting, use the <command>debconf-get-selections</command> from the
474    <classname>debconf-utils</classname> package to dump both the debconf
475    database and the installer's cdebconf database to a single file:
476    
477    <informalexample><screen>
478    $ debconf-get-selections --installer &gt; <replaceable>file</replaceable>
479    $ debconf-get-selections &gt;&gt; <replaceable>file</replaceable>
480    </screen></informalexample>
481    
482    </para><para>
483    
484    However, a file generated in this manner will have some items that should
485    not be preseeded, and the example file is a better starting place for most
486    users.
487    
488    </para>
489    
490    <note><para>
491    
492    This method relies on the fact that, at the end of the installation, the
493    installer's cdebconf database is saved to the installed system in
494    <filename>/var/log/installer/cdebconf</filename>. However, because the
495    database may contain sensitive information, by default the files are only
496    readable by root.
497    
498    </para><para>
499    
500    The directory <filename>/var/log/installer</filename> and all files in it
501    will be deleted from your system if you purge the package
502    <classname>installation-report</classname>.
503    
504    </para></note>
505    
506    <para>
507    
508    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
510    installation is in progress. View <filename>templates.dat</filename> for
511    the raw templates and <filename>questions.dat</filename> for the current
512    values and for the values assigned to variables.
513    
514    </para><para>
515    
516    To check if the format of your preconfiguration file is valid before performing
517    an install, you can use the command <command>debconf-set-selections -c
518  <replaceable>preseed.cfg</replaceable></command>.  <replaceable>preseed.cfg</replaceable></command>.
519    
520  </para>  </para>
521   </sect1>   </sect1>
522    
523   <sect1 id="preseed-contents">   <sect1 id="preseed-contents">
524   <title>Contents of the preseed file</title>   <title>Contents of the preconfiguration file</title>
525  <para>  <para>
526    
527  The configuration fragments used in this appendix are also available as an  The configuration fragments used in this appendix are also available as an
528  example preseed file from &urlset-example-preseed;.  example preconfiguration file from &urlset-example-preseed;.
529    
530  </para><para>  </para><para>
531    
532  Note that this example is based on an installation for the Intel x86  Note that this example is based on an installation for the Intel x86
533  architecture. If you are installing a different architecture, some of the  architecture. If you are installing a different architecture, some of the
534  examples (like keyboard selection and bootloader installation) may not be  examples (like keyboard selection and bootloader installation) may not be
535  relevant and will need to be replaced by debconf settings appropriate for your  relevant and will need to be replaced by debconf settings appropriate for
536  architecture.  your architecture.
537    
538  </para>  </para>
539    
# Line 432  architecture. Line 542  architecture.
542  <para>  <para>
543    
544  Setting localization values will only work if you are using initrd preseeding.  Setting localization values will only work if you are using initrd preseeding.
545  With all other methods the preseed file will only be loaded after these  With all other methods the preconfiguration file will only be loaded after
546  questions have been asked.  these questions have been asked.
547    
548  </para><para>  </para><para>
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.
# Line 463  d-i console-keymaps-at/keymap select us Line 573  d-i console-keymaps-at/keymap select us
573    
574  </para><para>  </para><para>
575    
576  To skip keyboard configuration preseed  To skip keyboard configuration, preseed
577  <classname>console-tools/archs</classname> with  <classname>console-tools/archs</classname> with
578  <userinput>skip-config</userinput>.  <userinput>skip-config</userinput>.
579  This will result in the kernel keymap remaining active.  This will result in the kernel keymap remaining active.
# Line 484  architecture virtually obsolete. For 2.6 Line 594  architecture virtually obsolete. For 2.6
594  <para>  <para>
595    
596  Of course, preseeding the network configuration won't work if you're  Of course, preseeding the network configuration won't work if you're
597  loading your preseed file from the network. But it's great when you're  loading your preconfiguration file from the network. But it's great when
598  booting from CD or USB stick. If you are loading preseed files from  you're booting from CD or USB stick. If you are loading preconfiguration
599  the network, you can pass network config parameters in using kernel  files from the network, you can pass network config parameters by using
600  boot parameters.  kernel boot parameters.
601    
602    </para><para>
603    
604    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
606    <userinput>interface=<replaceable>eth1</replaceable></userinput>.
607    
608  </para>  </para>
609    
# Line 496  boot parameters. Line 612  boot parameters.
612  # skip displaying a list if there is more than one interface.  # skip displaying a list if there is more than one interface.
613  d-i netcfg/choose_interface select auto  d-i netcfg/choose_interface select auto
614    
615    # To pick a particular interface instead:
616    #d-i netcfg/choose_interface select eth1
617    
618  # If you have a slow dhcp server and the installer times out waiting for  # If you have a slow dhcp server and the installer times out waiting for
619  # it, this might be useful.  # it, this might be useful.
620  #d-i netcfg/dhcp_timeout string 60  #d-i netcfg/dhcp_timeout string 60
621    
622  # If you prefer to configure the network manually, here's how:  # If you prefer to configure the network manually, uncomment this line and
623    # the static network configuration below.
624  #d-i netcfg/disable_dhcp boolean true  #d-i netcfg/disable_dhcp boolean true
625    
626    # If you want the preconfiguration file to work on systems both with and
627    # without a dhcp server, uncomment these lines and the static network
628    # configuration below.
629    #d-i netcfg/dhcp_failed note
630    #d-i netcfg/dhcp_options select Configure network manually
631    
632    # Static network configuration.
633  #d-i netcfg/get_nameservers string 192.168.1.1  #d-i netcfg/get_nameservers string 192.168.1.1
634  #d-i netcfg/get_ipaddress string 192.168.1.42  #d-i netcfg/get_ipaddress string 192.168.1.42
635  #d-i netcfg/get_netmask string 255.255.255.0  #d-i netcfg/get_netmask string 255.255.255.0
# Line 526  d-i netcfg/wireless_wep string Line 654  d-i netcfg/wireless_wep string
654    <title>Mirror settings</title>    <title>Mirror settings</title>
655  <para>  <para>
656    
657  Depending on the installation method you use, a mirror may used both to  Depending on the installation method you use, a mirror may be used both to
658  download additional components of the installer, the base system and to  download additional components of the installer, the base system and to
659  set up the <filename>/etc/apt/sources.list</filename> for the installed  set up the <filename>/etc/apt/sources.list</filename> for the installed
660  system.  system.
# Line 543  for additional components for the instal Line 671  for additional components for the instal
671  if components are actually downloaded over the network and should match the  if components are actually downloaded over the network and should match the
672  suite that was used to build the initrd for the installation method used for  suite that was used to build the initrd for the installation method used for
673  the installation.  the installation.
674  By default the value for <classname>mirror/udeb/suite</classname> is the same  By default the value for <classname>mirror/udeb/suite</classname> is the
675  as <classname>mirror/suite</classname>.  same as <classname>mirror/suite</classname>.
676    
677  </para>  </para>
678    
# Line 570  Using preseeding to partition the harddi Line 698  Using preseeding to partition the harddi
698  supported by <classname>partman-auto</classname>. You can choose to either  supported by <classname>partman-auto</classname>. You can choose to either
699  partition existing free space on a disk or a whole disk. The layout of the  partition existing free space on a disk or a whole disk. The layout of the
700  disk can be determined by using a predefined recipe, a custom recipe from  disk can be determined by using a predefined recipe, a custom recipe from
701  a recipe file or a recipe included in the preseed file. It is currently not  a recipe file or a recipe included in the preconfiguration file. It is
702  possible to partition multiple disks using preseeding nor to set up RAID or  currently not possible to partition multiple disks using preseeding nor to
703  LVM.  set up RAID.
704    
705  </para>  </para>
706    
# Line 586  correct one will be selected before usin Line 714  correct one will be selected before usin
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 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    
# Line 594  correct one will be selected before usin Line 723  correct one will be selected before usin
723  # For example, to use the first disk devfs knows of:  # For example, to use the first disk devfs knows of:
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 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 \
# Line 608  d-i partman-auto/choose_recipe \ Line 738  d-i partman-auto/choose_recipe \
738  # just point at it.  # just point at it.
739  #d-i partman-auto/expert_recipe_file string /hd-media/recipe  #d-i partman-auto/expert_recipe_file string /hd-media/recipe
740    
741  # If not, you can put an entire recipe the preseed file in one (logical)  # If not, you can put an entire recipe the preconfiguration file in one
742  # line. This example creates a small /boot partition, suitable swap, and  # (logical) line. This example creates a small /boot partition, suitable
743  # uses the rest of the space for the root partition:  # swap, and uses the rest of the space for the root partition:
744  #d-i partman-auto/expert_recipe string                         \  #d-i partman-auto/expert_recipe string                         \
745  #      boot-root ::                                            \  #      boot-root ::                                            \
746  #              40 50 100 ext3                                  \  #              40 50 100 ext3                                  \
# Line 657  d-i time/zone string US/Eastern Line 787  d-i time/zone string US/Eastern
787    
788  Setup of the <filename>/etc/apt/sources.list</filename> and basic configuration  Setup of the <filename>/etc/apt/sources.list</filename> and basic configuration
789  options is fully automated based on your installation method and answers to  options is fully automated based on your installation method and answers to
790  earlier questions. Only the three variables below are relevant for preseeding.  earlier questions. You can optionally add other (local) repositories.
791    
792  </para>  </para>
793    
# Line 665  earlier questions. Only the three variab Line 795  earlier questions. Only the three variab
795  # You can choose to install non-free and contrib software.  # You can choose to install non-free and contrib software.
796  #d-i apt-setup/non-free boolean true  #d-i apt-setup/non-free boolean true
797  #d-i apt-setup/contrib boolean true  #d-i apt-setup/contrib boolean true
798  # To avoid adding security sources, or to use a different server  # Uncomment this to avoid adding security sources, or
799  # than security.debian.org.  # add a hostname to use a different server than security.debian.org.
800  #d-i apt-setup/security_host string  #d-i apt-setup/security_host string
801    
802    # Additional repositories, local[0-9] available
803    #d-i apt-setup/local0/comment string local server
804    #d-i apt-setup/local0/source string \
805    #       deb http://local.server/debian stable main
806    # URL to the public key of the local repository
807    #d-i apt-setup/local0/key string http://local.server/key
808  </screen></informalexample>  </screen></informalexample>
809    
810    </sect2>    </sect2>
# Line 684  text values or MD5 <emphasis>hashes</emp Line 821  text values or MD5 <emphasis>hashes</emp
821  <warning><para>  <warning><para>
822    
823  Be aware that preseeding passwords is not completely secure as everyone  Be aware that preseeding passwords is not completely secure as everyone
824  with access to the preseed file will have the knowledge of these passwords.  with access to the preconfiguration file will have the knowledge of these
825  Using MD5 hashes is considered slightly better in terms of security but it  passwords. Using MD5 hashes is considered slightly better in terms of
826  might also give a false sense of security as access to a MD5 hash allows  security but it might also give a false sense of security as access to a
827  for brute force attacks.  MD5 hash allows for brute force attacks.
828    
829  </para></warning>  </para></warning>
830    
831  <informalexample role="example"><screen>  <informalexample role="example"><screen>
832    # Skip creation of a root account (normal user account will be able to
833    # use sudo).
834    #d-i passwd/root-login boolean false
835    # Alternatively, to skip creation of a normal user account.
836    #d-i passwd/make-user boolean false
837    
838  # Root password, either in clear text  # Root password, either in clear text
839  #passwd passwd/root-password password r00tme  #d-i passwd/root-password password r00tme
840  #passwd passwd/root-password-again password r00tme  #d-i passwd/root-password-again password r00tme
841  # or encrypted using an MD5 hash.  # or encrypted using an MD5 hash.
842  #passwd passwd/root-password-crypted password [MD5 hash]  #d-i passwd/root-password-crypted password [MD5 hash]
   
 # Skip creation of a normal user account.  
 #passwd passwd/make-user boolean false  
843    
844  # Alternatively, create a normal user account.  # To create a normal user account.
845  #passwd passwd/user-fullname string Debian User  #d-i passwd/user-fullname string Debian User
846  #passwd passwd/username string debian  #d-i passwd/username string debian
847  # Normal user's password, either in clear text  # Normal user's password, either in clear text
848  #passwd passwd/user-password password insecure  #d-i passwd/user-password password insecure
849  #passwd passwd/user-password-again password insecure  #d-i passwd/user-password-again password insecure
850  # or encrypted using an MD5 hash.  # or encrypted using an MD5 hash.
851  #passwd passwd/user-password-crypted password [MD5 hash]  #d-i passwd/user-password-crypted password [MD5 hash]
852  </screen></informalexample>  </screen></informalexample>
853    
854  <para>  <para>
855    
856  The <classname>passwd/root-password-crypted</classname> and  The <classname>passwd/root-password-crypted</classname> and
857  <classname>passwd/user-password-crypted</classname> variables can also be  <classname>passwd/user-password-crypted</classname> variables can also
858  preseeded with <quote>!</quote> as their value. In that case, the corresponding  be preseeded with <quote>!</quote> as their value. In that case, the
859  account is disabled. This may be convenient for the root account, provided  corresponding account is disabled. This may be convenient for the root
860  of course that an alternate method is setup to allow administrative  account, provided of course that an alternative method is setup to allow
861  activities or root login (for instance by using SSH key authentication or  administrative activities or root login (for instance by using SSH key
862  sudo).  authentication or <command>sudo</command>).
863    
864  </para><para>  </para><para>
865    
# Line 732  $ echo "r00tme" | mkpasswd -s -H MD5 Line 872  $ echo "r00tme" | mkpasswd -s -H MD5
872  </para>  </para>
873    </sect2>    </sect2>
874    
875      <sect2 id="preseed-base-installer">
876      <title>Base system installation</title>
877    <para>
878    
879    There is actually not very much that can be preseeded for this stage of the
880    installation. The only questions asked concern the installation of the kernel.
881    
882    </para>
883    
884    <informalexample role="example"><screen>
885    # Select the initramfs generator used to generate the initrd for 2.6 kernels.
886    #d-i base-installer/kernel/linux/initramfs-generators string yaird
887    </screen></informalexample>
888    
889      </sect2>
890    
891    <sect2 id="preseed-bootloader">    <sect2 id="preseed-bootloader">
892    <title>Boot loader installation</title>    <title>Boot loader installation</title>
893    
# Line 768  Available tasks as of this writing inclu Line 924  Available tasks as of this writing inclu
924    
925  <itemizedlist>  <itemizedlist>
926  <listitem><para>  <listitem><para>
927    <userinput>Standard system</userinput>    <userinput>standard</userinput>
928  </para></listitem>  </para></listitem>
929  <listitem><para>  <listitem><para>
930    <userinput>Desktop environment</userinput>    <userinput>desktop</userinput>
931  </para></listitem>  </para></listitem>
932  <listitem><para>  <listitem><para>
933    <userinput>Web server</userinput>    <userinput>gnome-desktop</userinput>
934  </para></listitem>  </para></listitem>
935  <listitem><para>  <listitem><para>
936    <userinput>Print server</userinput>    <userinput>kde-desktop</userinput>
937  </para></listitem>  </para></listitem>
938  <listitem><para>  <listitem><para>
939    <userinput>DNS server</userinput>    <userinput>web-server</userinput>
940  </para></listitem>  </para></listitem>
941  <listitem><para>  <listitem><para>
942    <userinput>File server</userinput>    <userinput>print-server</userinput>
943  </para></listitem>  </para></listitem>
944  <listitem><para>  <listitem><para>
945    <userinput>Mail server</userinput>    <userinput>dns-server</userinput>
946  </para></listitem>  </para></listitem>
947  <listitem><para>  <listitem><para>
948    <userinput>SQL database</userinput>    <userinput>file-server</userinput>
949  </para></listitem>  </para></listitem>
950  <listitem><para>  <listitem><para>
951    <userinput>Laptop</userinput>    <userinput>mail-server</userinput>
952    </para></listitem>
953    <listitem><para>
954      <userinput>sql-database</userinput>
955    </para></listitem>
956    <listitem><para>
957      <userinput>laptop</userinput>
958  </para></listitem>  </para></listitem>
959  </itemizedlist>  </itemizedlist>
960    
# Line 800  Available tasks as of this writing inclu Line 962  Available tasks as of this writing inclu
962    
963  You can also choose to install no tasks, and force the installation of a  You can also choose to install no tasks, and force the installation of a
964  set of packages in some other way. We recommend always including the  set of packages in some other way. We recommend always including the
965  <userinput>Standard system</userinput> task.  <userinput>standard</userinput> task.
966    
967  </para>  </para>
968    
969  <informalexample role="example"><screen>  <informalexample role="example"><screen>
970  tasksel tasksel/first multiselect Standard system, Desktop environment  tasksel tasksel/first multiselect standard, desktop
971  #tasksel tasksel/first multiselect Standard system, Web server  #tasksel tasksel/first multiselect standard, web-server
972    #tasksel tasksel/first multiselect standard, kde-desktop
973    
974  # Some versions of the installer can report back on what software you have  # Some versions of the installer can report back on what software you have
975  # installed, and what software you ue. The default is not to report back,  # installed, and what software you use. The default is not to report back,
976  # but sending reports helps the project determine what software is most  # but sending reports helps the project determine what software is most
977  # popular and include it on CDs.  # popular and include it on CDs.
978  #popularity-contest popularity-contest/participate boolean false  #popularity-contest popularity-contest/participate boolean false
# Line 822  tasksel tasksel/first multiselect Standa Line 985  tasksel tasksel/first multiselect Standa
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.
# Line 863  configurator does not do fully automatic Line 1026  configurator does not do fully automatic
1026  <informalexample role="example"><screen>  <informalexample role="example"><screen>
1027  # X can detect the right driver for some cards, but if you're preseeding,  # X can detect the right driver for some cards, but if you're preseeding,
1028  # you override whatever it chooses. Still, vesa will work most places.  # you override whatever it chooses. Still, vesa will work most places.
1029  #xserver-xfree86 xserver-xfree86/config/device/driver select vesa  #xserver-xorg xserver-xorg/config/device/driver select vesa
1030    
1031  # A caveat with mouse autodetection is that if it fails, X will retry it  # A caveat with mouse autodetection is that if it fails, X will retry it
1032  # over and over. So if it's preseeded to be done, there is a possibility of  # over and over. So if it's preseeded to be done, there is a possibility of
1033  # an infinite loop if the mouse is not autodetected.  # an infinite loop if the mouse is not autodetected.
1034  #xserver-xfree86 xserver-xfree86/autodetect_mouse boolean true  #xserver-xorg xserver-xorg/autodetect_mouse boolean true
1035    
1036  # Monitor autodetection is recommended.  # Monitor autodetection is recommended.
1037  xserver-xfree86 xserver-xfree86/autodetect_monitor boolean true  xserver-xorg xserver-xorg/autodetect_monitor boolean true
1038  # Uncomment if you have an LCD display.  # Uncomment if you have an LCD display.
1039  #xserver-xfree86 xserver-xfree86/config/monitor/lcd boolean true  #xserver-xorg xserver-xorg/config/monitor/lcd boolean true
1040  # X has three configuration paths for the monitor. Here's how to preseed  # X has three configuration paths for the monitor. Here's how to preseed
1041  # the "medium" path, which is always available. The "simple" path may not  # the "medium" path, which is always available. The "simple" path may not
1042  # be available, and the "advanced" path asks too many questions.  # be available, and the "advanced" path asks too many questions.
1043  xserver-xfree86 xserver-xfree86/config/monitor/selection-method \  xserver-xorg xserver-xorg/config/monitor/selection-method \
1044         select medium         select medium
1045  xserver-xfree86 xserver-xfree86/config/monitor/mode-list \  xserver-xorg xserver-xorg/config/monitor/mode-list \
1046         select 1024x768 @ 60 Hz         select 1024x768 @ 60 Hz
1047  </screen></informalexample>  </screen></informalexample>
1048    
# Line 910  xserver-xfree86 xserver-xfree86/config/m Line 1073  xserver-xfree86 xserver-xfree86/config/m
1073  <informalexample role="example"><screen>  <informalexample role="example"><screen>
1074  # d-i preseeding is inherently not secure. Nothing in the installer checks  # d-i preseeding is inherently not secure. Nothing in the installer checks
1075  # for attempts at buffer overflows or other exploits of the values of a  # for attempts at buffer overflows or other exploits of the values of a
1076  # preseed file like this one. Only use preseed files from trusted  # preconfiguration file like this one. Only use preconfiguration files from
1077  # locations! To drive that home, and because it's generally useful, here's  # trusted locations! To drive that home, and because it's generally useful,
1078  # a way to run any shell command you'd like inside the installer,  # here's a way to run any shell command you'd like inside the installer,
1079  # automatically.  # automatically.
1080    
1081  # This first command is run as early as possible, just after  # This first command is run as early as possible, just after
# Line 929  xserver-xfree86 xserver-xfree86/config/m Line 1092  xserver-xfree86 xserver-xfree86/config/m
1092    </sect2>    </sect2>
1093    
1094    <sect2 id="preseed-chainload">    <sect2 id="preseed-chainload">
1095    <title>Chainloading preseed files</title>    <title>Chainloading preconfiguration files</title>
1096  <para>  <para>
1097    
1098  It is possible to include other preseed files from a preseed file. Any  It is possible to include other preconfiguration files from a preconfiguration
1099  settings in those files will override pre-existing settings from files  file. Any settings in those files will override pre-existing settings from
1100  loaded earlier. This makes it possible to put, for example, general  files loaded earlier. This makes it possible to put, for example, general
1101  networking settings for your location in one file and more specific  networking settings for your location in one file and more specific
1102  settings for certain configurations in other files.  settings for certain configurations in other files.
1103    
# Line 944  settings for certain configurations in o Line 1107  settings for certain configurations in o
1107  # More that one file can be listed, separated by spaces; all will be  # More that one file can be listed, separated by spaces; all will be
1108  # loaded. The included files can have preseed/include directives of their  # loaded. The included files can have preseed/include directives of their
1109  # own as well. Note that if the filenames are relative, they are taken from  # own as well. Note that if the filenames are relative, they are taken from
1110  # the same directory as the preseed file that includes them.  # the same directory as the preconfiguration file that includes them.
1111  #d-i preseed/include string x.cfg  #d-i preseed/include string x.cfg
1112    
1113  # The installer can optionally verify checksums of preseed files before  # The installer can optionally verify checksums of preconfiguration files
1114  # using them. Currently only md5sums are supported, list the md5sums  # before using them. Currently only md5sums are supported, list the md5sums
1115  # in the same order as the list of files to include.  # in the same order as the list of files to include.
1116  #d-i preseed/include/checksum string 5da499872becccfeda2c4872f9171c3d  #d-i preseed/include/checksum string 5da499872becccfeda2c4872f9171c3d
1117    
1118  # More flexibly, this runs a shell command and if it outputs the names of  # More flexibly, this runs a shell command and if it outputs the names of
1119  # preseed 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>

Legend:
Removed from v.33719  
changed lines
  Added in v.38231

  ViewVC Help
Powered by ViewVC 1.1.5