/[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 38231 by joeyh, Mon Jun 19 22:15:58 2006 UTC revision 44376 by fjp, Sun Jan 21 23:54:54 2007 UTC
# Line 2  Line 2 
2  <!-- $Id$ -->  <!-- $Id$ -->
3    
4  <!--  <!--
5  Be carefull with the format of this file as it is parsed to generate  Be careful with the format of this file as it is parsed to generate
6  the example preconfiguration 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'
# Line 17  Currently only a single variant of the e Line 17  Currently only a single variant of the e
17    
18  <para>  <para>
19    
20  This appendix explains the intricacies of preseeding answers to questions in  This appendix explains how to preseed answers to questions in &d-i; to
21  &d-i; to automate your installation.  automate your installation.
22    
23  </para><para>  </para><para>
24    
# Line 48  There are three methods that can be used Line 48  There are three methods that can be used
48  <firstterm>network</firstterm>. Initrd preseeding will work with any  <firstterm>network</firstterm>. Initrd preseeding will work with any
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.
 few installer questions cannot be preseeded because the preconfiguration  
 file is only loaded after they have been asked.  
52    
53  </para><para>  </para><para>
54    
# Line 71  installation methods. Line 69  installation methods.
69    <entry>CD/DVD</entry>    <entry>CD/DVD</entry>
70    <entry>yes</entry>    <entry>yes</entry>
71    <entry>yes</entry>    <entry>yes</entry>
72    <entry>no</entry>    <entry>yes<footnote id='apx-ps-net'>
73    
74      <para>
75      but only if you have network access, and set <literal>preseed/url</literal>
76      appropriately
77      </para>
78    
79      </footnote></entry>
80  </row><row>  </row><row>
81    <entry>netboot</entry>    <entry>netboot</entry>
82    <entry>yes</entry>    <entry>yes</entry>
# Line 81  installation methods. Line 86  installation methods.
86    <entry>hd-media <phrase condition="bootable-usb">(including usb-stick)</phrase></entry>    <entry>hd-media <phrase condition="bootable-usb">(including usb-stick)</phrase></entry>
87    <entry>yes</entry>    <entry>yes</entry>
88    <entry>yes</entry>    <entry>yes</entry>
89    <entry>no</entry>    <entry>yes<footnoteref linkend='apx-ps-net'/></entry>
90  </row><row condition="supports-floppy-boot">  </row><row condition="supports-floppy-boot">
91    <entry>floppy based (cd-drivers)</entry>    <entry>floppy based (cd-drivers)</entry>
92    <entry>yes</entry>    <entry>yes</entry>
93    <entry>yes</entry>    <entry>yes</entry>
94    <entry>no</entry>    <entry>yes<footnoteref linkend='apx-ps-net'/></entry>
95  </row><row condition="supports-floppy-boot">  </row><row condition="supports-floppy-boot">
96    <entry>floppy based (net-drivers)</entry>    <entry>floppy based (net-drivers)</entry>
97    <entry>yes</entry>    <entry>yes</entry>
# Line 113  configured. Line 118  configured.
118    
119  </para><para>  </para><para>
120    
121  In practical terms this means for file and network preseeding that the  Obviously, any questions that have been processed before the
122  questions about language, country and keyboard selection will already have  preconfiguration file is loaded cannot be preseeded (this will include
123  been asked. For network preseeding add to that any questions related to  questions that are only displayed at medium or low priority, like the
124  network configuration. Some other questions that are only displayed  first hardware detection run). <xref linkend="preseed-bootparms"/>
125  at medium or low priority (like the first hardware detection run) will  offers a way to avoid these questions being asked.
 also already have been processed.  
126    
127  </para><para>  </para><para>
128    
129  Obviously, any questions that have been processed before the  In order to avoid the questions that would normally appear before the
130  preconfiguration file is loaded cannot be preseeded.  preseeding occurs, you can start the installer in <quote>auto</quote>
131  <xref linkend="preseed-bootparms"/> offers a way to avoid these  mode. This delays questions that would normally be asked too early for
132  questions being asked.  preseeding (i.e. language, country and keyboard selection) until after
133    the network comes up, thus allowing them to be preseeded. It also runs
134    the installation in critical priority, which avoids many unimportant
135    questions. See <xref linkend="preseed-auto"/> for details.
136    
137  </para>  </para>
138    </sect2>    </sect2>
# Line 137  questions being asked. Line 144  questions being asked.
144  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,
145  there are some notable exceptions. You must (re)partition an entire disk  there are some notable exceptions. You must (re)partition an entire disk
146  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
147  partitions. You currently cannot use preseeding to set up RAID.  partitions.
148    
149  </para>  </para>
150    </sect2>    </sect2>
# Line 162  The following types of templates are rel Line 169  The following types of templates are rel
169    
170  </para>  </para>
171    
172  <itemizedlist>  <itemizedlist spacing="compact">
173  <listitem><para>  <listitem><para>
174    string: allows the user to type any value    string: allows the user to type any value
175  </para></listitem>  </para></listitem>
# Line 202  are stored in a separate, non-readable f Line 209  are stored in a separate, non-readable f
209  </para>  </para>
210    </sect2>    </sect2>
211  -->  -->
   
   <sect2 id="preseed-hooks">  
   <title>Running custom commands during the installation</title>  
 <para>  
   
 A very powerful and flexible option offered by the preconfiguration tools  
 is the ability to run commands or scripts at certain points in the  
 installation. See <xref linkend="preseed-shell"/> for details.  
   
 </para>  
   
 <itemizedlist>  
 <listitem><para>  
   <userinput>preseed/early_command</userinput>: is run as soon as the  
   preconfiguration file has been loaded  
 </para></listitem>  
 <listitem><para>  
   <userinput>preseed/late_command</userinput>: is run just before the reboot  
   at the end of the install, but before the <filename>/target</filename>  
   filesystem has been unmounted  
 </para></listitem>  
 </itemizedlist>  
   
   </sect2>  
   
   <sect2 id="preseed-seenflag">  
   <title>Using preseeding to change default values</title>  
 <para>  
   
 It is possible to use preseeding to change the default answer for a  
 question, but still have the question asked. To do this the  
 <firstterm>seen</firstterm> flag must be reset to <quote>false</quote> after  
 setting the value for a question.  
   
 </para>  
   
 <informalexample><screen>  
 d-i foo/bar string value  
 d-i foo/bar seen false  
 </screen></informalexample>  
   
   </sect2>  
212   </sect1>   </sect1>
213    
214    
215   <sect1 id="preseed-using">   <sect1 id="preseed-using">
216   <title>Using preseeding</title>   <title>Using preseeding</title>
217  <para>  <para>
218    
219  Of course you will first need to create a preconfiguration file and place it in  You will first need to create a preconfiguration file and place it in
220  the location from where you want to use it. Creating the preconfiguration file  the location from where you want to use it. Creating the preconfiguration file
221  is covered 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
222  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
223  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
224  will have to remaster the ISO image. How to get the preconfiguration file  will have to remaster the ISO image. How to get the preconfiguration file
225  included in the initrd is outside the scope of this document; please consult  included in the initrd is outside the scope of this document; please consult
226  the developers documentation for &d-i;.  the developers' documentation for &d-i;.
227    
228  </para><para>  </para><para>
229    
# Line 320  Boot parameters to specify: Line 286  Boot parameters to specify:
286    
287  Note that <filename>preseed/url</filename> can be shortened to just  Note that <filename>preseed/url</filename> can be shortened to just
288  <filename>url</filename> and <filename>preseed/file</filename> to just  <filename>url</filename> and <filename>preseed/file</filename> to just
289  </filename>file</filename> when they are passed as boot parameters.  <filename>file</filename> when they are passed as boot parameters.
290    
291  </para>  </para>
292      </sect2>
293    
294      <sect2 id="preseed-bootparms">
295      <title>Using boot parameters to preseed questions</title>
296    <para>
297    
298    If a preconfiguration file cannot be used to preseed some steps, the
299    install can still be fully automated, since you can pass preseed values on
300    the command line when booting the installer.
301    
302  </para><para>  </para><para>
303    
304  While you're at it, you may want to add a boot parameter  Boot parameters can also be used if you do not really want to use preseeding,
305  <userinput>priority=critical</userinput>. This will avoid most  but just want to provide an answer for a specific question. Some examples where
306  questions even if the preseeding below misses some.  this can be useful are documented elsewhere in this manual.
307    
308    </para><para>
309    
310    To set a value to be used inside &d-i;, just pass
311    <userinput><replaceable>path/to/variable</replaceable>=<replaceable>value</replaceable></userinput>
312    for any of the preseed variables listed in the examples in this appendix.
313    If a value is to be used to configure packages for the target system, you
314    will need to prepend the <firstterm>owner</firstterm><footnote>
315    
316    <para>
317    The owner of a debconf variable (or template) is normally the name of the
318    package that contains the corresponding debconf template. For variables
319    used in the installer itself the owner is <quote>d-i</quote>.
320    Templates and variables can have more than one owner which helps to
321    determine whether they can be removed from the debconf database if the
322    package is purged.
323  </para>  </para>
324    
325    </footnote> of the variable as in
326    <userinput><replaceable>owner</replaceable>:<replaceable>path/to/variable</replaceable>=<replaceable>value</replaceable></userinput>.
327    If you don't specify the owner, the value for the variable will not be
328    copied to the debconf database in the target system and thus remain unused
329    during the configuration of the relevant package.
330    
331    </para><para>
332    
333    Note that some variables that are frequently set at the boot prompt
334    have a shorter alias. If an alias is available, it is used in the
335    examples in this appendix instead of the full variable.  In
336    particular, the <literal>preseed/url</literal> variable has been
337    aliased as <literal>url</literal> and has some extra magic to allow
338    shortened urls to be used. Another example is the <literal>tasks</literal>
339    alias, which translates to <literal>tasksel:tasksel/first</literal>.
340    
341    </para><para>
342    
343    A <quote>--</quote> in the boot options has special meaning. Kernel
344    parameters that appear after the last <quote>--</quote> may be copied
345    into the bootloader configuration for the installed system (if supported by
346    the installer for the bootloader). The installer will automatically filter
347    out any options (like preconfiguration options) that it recognizes.
348    
349    </para>
350    <note><para>
351    
352    Current linux kernels (2.6.9 and later) accept a maximum of 32 command line
353    options and 32 environment options, including any options added by default
354    for the installer. If these numbers are exceeded, the kernel will panic
355    (crash). (For earlier kernels, these numbers were lower.)
356    
357    </para></note>
358    <para>
359    
360    For most installations some of the default options in your bootloader
361    configuration file, like <literal>vga=normal</literal>, may be safely
362    removed which may allow you to add more options for preseeding.
363    
364    </para>
365    <note><para>
366    
367    It may not always be possible to specify values with spaces for boot
368    parameters, even if you delimit them with quotes.
369    
370    </para></note>
371      </sect2>
372    
373      <sect2 id="preseed-auto">
374      <title>Auto mode</title>
375    <para>
376    
377    There are several features of Debian Installer that combine to allow
378    fairly simple command lines at the boot prompt to result in
379    arbitrarily complex customized automatic installs.  To illustrate
380    this, here are some examples that can be used at the boot prompt:
381    
382    <informalexample><screen>
383    auto url=autoserver
384    </screen></informalexample>
385    
386    This relies on there being a DHCP server that will get the machine to
387    the point where <literal>autoserver</literal> can be resolved by DNS,
388    perhaps after adding the local domain if that was provided by DHCP.
389    If this was done at a site where the domain is
390    <literal>example.com</literal>, and they have a reasonably sane DHCP
391    setup, it would result in the preseed file being retrieved from
392    <literal>http://autoserver.example.com/d-i/etch/./preseed.cfg</literal>.
393    
394    </para><para>
395    
396    The last part of that url (<literal>d-i/etch/./preseed.cfg</literal>)
397    is taken from <literal>auto-install/defaultroot</literal>. By default
398    this includes the directory <literal>etch</literal> to allow future versions
399    to specify their own codename and let people migrate forwards in a
400    controlled manner.  The <literal>/./</literal> bit is used to indicate
401    a root, relative to which subsequent paths can be anchored (for use in
402    preseed/include and preseed/run).  This allows files to be specified
403    either as full URLs, paths starting with / that are thus anchored, or
404    even paths relative to the location where the last preseed file was
405    found.  This can be used to construct more portable scripts where an
406    entire hierarchy of scripts can be moved to a new location without
407    breaking it, for example copying the files onto a USB stick when they
408    started out on a web server.  In this example, if the preseed file
409    sets <literal>preseed/run</literal> to
410    <literal>/scripts/late_command.sh</literal> then the file will be
411    fetched from
412    <literal>http://autoserver.example.com/d-i/etch/./scripts/late_command.sh</literal>.
413    
414    </para><para>
415    
416    If there is no local DHCP or DNS infrastructure, or if you do not want to
417    use the default path to <filename>preseed.cfg</filename>, you can still
418    use an explicit url, and if you don't use the <literal>/./</literal>
419    element it will be anchored to the start of the path (i.e. the third
420    <literal>/</literal> in the URL).  Here is an example that requires minimal
421    support from the local network infrastructure:
422    
423    <informalexample><screen>
424    auto url=<replaceable>http://192.168.1.2/path/to/mypreseed.file</replaceable>
425    </screen></informalexample>
426    
427    The way this works is that:
428    <itemizedlist spacing="compact">
429    <listitem><para>
430    if the URL is missing a protocol, http is assumed,
431    </para></listitem>
432    <listitem><para>
433    if the hostname section contains no periods, it has the domain derived
434    from DHCP appended to it, and
435    </para></listitem>
436    <listitem><para>
437    if there's no <literal>/</literal>'s after the hostname, then the default
438    path is added.
439    </para></listitem>
440    </itemizedlist>
441    
442    </para><para>
443    
444    In addition to specifying the url, you can also specify settings that
445    do not directly affect the behavior of &d-i; itself, but can be passed
446    through to scripts specified using <literal>preseed/run</literal>
447    in the loaded preseed file.  At present, the only example of
448    this is <literal>auto-install/classes</literal>, which has an alias
449    <literal>classes</literal>.  This can be used thus:
450    
451    <informalexample><screen>
452    auto url=<replaceable>example.com</replaceable> classes=<replaceable>class_A;class_B</replaceable>
453    </screen></informalexample>
454    
455    The classes could for example denote the type of system to be installed,
456    or the localization to be used.
457    
458    </para><para>
459    
460    It is of course possible to extend this concept, and if you do, it is
461    reasonable to use the auto-install namespace for this. So one might have
462    something like <literal>auto-install/style</literal> which is then used
463    in your scripts.  If you feel the need to do this, please mention it on
464    the <email>debian-boot@lists.debian.org</email> mailing list so that we
465    can avoid namespace conflicts, and perhaps add an alias for the parameter
466    for you.
467    
468    </para><para>
469    
470    The <literal>auto</literal> boot label is not yet defined on all
471    architectures. The same effect may be achieved by simply adding the two
472    parameters <literal>auto=true priority=critical</literal> to the kernel
473    command line.  The <literal>auto</literal> parameter is an alias for
474    <literal>auto-install/enabled</literal> and controls the delay of the
475    locale and keyboard questions until after there has been a chance to
476    preseed them, while <literal>priority</literal> is an alias for
477    <literal>preseed/priority</literal> and setting it to
478    <literal>critical</literal> stops any questions with a lower priority
479    from being asked.
480    
481    </para><para>
482    
483    Additional options that may be of interest while attempting to
484    automate an install while using DHCP are: <literal>interface=auto
485    netcfg/dhcp_timeout=60</literal> which makes the machine choose the
486    first viable NIC and be more patient about getting a reply to its
487    DHCP query.
488    
489    </para>
490      </sect2>
491    
492      <sect2 id="preseed-aliases">
493      <title>Aliases useful with preseeding</title>
494    <para>
495    
496    The following aliases can be useful when using (auto mode) preseeding.
497    
498    </para>
499    
500    <!-- Setting column width does not seem to work; use non-breaking spaces
501         to separate columns a bit -->
502    <informaltable frame="none">
503    <tgroup cols="2"><tbody>
504    <row><entry>auto</entry><entry>auto-install/enabled</entry></row>
505    <row><entry>classes</entry><entry>auto-install/classes</entry></row>
506    <row><entry>fb</entry><entry>debian-installer/framebuffer</entry></row>
507    <row><entry>locale</entry><entry>debian-installer/locale</entry></row>
508    <row><entry>priority</entry><entry>debconf/priority</entry></row>
509    <row><entry>file</entry><entry>preseed/file</entry></row>
510    <row><entry>url</entry><entry>preseed/url</entry></row>
511    <row><entry>interface</entry><entry>netcfg/choose_interface</entry></row>
512    <row><entry>hostname&nbsp;&nbsp;&nbsp;</entry><entry>netcfg/get_hostname</entry></row>
513    <row><entry>domain</entry><entry>netcfg/get_domain</entry></row>
514    <row><entry>protocol</entry><entry>mirror/protocol</entry></row>
515    <row><entry>suite</entry><entry>mirror/suite</entry></row>
516    </tbody></tgroup>
517    </informaltable>
518    
519    </sect2>    </sect2>
520    
521    <sect2 id="preseed-dhcp">    <sect2 id="preseed-dhcp">
# Line 368  automate Debian installs should only be Line 554  automate Debian installs should only be
554    
555  </para>  </para>
556    </sect2>    </sect2>
   
   <sect2 id="preseed-bootparms">  
   <title>Using boot parameters to supplement preseeding</title>  
 <para>  
   
 Some parts of the installation process cannot be automated using some forms  
 of preseeding because the questions are asked before the preconfiguration  
 file is loaded. For example, if the preconfiguration file is downloaded over  
 the network, the network setup must be done first. One reason to use initrd  
 preseeding is that it allows preseeding of even these early steps of the  
 installation process.  
   
 </para><para>  
   
 If a preconfiguration file cannot be used to preseed some steps, the install  
 can still be fully automated, since you can pass preseed values to the kernel  
 on the command line. Just pass <userinput>path/to/var=value</userinput>  
 for any of the preseed variables listed in the examples.  
   
 </para><para>  
   
 A <quote>--</quote> in the boot options has special meaning.  
 Kernel parameters that appear after it will be copied into the installed  
 bootloader configuration (if supported by the installer for the  
 bootloader). Note that the <quote>--</quote> may already be  
 present in the default boot parameters.  
   
 </para>  
 <note><para>  
   
 The 2.4 kernel accepts a maximum of 8 command line options and  
 8 environment options (including any options added by default for the  
 installer). If these numbers are exceeded, 2.4 kernels will drop any  
 excess options and 2.6 kernels will panic. For kernel 2.6.9 and later,  
 you can use 32 command line options and 32 environment options.  
   
 </para></note>  
 <para>  
   
 For most installations some of the default options in your bootloader  
 configuration file, like <literal>vga=normal</literal>, may be safely  
 removed which may allow you to add more options for preseeding.  
   
 </para>  
 <note><para>  
   
 It may not always be possible to specify values with spaces for boot  
 parameters, even if you delimit them with quotes.  
   
 </para></note>  
   </sect2>  
557   </sect1>   </sect1>
558    
559    
560   <sect1 id="preseed-creating">   <sect1 id="preseed-creating">
561   <title>Creating a preconfiguration file</title>   <title>Creating a preconfiguration file</title>
562  <para>  <para>
# Line 453  There are a few rules to keep in mind wh Line 589  There are a few rules to keep in mind wh
589  <listitem><para>  <listitem><para>
590    Most questions need to be preseeded using the values valid in English and    Most questions need to be preseeded using the values valid in English and
591    not the translated values. However, there are some questions (for example    not the translated values. However, there are some questions (for example
592    in <classname>partman</classname> where the translated values need to be    in <classname>partman</classname>) where the translated values need to be
593    used.    used.
594  </para></listitem>  </para></listitem>
595  <listitem><para>  <listitem><para>
# Line 520  an install, you can use the command <com Line 656  an install, you can use the command <com
656  </para>  </para>
657   </sect1>   </sect1>
658    
659    
660   <sect1 id="preseed-contents">   <sect1 id="preseed-contents">
661   <title>Contents of the preconfiguration file</title>   <title>Contents of the preconfiguration file</title>
662  <para>  <para>
# Line 605  If you need to pick a particular interfa Line 742  If you need to pick a particular interfa
742  a preconfiguration file from the network, use a boot parameter such as  a preconfiguration file from the network, use a boot parameter such as
743  <userinput>interface=<replaceable>eth1</replaceable></userinput>.  <userinput>interface=<replaceable>eth1</replaceable></userinput>.
744    
745    </para><para>
746    
747    Although preseeding the network configuration is normally not possible when
748    using network preseeding (using <quote>preseed/url</quote>), you can use
749    the following hack to work around that, for example if you'd like to set a
750    static address for the network interface. The hack is to force the network
751    configuration to run again after the preconfiguration file has been loaded
752    by creating a <quote>preseed/run</quote> script containing the following
753    lines:
754    
755    <informalexample><screen>
756    killall.sh dhclient
757    netcfg
758    </screen></informalexample>
759    
760  </para>  </para>
761    
762  <informalexample role="example"><screen>  <informalexample role="example"><screen>
# Line 654  d-i netcfg/wireless_wep string Line 806  d-i netcfg/wireless_wep string
806    <title>Mirror settings</title>    <title>Mirror settings</title>
807  <para>  <para>
808    
809  Depending on the installation method you use, a mirror may be used both to  Depending on the installation method you use, a mirror may be used to
810  download additional components of the installer, the base system and to  download additional components of the installer, to install the base system,
811  set up the <filename>/etc/apt/sources.list</filename> for the installed  and to set up the <filename>/etc/apt/sources.list</filename> for the installed
812  system.  system.
813    
814  </para><para>  </para><para>
# Line 695  d-i mirror/http/proxy string Line 847  d-i mirror/http/proxy string
847  <para>  <para>
848    
849  Using preseeding to partition the harddisk is very much limited to what is  Using preseeding to partition the harddisk is very much limited to what is
850  supported by <classname>partman-auto</classname>. You can choose to either  supported by <classname>partman-auto</classname>. You can choose to partition
851  partition existing free space on a disk or a whole disk. The layout of the  either existing free space on a disk or a whole disk. The layout of the
852  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
853  a recipe file or a recipe included in the preconfiguration file. It is  a recipe file or a recipe included in the preconfiguration file. It is
854  currently not possible to partition multiple disks using preseeding nor to  currently not possible to partition multiple disks using preseeding.
 set up RAID.  
855    
856  </para>  </para>
857    
# Line 716  correct one will be selected before usin Line 867  correct one will be selected before usin
867  # 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.
868  # Note: this must be preseeded with a localized (translated) value.  # Note: this must be preseeded with a localized (translated) value.
869  #d-i partman-auto/init_automatically_partition \  #d-i partman-auto/init_automatically_partition \
870  #      select Use the largest continuous free space  #      select Guided - use the largest continuous free space
871    
872  # Alternatively, you can specify a disk to partition. The device name can  # Alternatively, you can specify a disk to partition. The device name
873  # be given in either devfs or traditional non-devfs format.  # can be given in either devfs or traditional non-devfs format.
874  # For example, to use the first disk devfs knows of:  # For example, to use the first disk:
875  d-i partman-auto/disk string /dev/discs/disc0/disc  d-i partman-auto/disk string /dev/discs/disc0/disc
876    # In addition, you'll need to specify the method to use.
877    # The presently available methods are: "regular", "lvm" and "crypto"
878    d-i partman-auto/method string lvm
879    
880    # If one of the disks that are going to be automatically partitioned
881    # contains an old LVM configuration, the user will normally receive a
882    # warning. This can be preseeded away...
883    d-i partman-auto/purge_lvm_from_device boolean true
884    # And the same goes for the confirmation to write the lvm partitions.
885    d-i partman-lvm/confirm boolean true
886    
887  # You can choose from any of the predefined partitioning recipes.  # You can choose from any of the predefined partitioning recipes.
888  # Note: this must be preseeded with a localized (translated) value.  # Note: this must be preseeded with a localized (translated) value.
# Line 738  d-i partman-auto/choose_recipe \ Line 899  d-i partman-auto/choose_recipe \
899  # just point at it.  # just point at it.
900  #d-i partman-auto/expert_recipe_file string /hd-media/recipe  #d-i partman-auto/expert_recipe_file string /hd-media/recipe
901    
902  # If not, you can put an entire recipe the preconfiguration file in one  # If not, you can put an entire recipe into the preconfiguration file in one
903  # (logical) line. This example creates a small /boot partition, suitable  # (logical) line. This example creates a small /boot partition, suitable
904  # swap, and uses the rest of the space for the root partition:  # swap, and uses the rest of the space for the root partition:
905  #d-i partman-auto/expert_recipe string                         \  #d-i partman-auto/expert_recipe string                         \
# Line 767  d-i partman/confirm boolean true Line 928  d-i partman/confirm boolean true
928    
929    </sect2>    </sect2>
930    
931      <sect2 id="preseed-partman-raid">
932      <title>Partitioning using RAID</title>
933    <para>
934    
935    You can also use preseeding to set up partitions on software RAID arrays.
936    Supported are RAID levels 0, 1 and 5, creating degraded arrays and
937    specifying spare devices.
938    If you are using RAID 1, you can preseed grub to install to all devices
939    used in the array; see <xref linkend="preseed-bootloader"/>.
940    
941    </para>
942    
943    <warning><para>
944    
945    This type of automated partitioning is easy to get wrong. It is also a
946    very new component that may still have some bugs or missing error
947    handling. The responsibility to get the various recipes right (so they
948    make sense and don't conflict) lies with the user.
949    Check <filename>/var/log/syslog</filename> if you run into problems.
950    
951    </para><para>
952    
953    Note that only RAID 0 and RAID 1 have been tested by the developers of the
954    component. RAID 5 is untested. Advanced RAID setup with degraded arrays or
955    spare devices has only been tested lightly.
956    
957    </para></warning>
958    
959    <informalexample><screen>
960    # NOTE: this option is of beta release quality and should be used carefully
961    
962    # The method should be set to "raid".
963    #d-i partman-auto/method string raid
964    # Specify the disks to be partitioned. They will all get the same layout,
965    # so this will only work if the disks are the same size.
966    #d-i partman-auto/disk string /dev/discs/disc0/disc /dev/discs/disc1/disc
967    
968    # Next you need to specify the physical partitions that will be used.
969    #d-i partman-auto/expert_recipe string \
970    #      multiraid ::                                         \
971    #              1000 5000 4000 raid                          \
972    #                      $primary{ } method{ raid }           \
973    #              .                                            \
974    #              64 512 300% raid                             \
975    #                      method{ raid }                       \
976    #              .                                            \
977    #              500 10000 1000000000 raid                    \
978    #                      method{ raid }                       \
979    #              .
980    
981    # Last you need to specify how the previously defined partitions will be
982    # used in the RAID setup. Remember to use the correct partition numbers
983    # for logical partitions.
984    # Parameters are:
985    # &lt;raidtype&gt; &lt;devcount&gt; &lt;sparecount&gt; &lt;fstype&gt; &lt;mountpoint&gt; \
986    #          &lt;devices&gt; &lt;sparedevices&gt;
987    # RAID levels 0, 1 and 5 are supported; devices are separated using "#"
988    #d-i partman-auto-raid/recipe string \
989    #    1 2 0 ext3 /                                           \
990    #          /dev/discs/disc0/part1#/dev/discs/disc1/part1    \
991    #    .                                                      \
992    #    1 2 0 swap -                                           \
993    #          /dev/discs/disc0/part5#/dev/discs/disc1/part5    \
994    #    .                                                      \
995    #    0 2 0 ext3 /home                                       \
996    #          /dev/discs/disc0/part6#/dev/discs/disc1/part6    \
997    #    .
998    
999    # This makes partman automatically partition without confirmation.
1000    d-i partman-md/confirm boolean true
1001    d-i partman/confirm_write_new_label boolean true
1002    d-i partman/choose_partition \
1003           select Finish partitioning and write changes to disk
1004    d-i partman/confirm boolean true
1005    </screen></informalexample>
1006    
1007      </sect2>
1008    
1009    <sect2 id="preseed-time">    <sect2 id="preseed-time">
1010    <title>Clock and time zone setup</title>    <title>Clock and time zone setup</title>
1011    
# Line 800  earlier questions. You can optionally ad Line 1039  earlier questions. You can optionally ad
1039  #d-i apt-setup/security_host string  #d-i apt-setup/security_host string
1040    
1041  # Additional repositories, local[0-9] available  # Additional repositories, local[0-9] available
1042  #d-i apt-setup/local0/comment string local server  #d-i apt-setup/local0/repository string \
 #d-i apt-setup/local0/source string \  
1043  #       deb http://local.server/debian stable main  #       deb http://local.server/debian stable main
1044  # URL to the public key of the local repository  #d-i apt-setup/local0/comment string local server
1045    # Enable deb-src lines
1046    #d-i apt-setup/local0/source boolean true
1047    # URL to the public key of the local repository; you must provide a key or
1048    # apt will complain about the unauthenticated repository and so the
1049    # sources.list line will be left commented out
1050  #d-i apt-setup/local0/key string http://local.server/key  #d-i apt-setup/local0/key string http://local.server/key
1051  </screen></informalexample>  </screen></informalexample>
1052    
# Line 900  installation. The only questions asked c Line 1143  installation. The only questions asked c
1143  # if no other operating system is detected on the machine.  # if no other operating system is detected on the machine.
1144  d-i grub-installer/only_debian boolean true  d-i grub-installer/only_debian boolean true
1145    
1146  # This one makes grub-installer install to the MBR if if finds some other OS  # This one makes grub-installer install to the MBR if it also finds some other
1147  # too, which is less safe as it might not be able to boot that other OS.  # OS, which is less safe as it might not be able to boot that other OS.
1148  d-i grub-installer/with_other_os boolean true  d-i grub-installer/with_other_os boolean true
1149    
1150  # Alternatively, if you want to install to a location other than the mbr,  # Alternatively, if you want to install to a location other than the mbr,
1151  # uncomment and edit these lines:  # uncomment and edit these lines:
 #d-i grub-installer/bootdev  string (hd0,0)  
1152  #d-i grub-installer/only_debian boolean false  #d-i grub-installer/only_debian boolean false
1153  #d-i grub-installer/with_other_os boolean false  #d-i grub-installer/with_other_os boolean false
1154    #d-i grub-installer/bootdev  string (hd0,0)
1155    # To install grub to multiple disks:
1156    #d-i grub-installer/bootdev  string (hd0,0) (hd1,0) (hd2,0)
1157  </screen></informalexample>  </screen></informalexample>
1158    
1159    </sect2>    </sect2>
# Line 964  You can also choose to install no tasks, Line 1209  You can also choose to install no tasks,
1209  set of packages in some other way. We recommend always including the  set of packages in some other way. We recommend always including the
1210  <userinput>standard</userinput> task.  <userinput>standard</userinput> task.
1211    
1212    </para><para>
1213    
1214    If you want to install some individual packages in addition to packages
1215    installed by tasks, you can use the parameter
1216    <classname>pkgsel/include</classname>. The value of this parameter can be
1217    a list of packages separated by either commas or spaces, which allows it
1218    to be used easily on the kernel command line as well.
1219    
1220  </para>  </para>
1221    
1222  <informalexample role="example"><screen>  <informalexample role="example"><screen>
# Line 971  tasksel tasksel/first multiselect standa Line 1224  tasksel tasksel/first multiselect standa
1224  #tasksel tasksel/first multiselect standard, web-server  #tasksel tasksel/first multiselect standard, web-server
1225  #tasksel tasksel/first multiselect standard, kde-desktop  #tasksel tasksel/first multiselect standard, kde-desktop
1226    
1227    # Individual additional packages to install
1228    #d-i pkgsel/include string openssh-server build-essential
1229    
1230  # 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
1231  # installed, and what software you use. The default is not to report back,  # installed, and what software you use. The default is not to report back,
1232  # but sending reports helps the project determine what software is most  # but sending reports helps the project determine what software is most
# Line 1064  xserver-xorg xserver-xorg/config/monitor Line 1320  xserver-xorg xserver-xorg/config/monitor
1320    </sect2>    </sect2>
1321   </sect1>   </sect1>
1322    
1323    
1324   <sect1 id="preseed-advanced">   <sect1 id="preseed-advanced">
1325   <title>Advanced options</title>   <title>Advanced options</title>
1326    
1327    <sect2 id="preseed-shell">    <sect2 id="preseed-hooks">
1328    <title>Shell commands</title>    <title>Running custom commands during the installation</title>
1329    <para>
1330    
1331    A very powerful and flexible option offered by the preconfiguration tools
1332    is the ability to run commands or scripts at certain points in the
1333    installation.
1334    
1335    </para>
1336    
1337  <informalexample role="example"><screen>  <informalexample role="example"><screen>
1338  # d-i preseeding is inherently not secure. Nothing in the installer checks  # d-i preseeding is inherently not secure. Nothing in the installer checks
# Line 1090  xserver-xorg xserver-xorg/config/monitor Line 1354  xserver-xorg xserver-xorg/config/monitor
1354  </screen></informalexample>  </screen></informalexample>
1355    
1356    </sect2>    </sect2>
1357    
1358      <sect2 id="preseed-seenflag">
1359      <title>Using preseeding to change default values</title>
1360    <para>
1361    
1362    It is possible to use preseeding to change the default answer for a
1363    question, but still have the question asked. To do this the
1364    <firstterm>seen</firstterm> flag must be reset to <quote>false</quote> after
1365    setting the value for a question.
1366    
1367    </para>
1368    
1369    <informalexample><screen>
1370    d-i foo/bar string value
1371    d-i foo/bar seen false
1372    </screen></informalexample>
1373    
1374      </sect2>
1375    
1376    <sect2 id="preseed-chainload">    <sect2 id="preseed-chainload">
1377    <title>Chainloading preconfiguration files</title>    <title>Chainloading preconfiguration files</title>
# Line 1104  settings for certain configurations in o Line 1386  settings for certain configurations in o
1386  </para>  </para>
1387    
1388  <informalexample><screen>  <informalexample><screen>
1389  # More that one file can be listed, separated by spaces; all will be  # More than one file can be listed, separated by spaces; all will be
1390  # loaded. The included files can have preseed/include directives of their  # loaded. The included files can have preseed/include directives of their
1391  # 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
1392  # the same directory as the preconfiguration file that includes them.  # the same directory as the preconfiguration file that includes them.
# Line 1121  settings for certain configurations in o Line 1403  settings for certain configurations in o
1403  #      string echo if [ "`hostname`" = bob ]; then echo bob.cfg; fi  #      string echo if [ "`hostname`" = bob ]; then echo bob.cfg; fi
1404    
1405  # Most flexibly of all, this downloads a program and runs it. The program  # Most flexibly of all, this downloads a program and runs it. The program
1406  # can use commands such as debconf-set to manupulate the debconf database.  # can use commands such as debconf-set to manipulate the debconf database.
1407    # More than one script can be listed, separated by spaces.
1408  # Note that if the filenames are relative, they are taken from the same  # Note that if the filenames are relative, they are taken from the same
1409  # directory as the preconfiguration file that runs them.  # directory as the preconfiguration file that runs them.
1410  d-i preseed/run string foo.sh  #d-i preseed/run string foo.sh
1411  </screen></informalexample>  </screen></informalexample>
1412    
1413    <para>
1414    
1415    It is also possible to chainload from the initrd or file preseeding phase,
1416    into network preseeding by setting preseed/url in the earlier files.
1417    This will cause network preseeding to be performed when the network comes
1418    up.  You need to be careful when doing this, since there will be two
1419    distinct runs at preseeding, meaning for example that you get another
1420    chance to run the preseed/early command, the second one happening after the
1421    network comes up.
1422    
1423    </para>
1424    
1425    </sect2>    </sect2>
1426   </sect1>   </sect1>
1427  </appendix>  </appendix>

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

  ViewVC Help
Powered by ViewVC 1.1.5