/[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 32275 by fjp, Wed Nov 16 23:16:13 2005 UTC revision 32276 by fjp, Sat Nov 19 21:40:34 2005 UTC
# Line 10  Should be renamed to this, but don't wan Line 10  Should be renamed to this, but don't wan
10    
11  <para>  <para>
12    
13    This appendix explains the intricacies of preseeding answers to dialogs in
14    &d-i; to automate your installation.
15    
16    </para><para>
17    
18  The configuration fragments used in this appendix are also available as an  The configuration fragments used in this appendix are also available as an
19  example preseed file from &urlset-example-preseed;.  example preseed file from &urlset-example-preseed;.
20    
21  </para>  </para>
22    
23  <sect1 id="preseed-intro">   <sect1 condition="FIXME" id="preseed-intro">
24   <title>Introduction</title>   <title>Introduction</title>
25    
26  <itemizedlist>  <itemizedlist>
# Line 39  example preseed file from &urlset-exampl Line 44  example preseed file from &urlset-exampl
44  </para></listitem>  </para></listitem>
45  </itemizedlist>  </itemizedlist>
46    
47  <para>   </sect1>
   
 <!--  
 - Methods: initrd, net, file  
 - General stuff from Startup  
 -->  
   
 </para>  
   
 </sect1>  
48    
49  <sect1 id="preseed-using">   <sect1 id="preseed-using">
50   <title>Using preseeding</title>   <title>Using preseeding</title>
51    
52   <sect2 id="preseed-loading">    <sect2 id="preseed-loading">
53    <title>Loading the preseed file</title>    <title>Loading the preseed file</title>
54  <para>  <para>
55    
# Line 107  While you're at it, you may want to add Line 103  While you're at it, you may want to add
103  questions even if the preseeding below misses some.  questions even if the preseeding below misses some.
104    
105  </para>  </para>
106   </sect2>    </sect2>
107    
108   <sect2 id="preseed-bootparms">    <sect2 id="preseed-bootparms">
109    <title>Using boot parameters to supplement preseeding</title>    <title>Using boot parameters to supplement preseeding</title>
110  <para>  <para>
111    
112  Some parts of the installation process cannot be automated using  Some parts of the installation process cannot be automated using some forms
113  some forms of preseeding, because the questions are asked before  of preseeding, because the questions are asked before the preseed file is
114  the preseed file is loaded. For example, if the preseed file is  loaded. For example, if the preseed file is downloaded over the network,
115  downloaded over the network, the network setup must be done first.  the network setup must be done first. One reason to use initrd preseeding
116  One reason to use initrd preseeding is that it allows preseeding  is that it allows preseeding of even these early steps of the installation
117  of even these early steps of the installation process.  process.
118    
119  </para><para>  </para><para>
120    
# Line 137  excess options and 2.6 kernels will pani Line 133  excess options and 2.6 kernels will pani
133  you can use 32 command line options and 32 environment options.  you can use 32 command line options and 32 environment options.
134    
135  </para></note>  </para></note>
 <note><para>  
   
 It may not be possible to specify values with spaces for boot parameters,  
 even if you delimit them with quotes.  
   
 </para></note>  
136  <para>  <para>
137    
138  Some of the default options, like 'vga=normal' may be safely removed  For most installations some of the default options in your bootloader
139  for most installations, which may allow you to add more options for  configuration file, like 'vga=normal', may be safely removed which may
140  preseeding.  allow you to add more options for preseeding.
141    
142  </para>  </para>
143   </sect2>  <note><para>
144  </sect1>  
145    It may not always be possible to specify values with spaces for boot
146    parameters, even if you delimit them with quotes.
147    
148    </para></note>
149      </sect2>
150     </sect1>
151    
152  <sect1 id="preseed-creating">   <sect1 condition="FIXME" id="preseed-creating">
153   <title>Creating a preseed file</title>   <title>Creating a preseed file</title>
154    
155  <itemizedlist>  <itemizedlist>
# Line 161  preseeding. Line 157  preseeding.
157    Relation with /var/lib/(c)debconf/templates    Relation with /var/lib/(c)debconf/templates
158  </para></listitem>  </para></listitem>
159  <listitem><para>  <listitem><para>
160    Most values need to be in English    Most values need to be in English or codes
161  </para></listitem>  </para></listitem>
162  <listitem><para>  <listitem><para>
163    Using a manual installation as base    Using a manual installation as base
# Line 173  preseeding. Line 169  preseeding.
169    
170  <para>  <para>
171    
172  </para>  To check if the format of your preseed file is valid before performing an
173    install, you can use the command <command>debconf-set-selections -c
174    <replaceable>preseed.cfg</replaceable></command>.
175    
176  </sect1>  </para>
177     </sect1>
178    
179  <sect1 id="preseed-stage1">   <sect1 id="preseed-stage1">
180   <title>Preseeding the first stage of the installation</title>   <title>Preseeding the first stage of the installation</title>
181  <para>  <para>
182    
# Line 194  architecture. Line 193  architecture.
193    
194  </para>  </para>
195    
196   <sect2 id="preseed-l10n">    <sect2 id="preseed-l10n">
197    <title>Localization</title>    <title>Localization</title>
198  <para>  <para>
199    
# Line 215  d-i debian-installer/locale string en_US Line 214  d-i debian-installer/locale string en_US
214    
215  </para><para>  </para><para>
216    
217  Something about selecting keyboard architectures (needs new kbd-chooser) and how  Keyboard configuration consists of selecting a keyboard architecture and a
218  the keymap needs to match the architecture.  keymap. In most cases the correct keyboard architecture is selected by
219    default, so there's normally no need to preseed it. The keymap must of
220    course be valid for the selected or preseeded architecture.
221    
222    </para><para>
223    
224    To skip keyboard configuration preseed
225    <classname>console-tools/archs</classname> with
226    <userinput>skip-config</userinput>.
227    This will result in the kernel keymap remaining active.
228    
229    </para>
230    
231  <informalexample><screen>  <informalexample><screen>
232  # Keyboard.  # Keyboard selection.
233  #d-i console-tools/archs select at  #d-i console-tools/archs select at
234  d-i console-keymaps-at/keymap select us  d-i console-keymaps-at/keymap select us
235    # Example for a different keyboard architecture
236    #d-i console-keymaps-usb/keymap select mac-usb-us
237    
238  </screen></informalexample>  </screen></informalexample>
239    
240  </para>  <note><para>
241   </sect2>  
242    The changes in the input layer for 2.6 kernels have made the keyboard
243    architecture virtually obsolete. For 2.6 kernels normally a <quote>PC</quote>
244    (<userinput>at</userinput>) keymap should be selected.
245    
246   <sect2 id="preseed-network">  </para></note>
247      </sect2>
248    
249      <sect2 id="preseed-network">
250    <title>Network configuration</title>    <title>Network configuration</title>
251  <para>  <para>
252    
253  Of course, preseeding the network configuration won't work if you're  Of course, preseeding the network configuration won't work if you're
254  loading your preseed file from the network! But it's great if you're  loading your preseed file from the network. But it's great when you're
255  booting from CD or USB stick. If you are loading preseed files from  booting from CD or USB stick. If you are loading preseed files from
256  the network, you can pass network config parameters in using kernel  the network, you can pass network config parameters in using kernel
257  boot parameters.  boot parameters.
# Line 268  d-i netcfg/wireless_wep string Line 287  d-i netcfg/wireless_wep string
287  #d-i netcfg/dhcp_hostname string radish  #d-i netcfg/dhcp_hostname string radish
288  </screen></informalexample>  </screen></informalexample>
289    
290   </sect2>    </sect2>
291    
292   <sect2 id="preseed-mirror">    <sect2 id="preseed-mirror">
293    <title>Mirror settings</title>    <title>Mirror settings</title>
294  <para>  <para>
295    
# Line 308  d-i mirror/http/proxy string Line 327  d-i mirror/http/proxy string
327  #d-i mirror/udeb/suite string testing  #d-i mirror/udeb/suite string testing
328  </screen></informalexample>  </screen></informalexample>
329    
330   </sect2>    </sect2>
331    
332   <sect2 id="preseed-partman">    <sect2 id="preseed-partman">
333    <title>Partitioning</title>    <title>Partitioning</title>
334    <para>
335    
336    Using preseeding to partition the harddisk is very much limited to what is
337    supported by <classname>partman-auto</classname>. You can choose to either
338    partition existing free space on a disk or a whole disk. The layout of the
339    disk can be determined by using a predefined recipe, a custom recipe from
340    a recipe file or a recipe included in the preseed file. It is currently not
341    possible to partition multiple disks using preseeding nor to set up RAID or
342    LVM.
343    
344    </para>
345    
346    <warning><para>
347    
348    The identification of disks is dependent on the order in which their drivers
349    are loaded. If there are multiple disks in the system, make very sure the
350    correct one will be selected before using preseeding.
351    
352    </para></warning>
353    
354  <informalexample><screen>  <informalexample><screen>
355  # 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.
# Line 364  d-i partman/choose_partition \ Line 402  d-i partman/choose_partition \
402  d-i partman/confirm boolean true  d-i partman/confirm boolean true
403  </screen></informalexample>  </screen></informalexample>
404    
405   </sect2>    </sect2>
406    
407   <sect2 id="preseed-time">    <sect2 id="preseed-time">
408    <title>Clock and time zone setup</title>    <title>Clock and time zone setup</title>
409    
410  <informalexample><screen>  <informalexample><screen>
# Line 378  d-i clock-setup/utc boolean true Line 416  d-i clock-setup/utc boolean true
416  d-i time/zone string US/Eastern  d-i time/zone string US/Eastern
417  </screen></informalexample>  </screen></informalexample>
418    
419   </sect2>    </sect2>
420    
421   <sect2 id="preseed-account">    <sect2 id="preseed-account" condition="NOT-YET">
422    <title>Account setup</title>    <title>Account setup</title>
423  <para>  <para>
424    
# Line 423  access to a MD5 hash allows for brute fo Line 461  access to a MD5 hash allows for brute fo
461    
462  The <classname>passwd/root-password-crypted</classname> and  The <classname>passwd/root-password-crypted</classname> and
463  <classname>passwd/user-password-crypted</classname> variables can also be  <classname>passwd/user-password-crypted</classname> variables can also be
464  preseeded with "!" as value. In that case, the corresponding account  preseeded with <quote>!</quote> as value. In that case, the corresponding
465  is disabled. This may be convenient for the root account, provided of  account is disabled. This may be convenient for the root account, provided
466  course that an alternate method is setup to allow administrative  of course that an alternate method is setup to allow administrative
467  activities or root login (for instance by using SSH key authentication).  activities or root login (for instance by using SSH key authentication).
468    
469  </para>  </para>
470   </sect2>    </sect2>
471    
472   <sect2 id="preseed-bootloader">    <sect2 id="preseed-bootloader">
473    <title>Boot loader installation</title>    <title>Boot loader installation</title>
474    
475  <informalexample><screen>  <informalexample><screen>
# Line 454  d-i grub-installer/with_other_os boolean Line 492  d-i grub-installer/with_other_os boolean
492  #d-i grub-installer/with_other_os boolean false  #d-i grub-installer/with_other_os boolean false
493  </screen></informalexample>  </screen></informalexample>
494    
495   </sect2>    </sect2>
496    
497   <sect2 id="preseed-finish">    <sect2 id="preseed-finish">
498    <title>Finishing up the first stage install</title>    <title>Finishing up the first stage install</title>
499    
500  <informalexample><screen>  <informalexample><screen>
# Line 468  d-i prebaseconfig/reboot_in_progress not Line 506  d-i prebaseconfig/reboot_in_progress not
506  #d-i cdrom-detect/eject boolean false  #d-i cdrom-detect/eject boolean false
507  </screen></informalexample>  </screen></informalexample>
508    
509   </sect2>    </sect2>
510    
511   <sect2 id="preseed-shell">    <sect2 id="preseed-shell">
512    <title>Shell commands</title>    <title>Shell commands</title>
513    
514  <informalexample><screen>  <informalexample><screen>
# Line 499  d-i prebaseconfig/reboot_in_progress not Line 537  d-i prebaseconfig/reboot_in_progress not
537  #      string apt-get install zsh; chsh -s /bin/zsh  #      string apt-get install zsh; chsh -s /bin/zsh
538  </screen></informalexample>  </screen></informalexample>
539    
540   </sect2>    </sect2>
541  </sect1>   </sect1>
542    
543  <sect1 id="preseed-stage2">   <sect1 id="preseed-stage2">
544   <title>Preseeding the second stage of the installation</title>   <title>Preseeding the second stage of the installation</title>
545    
546   <sect2 id="preseed-baseconfig">    <sect2 id="preseed-baseconfig">
547    <title>Base config</title>    <title>Base config</title>
548    
549  <informalexample><screen>  <informalexample><screen>
# Line 525  base-config base-config/login note Line 563  base-config base-config/login note
563  #popularity-contest popularity-contest/participate boolean false  #popularity-contest popularity-contest/participate boolean false
564  </screen></informalexample>  </screen></informalexample>
565    
566   </sect2>    </sect2>
567    
568      <sect2 id="preseed-account">
569      <title>Account setup</title>
570    
571    <informalexample><screen>
572    # To preseed the root password, you have to put it in the clear in this
573    # file. That is not a very good idea, use caution!
574    #passwd passwd/root-password password r00tme
575    #passwd passwd/root-password-again password r00tme
576    
577    # If you want to skip creation of a normal user account.
578    #passwd passwd/make-user boolean false
579    
580   <sect2 id="preseed-apt">  # Alternatively, you can preseed the user's name and login.
581    #passwd passwd/user-fullname string Debian User
582    #passwd passwd/username string debian
583    # And their password, but use caution!
584    #passwd passwd/user-password password insecure
585    #passwd passwd/user-password-again password insecure
586    </screen></informalexample>
587    
588      </sect2>
589    
590      <sect2 id="preseed-apt">
591    <title>Apt setup</title>    <title>Apt setup</title>
592    
593  <informalexample><screen>  <informalexample><screen>
# Line 551  base-config apt-setup/another boolean fa Line 611  base-config apt-setup/another boolean fa
611  base-config apt-setup/security-updates boolean true  base-config apt-setup/security-updates boolean true
612  </screen></informalexample>  </screen></informalexample>
613    
614   </sect2>    </sect2>
615    
616   <sect2 id="preseed-tasksel">    <sect2 id="preseed-tasksel">
617    <title>Package selection</title>    <title>Package selection</title>
618    <para>
619    
620    You can choose to install any combination of tasks that are available.
621    Available tasks as of this writing include:
622    
623    <itemizedlist>
624    <listitem><para>
625      <userinput>Standard system</userinput>
626    </para></listitem>
627    <listitem><para>
628      <userinput>Desktop environment</userinput>
629    </para></listitem>
630    <listitem><para>
631      <userinput>Web server</userinput>
632    </para></listitem>
633    <listitem><para>
634      <userinput>Print server</userinput>
635    </para></listitem>
636    <listitem><para>
637      <userinput>DNS server</userinput>
638    </para></listitem>
639    <listitem><para>
640      <userinput>File server</userinput>
641    </para></listitem>
642    <listitem><para>
643      <userinput>Mail server</userinput>
644    </para></listitem>
645    <listitem><para>
646      <userinput>SQL database</userinput>
647    </para></listitem>
648    <listitem><para>
649      <userinput>Laptop</userinput>
650    </para></listitem>
651    <listitem><para>
652      <userinput>manual package selection</userinput>
653    </para></listitem>
654    </itemizedlist>
655    
656    The last of these will run aptitude. You can also choose to install no tasks,
657    and force the installation of a set of packages in some other way. We recommend
658    always including the <userinput>Standard system</userinput> task.
659    
660    </para>
661    
662  <informalexample><screen>  <informalexample><screen>
663  # You can choose to install any combination of tasks that are available.  tasksel tasksel/first multiselect Standard system, Desktop environment
664  # Available tasks as of this writing include: Desktop environment,  #tasksel tasksel/first multiselect Standard system, Web server
 # Web server, Print server, DNS server, File server, Mail server,  
 # SQL database, Laptop, Standard system, manual package selection. The  
 # last of those will run aptitude. You can also choose to install no  
 # tasks, and force the installation of a set of packages in some other  
 # way. We recommend always including the Standard system task.  
 tasksel tasksel/first multiselect Desktop environment, Standard system  
 #tasksel tasksel/first multiselect Web server, Standard system  
665  </screen></informalexample>  </screen></informalexample>
666    
667   </sect2>    </sect2>
668    
669   <sect2 id="preseed-mailer">    <sect2 id="preseed-mailer">
670    <title>Mailer configuration</title>    <title>Mailer configuration</title>
671    <para>
672    
673    During a normal install, exim asks only a few questions. Here's how to
674    avoid even those. More complicated preseeding is possible.
675    
676    </para>
677    
678  <informalexample><screen>  <informalexample><screen>
 # During a normal install, exim asks only a few questions. Here's how to  
 # avoid even those. More complicated preseeding is possible.  
679  exim4-config exim4/dc_eximconfig_configtype \  exim4-config exim4/dc_eximconfig_configtype \
680         select no configuration at this time         select no configuration at this time
681  exim4-config exim4/no_config boolean true  exim4-config exim4/no_config boolean true
# Line 587  exim4-config exim4/no_config boolean tru Line 687  exim4-config exim4/no_config boolean tru
687  exim4-config exim4/dc_postmaster string  exim4-config exim4/dc_postmaster string
688  </screen></informalexample>  </screen></informalexample>
689    
690   </sect2>    </sect2>
691    
692   <sect2 id="preseed-X">    <sect2 id="preseed-X">
693    <title>X configuration</title>    <title>X configuration</title>
694    <para>
695    
696  <informalexample><screen>  Preseeding Debian's X config is possible, but you probably need to know
697  # Preseeding Debian's X config is possible, but you probably need to know  some details about the video hardware of the machine, since Debian's X
698  # some details about the video hardware of the machine, since Debian's X  configurator does not do fully automatic configuration of everything.
 # configurator does not do fully automatic configuration of everything.  
699    
700    </para>
701    
702    <informalexample><screen>
703  # 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,
704  # you override whatever it chooses. Still, vesa will work most places.  # you override whatever it chooses. Still, vesa will work most places.
705  #xserver-xfree86 xserver-xfree86/config/device/driver select vesa  #xserver-xfree86 xserver-xfree86/config/device/driver select vesa
# Line 619  xserver-xfree86 xserver-xfree86/config/m Line 722  xserver-xfree86 xserver-xfree86/config/m
722         select 1024x768 @ 60 Hz         select 1024x768 @ 60 Hz
723  </screen></informalexample>  </screen></informalexample>
724    
725   </sect2>    </sect2>
726    
727   <sect2 id="preseed-other">    <sect2 id="preseed-other">
728    <title>Preseeding other packages</title>    <title>Preseeding other packages</title>
729    
730  <informalexample><screen>  <informalexample><screen>
# Line 634  xserver-xfree86 xserver-xfree86/config/m Line 737  xserver-xfree86 xserver-xfree86/config/m
737  #   debconf-get-selections >> file  #   debconf-get-selections >> file
738  </screen></informalexample>  </screen></informalexample>
739    
740   </sect2>    </sect2>
741  </sect1>   </sect1>
742    
743  <sect1 id="preseed-advanced">   <sect1 id="preseed-advanced">
744   <title>Advanced options</title>   <title>Advanced options</title>
745    <para>
746    
747    It is possible to include other preseed files from a preseed file. Any
748    settings in those files will override pre-existing settings from files
749    loaded earlier. This makes it possible to put, for example, general
750    networking settings for your location in one file and more specific
751    settings for certain configurations in other files.
752    
753    </para>
754    
755  <informalexample><screen>  <informalexample><screen>
756  # If you like, you can include other preseed files into this one.  # More that one file can be listed, separated by spaces; all will be
 # Any settings in those files will override pre-existing settings from this  
 # file. More that one file can be listed, separated by spaces; all will be  
757  # loaded. The included files can have preseed/include directives of their  # loaded. The included files can have preseed/include directives of their
758  # 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
759  # the same directory as the preseed file that includes them.  # the same directory as the preseed file that includes them.
# Line 658  xserver-xfree86 xserver-xfree86/config/m Line 768  xserver-xfree86 xserver-xfree86/config/m
768  # preseed files, includes those files.  # preseed files, includes those files.
769  #d-i preseed/include_command \  #d-i preseed/include_command \
770  #      string echo if [ "`hostname`" = bob ]; then echo bob.cfg; fi  #      string echo if [ "`hostname`" = bob ]; then echo bob.cfg; fi
   
 # To check the format of your preseed file before performing an install,  
 # you can use debconf-set-selections:  
 #   debconf-set-selections -c preseed.cfg  
771  </screen></informalexample>  </screen></informalexample>
772    
773  </sect1>   </sect1>
774  </appendix>  </appendix>

Legend:
Removed from v.32275  
changed lines
  Added in v.32276

  ViewVC Help
Powered by ViewVC 1.1.5