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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 36744 - (hide annotations) (download) (as text)
Thu Apr 27 15:14:51 2006 UTC (7 years ago) by joeyh
File MIME type: text/xml
File size: 38179 byte(s)
* Booting a USB stick via a boot floppy is not supported by current
  installer images.
* Update preseeding docs to use task names, not short descriptions, since
  that will work now and is more convenient for preseeding.
* Document the kde-desktop and gnome-desktop subtasks.
1 fjp 32199 <!-- retain these comments for translator revision tracking -->
2 joeyh 32508 <!-- $Id$ -->
3 fjp 32199
4     <!--
5 fjp 32424 Be carefull with the format of this file as it is parsed to generate
6 fjp 36205 the example preconfiguration file.
7 fjp 32424 In that file all text between <informalexample> tags that have the
8     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
10     'arch' attribute is in force that does not match the specified architecture.
11    
12     Currently only a single variant of the example file is generated (for i386).
13     -->
14    
15 fjp 33725 <appendix id="appendix-preseed">
16 fjp 32199 <title>Automating the installation using preseeding</title>
17    
18     <para>
19    
20 joeyh 32501 This appendix explains the intricacies of preseeding answers to questions in
21 fjp 32276 &d-i; to automate your installation.
22    
23     </para><para>
24    
25 fjp 32199 The configuration fragments used in this appendix are also available as an
26 fjp 36205 example preconfiguration file from &urlset-example-preseed;.
27 fjp 32199
28     </para>
29    
30 fjp 32424 <sect1 id="preseed-intro">
31 fjp 32199 <title>Introduction</title>
32 fjp 32424 <para>
33 fjp 32199
34 joeyh 33719 Preseeding provides a way to set answers to questions asked during the
35     installation process, without having to manually enter the answers while
36     the installation is running. This makes it possible to fully automate most
37     types of installation and even offers some features not available during
38     normal installations.
39 fjp 32424
40     </para>
41    
42     <sect2 id="preseed-methods">
43     <title>Preseeding methods</title>
44     <para>
45    
46     There are three methods that can be used for preseeding:
47     <firstterm>initrd</firstterm>, <firstterm>file</firstterm> and
48     <firstterm>network</firstterm>. Initrd preseeding will work with any
49 joeyh 32501 installation method and supports preseeding of more things, but it requires
50     the most preparation. File and network preseeding each can be used with
51     different installation methods. With file and network preseeding the first
52 fjp 36205 few installer questions cannot be preseeded because the preconfiguration
53 joeyh 32501 file is only loaded after they have been asked.
54 fjp 32424
55     </para><para>
56    
57     The following table shows which preseeding methods can be used with which
58     installation methods.
59    
60     <informaltable>
61     <tgroup cols="4">
62     <thead>
63     <row>
64     <entry>Installation method</entry><entry>initrd</entry>
65     <entry>file</entry><entry>network</entry>
66     </row>
67     </thead>
68    
69     <tbody>
70     <row>
71 joeyh 32501 <entry>CD/DVD</entry>
72 fjp 32424 <entry>yes</entry>
73     <entry>yes</entry>
74     <entry>no</entry>
75     </row><row>
76     <entry>netboot</entry>
77     <entry>yes</entry>
78     <entry>no</entry>
79     <entry>yes</entry>
80     </row><row>
81     <entry>hd-media <phrase condition="bootable-usb">(including usb-stick)</phrase></entry>
82     <entry>yes</entry>
83     <entry>yes</entry>
84     <entry>no</entry>
85     </row><row condition="supports-floppy-boot">
86     <entry>floppy based (cd-drivers)</entry>
87     <entry>yes</entry>
88     <entry>yes</entry>
89     <entry>no</entry>
90     </row><row condition="supports-floppy-boot">
91     <entry>floppy based (net-drivers)</entry>
92     <entry>yes</entry>
93     <entry>no</entry>
94     <entry>yes</entry>
95     </row><row arch="s390">
96     <entry>generic/tape</entry>
97     <entry>yes</entry>
98     <entry>no</entry>
99     <entry>yes</entry>
100     </row>
101     </tbody>
102    
103     </tgroup></informaltable>
104    
105     </para><para>
106    
107     An important difference between the preseeding methods is the point at which
108 fjp 36205 the preconfiguration file is loaded and processed. For initrd preseeding
109 fjp 32424 this is right at the start of the installation, before the first question is
110 joeyh 32501 even asked. For file preseeding this is after the CD or CD image has been
111 fjp 32424 loaded. For network preseeding it is only after the network has been
112     configured.
113    
114     </para><para>
115    
116     In practical terms this means for file and network preseeding that the
117     questions about language, country and keyboard selection will already have
118     been asked. For network preseeding add to that any questions related to
119     network configuration. Some other questions that are only displayed
120     at medium or low priority (like the first hardware detection run) will
121 joeyh 32501 also already have been processed.
122 fjp 32424
123     </para><para>
124    
125     Obviously, any questions that have been processed before the
126 fjp 36205 preconfiguration file is loaded cannot be preseeded.
127 fjp 32424 <xref linkend="preseed-bootparms"/> offers a way to avoid these
128     questions being asked.
129    
130     </para>
131     </sect2>
132    
133     <sect2 id="preseed-limitations">
134     <title>Limitations</title>
135     <para>
136    
137 joeyh 32501 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
139 fjp 32424 or use available free space on a disk; it is not possible to use existing
140 joeyh 35031 partitions. You currently cannot use preseeding to set up RAID.
141 fjp 32424
142     </para>
143     </sect2>
144    
145 fjp 32504 <!-- Joeyh feels this is too technical, so leave it out for now
146 fjp 32424 <sect2 id="preseed-debconf">
147     <title>Debconf basics</title>
148     <para>
149    
150     Preseeding makes use of the <classname>debconf</classname> framework. This
151     framework is the preferred mechanism used in Debian to interact with the user
152     when configuring packages and also forms the heart of &d-i;.
153     In the <classname>debconf</classname> framework questions or dialogs are
154     based on <firstterm>templates</firstterm>. There are different types of
155     templates for different types of questions. The actual questions are
156     <quote>generated</quote> from templates at runtime; multiple questions can
157     use the same template.
158    
159     </para><para>
160    
161     The following types of templates are relevant for preseeding.
162    
163 fjp 36269 </para>
164    
165 fjp 32199 <itemizedlist>
166     <listitem><para>
167 fjp 32424 string: allows the user to type any value
168 fjp 32199 </para></listitem>
169     <listitem><para>
170 fjp 32424 password: similar to string but the value typed is not displayed
171 fjp 32199 </para></listitem>
172     <listitem><para>
173 fjp 32424 boolean: for yes/no or true/false type of questions
174 fjp 32199 </para></listitem>
175     <listitem><para>
176 fjp 32424 select: allows the user to select one option from a list
177 fjp 32199 </para></listitem>
178     <listitem><para>
179 fjp 32424 multiselect: allows the user to select zero, one or more options from a list
180 fjp 32199 </para></listitem>
181     <listitem><para>
182 fjp 32424 note: used to display a message
183 fjp 32199 </para></listitem>
184     </itemizedlist>
185    
186 fjp 36269 <para>
187 fjp 32424
188     In &d-i; templates are stored in a readable file
189 joeyh 32501 <filename>/var/cache/debconf/templates.dat</filename>. This file contains all fixed
190 fjp 32424 text and all translations. It can also contain a default value for the
191     template. The fixed text can include variables that will be replaced at
192     runtime.
193    
194     </para><para>
195    
196 joeyh 32501 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.
198 fjp 32424 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>
200     are stored in a separate, non-readable file in the same directory.
201    
202     </para>
203     </sect2>
204 fjp 32504 -->
205 fjp 32424
206     <sect2 id="preseed-hooks">
207     <title>Running custom commands during the installation</title>
208     <para>
209    
210 fjp 36205 A very powerful and flexible option offered by the preconfiguration tools
211     is the ability to run commands or scripts at certain points in the
212     installation. See <xref linkend="preseed-shell"/> for details.
213 fjp 32424
214     </para>
215    
216     <itemizedlist>
217     <listitem><para>
218 fjp 36214 <userinput>preseed/early_command</userinput>: is run as soon as the
219 fjp 36205 preconfiguration file has been loaded
220 fjp 32424 </para></listitem>
221     <listitem><para>
222     <userinput>preseed/late_command</userinput>: is run just before the reboot
223 joeyh 33719 at the end of the install, but before the <filename>/target</filename>
224     filesystem has been unmounted
225 fjp 32424 </para></listitem>
226     </itemizedlist>
227    
228     </sect2>
229    
230     <sect2 id="preseed-seenflag">
231     <title>Using preseeding to change default values</title>
232     <para>
233    
234     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
236     <firstterm>seen</firstterm> flag must be reset to <quote>false</quote> after
237     setting the value for a template.
238    
239     </para>
240    
241     <informalexample><screen>
242     d-i foo/bar string value
243     d-i foo/bar seen false
244     </screen></informalexample>
245    
246     </sect2>
247 fjp 32276 </sect1>
248 fjp 32199
249 fjp 32276 <sect1 id="preseed-using">
250 fjp 32199 <title>Using preseeding</title>
251 fjp 32424 <para>
252 fjp 32199
253 fjp 36205 Of course you will first need to create a preconfiguration file and place it in
254     the location from where you want to use it. Creating the preconfiguration file
255     is covered later in this appendix. Putting it in the correct location is fairly
256 fjp 32424 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
258 fjp 36205 will have to remaster the ISO image. How to get the preconfiguration file
259     included in the initrd is outside the scope of this document; please consult
260     the developers documentation for &d-i;.
261 fjp 32424
262 fjp 32504 </para><para>
263    
264 fjp 36205 An example preconfiguration file that you can use as basis for your own
265     preconfiguration file is available from &urlset-example-preseed;. This file is
266     based on the configuration fragments included in this appendix.
267 fjp 32504
268 fjp 32424 </para>
269    
270 fjp 32276 <sect2 id="preseed-loading">
271 fjp 36205 <title>Loading the preconfiguration file</title>
272 fjp 32199 <para>
273    
274 fjp 32424 If you are using initrd preseeding, you only have to make sure a file named
275 fjp 32199 <filename>preseed.cfg</filename> is included in the root directory of the
276     initrd. The installer will automatically check if this file is present and
277     load it.
278    
279     </para><para>
280    
281 joeyh 35032 For the other preseeding methods you need to tell the installer what file
282     to use when you boot it. This is normally done by passing the kernel a boot
283     parameter, either manually at boot time or by editing the bootloader
284     configuration file (e.g. <filename>syslinux.cfg</filename>) and adding the
285     parameter to the end of the append line(s) for the kernel.
286 fjp 32199
287     </para><para>
288    
289 fjp 36205 If you do specify the preconfiguration file in the bootloader configuration,
290     you might change the configuration so you don't need to hit enter to boot the
291     installer. For syslinux this means setting the timeout to <literal>1</literal>
292     in <filename>syslinux.cfg</filename>.
293 fjp 32199
294     </para><para>
295    
296 fjp 36205 To make sure the installer gets the right preconfiguration file, you can
297     optionally specify a checksum for the file. Currently this needs to be a
298     md5sum, and if specified it must match the preconfiguration file or the
299     installer will refuse to use it.
300 fjp 32199
301     </para>
302    
303     <informalexample><screen>
304 fjp 32424 Boot parameters to specify:
305     - if you're netbooting:
306     preseed/url=http://host/path/to/preseed.cfg
307     preseed/url/checksum=5da499872becccfeda2c4872f9171c3d
308    
309     - if you're booting a remastered CD:
310     preseed/file=/cdrom/preseed.cfg
311     preseed/file/checksum=5da499872becccfeda2c4872f9171c3d
312    
313 fjp 36205 - if you're installing from USB media (put the preconfiguration file in the
314 fjp 32424 toplevel directory of the USB stick):
315     preseed/file=/hd-media/preseed.cfg
316     preseed/file/checksum=5da499872becccfeda2c4872f9171c3d
317 fjp 32199 </screen></informalexample>
318    
319     <para>
320    
321     While you're at it, you may want to add a boot parameter
322     <userinput>debconf/priority=critical</userinput>. This will avoid most
323     questions even if the preseeding below misses some.
324    
325     </para>
326 fjp 32276 </sect2>
327 joeyh 35032
328     <sect2 id="preseed-dhcp">
329 fjp 36205 <title>Using a DHCP server to specify preconfiguration files</title>
330 joeyh 35032 <para>
331 fjp 32199
332 fjp 36205 It's also possible to use DHCP to specify a preconfiguration file to download
333     from the network. DHCP allows specifying a filename. Normally this is a file
334     to netboot, but if it appears to be an URL then installation media that
335     support network preseeding will download the file from the URL and use it as a
336     preconfiguration file. Here is an example of how to set it up in the dhcpd.conf
337 joeyh 35032 for version 3 of the ISC DHCP server (the dhcp3-server Debian package).
338    
339     </para>
340    
341     <informalexample><screen>
342     if substring (option vendor-class-identifier, 0, 3) = "d-i" {
343 fjp 36204 filename "http://host/preseed.cfg";
344 joeyh 35032 }
345     </screen></informalexample>
346    
347     <para>
348 fjp 35033
349 joeyh 35032 Note that the above example limits this filename to DHCP clients that identify
350     themselves as "d-i", so it will not affect regular DHCP clients, but only
351     the installer. You can also put the text in a stanza for only one particular
352     host to avoid preseeding all installs on your network.
353    
354     </para><para>
355 fjp 35033
356 joeyh 35032 A good way to use the DHCP preseeding is to only preseed values specific to
357     your network, such as the Debian mirror to use. This way installs on your
358     network will automatically get a good mirror selected, but the rest of the
359     installation can be performed interactively. Using DHCP preseeding to fully
360     automate Debian installs should only be done with care.
361 fjp 35033
362 joeyh 35032 </para>
363 fjp 35051 </sect2>
364 joeyh 35032
365 fjp 32276 <sect2 id="preseed-bootparms">
366 fjp 32199 <title>Using boot parameters to supplement preseeding</title>
367     <para>
368    
369 fjp 32276 Some parts of the installation process cannot be automated using some forms
370 fjp 36205 of preseeding because the questions are asked before the preconfiguration
371     file is loaded. For example, if the preconfiguration file is downloaded over
372     the network, the network setup must be done first. One reason to use initrd
373     preseeding is that it allows preseeding of even these early steps of the
374     installation process.
375 fjp 32199
376     </para><para>
377    
378 fjp 36205 If a preconfiguration file cannot be used to preseed some steps, the install
379     can still be fully automated, since you can pass preseed values to the kernel
380 fjp 32199 on the command line. Just pass <userinput>path/to/var=value</userinput>
381     for any of the preseed variables listed in the examples.
382    
383     </para>
384     <note><para>
385    
386     The 2.4 kernel accepts a maximum of 8 command line options and
387     8 environment options (including any options added by default for the
388     installer). If these numbers are exceeded, 2.4 kernels will drop any
389 fjp 32424 excess options and 2.6 kernels will panic. For kernel 2.6.9 and later,
390 fjp 32199 you can use 32 command line options and 32 environment options.
391    
392     </para></note>
393 fjp 32276 <para>
394    
395     For most installations some of the default options in your bootloader
396 fjp 36204 configuration file, like <literal>vga=normal</literal>, may be safely
397     removed which may allow you to add more options for preseeding.
398 fjp 32276
399     </para>
400 fjp 32199 <note><para>
401    
402 fjp 32276 It may not always be possible to specify values with spaces for boot
403     parameters, even if you delimit them with quotes.
404 fjp 32199
405     </para></note>
406 fjp 32276 </sect2>
407     </sect1>
408 fjp 32199
409 fjp 36204 <sect1 id="preseed-creating">
410 fjp 36205 <title>Creating a preconfiguration file</title>
411 fjp 32424 <para>
412 fjp 32199
413 fjp 32424 The preconfiguration file is in the format used by the
414 fjp 36204 <command>debconf-set-selections</command> command. The general format of
415     a line in a preconfiguration file is:
416 fjp 32424
417 fjp 36204 <informalexample><screen>
418     &lt;owner&gt; &lt;template name&gt; &lt;template type&gt; &lt;value&gt;
419     </screen></informalexample>
420 fjp 32424
421 fjp 36204 </para><para>
422    
423     There are a few rules to keep in mind when writing a preconfiguration file.
424    
425 fjp 36267 </para>
426    
427 fjp 32199 <itemizedlist>
428 fjp 36267 <listitem><para>
429 fjp 36204 Put only a single space or tab between type and value: any additional
430     whitespace will be interpreted as belonging to the value.
431 fjp 36267 </para></listitem>
432     <listitem><para>
433 fjp 36204 A line can be split into multiple lines by appending a backslash
434 fjp 36214 (<quote><literal>\</literal></quote>) as the line continuation character.
435 fjp 36204 A good place to split a line is after the template name; a bad place is
436     between type and value.
437 fjp 36267 </para></listitem>
438     <listitem><para>
439 fjp 36204 Most templates need to be preseeded using the values valid in English and
440     not the translated values. However, there are some templates (for example
441     in <classname>partman</classname> where the translated values need to be
442     used.
443 fjp 36267 </para></listitem>
444     <listitem><para>
445 fjp 36204 Some templates take a code as value instead of the English text that is
446     shown during installation.
447 fjp 36267 </para></listitem>
448 fjp 32199 </itemizedlist>
449    
450 fjp 36267 <para>
451 fjp 36204
452     The easiest way to create a preconfiguration file is to use the example file
453     linked in <xref linkend="preseed-contents"/> as basis and work from there.
454    
455     </para><para>
456    
457     An alternative method is to do a manual installation and then, after
458     rebooting, use the <command>debconf-get-selections</command> from the
459     <classname>debconf-utils</classname> package to dump both the debconf
460     database and the installer's cdebconf database to a single file:
461    
462     <informalexample><screen>
463     $ debconf-get-selections --installer &gt; <replaceable>file</replaceable>
464     $ debconf-get-selections &gt;&gt; <replaceable>file</replaceable>
465     </screen></informalexample>
466    
467     </para><para>
468    
469     However, a file generated in this manner will have some items that should
470     not be preseeded, and the example file is a better starting place for most
471     users.
472    
473     </para>
474    
475     <note><para>
476    
477     This method relies on the fact that, at the end of the installation, the
478     installer's cdebconf database is saved to the installed system in
479     <filename>/var/log/installer/cdebconf</filename>. However, because the
480     database may contain sensitive information, by default the files are only
481     readable by root.
482    
483     </para><para>
484    
485     The directory <filename>/var/log/installer</filename> and all files in it
486     will be deleted from your system if you purge the package
487     <classname>installation-report</classname>.
488    
489     </para></note>
490    
491 fjp 32199 <para>
492    
493 fjp 36204 To check possible values for templates, you can use <command>nano</command>
494     to examine the files in <filename>/var/lib/cdebconf</filename> while an
495     installation is in progress. View <filename>templates.dat</filename> for
496     the raw templates and <filename>questions.dat</filename> for the current
497     values and for the values assigned to variables.
498    
499     </para><para>
500    
501 fjp 36205 To check if the format of your preconfiguration file is valid before performing
502     an install, you can use the command <command>debconf-set-selections -c
503 fjp 32276 <replaceable>preseed.cfg</replaceable></command>.
504    
505 fjp 32199 </para>
506 fjp 32276 </sect1>
507 fjp 32199
508 joeyh 33719 <sect1 id="preseed-contents">
509 fjp 36205 <title>Contents of the preconfiguration file</title>
510 fjp 32199 <para>
511    
512     The configuration fragments used in this appendix are also available as an
513 fjp 36205 example preconfiguration file from &urlset-example-preseed;.
514 fjp 32199
515     </para><para>
516    
517     Note that this example is based on an installation for the Intel x86
518     architecture. If you are installing a different architecture, some of the
519     examples (like keyboard selection and bootloader installation) may not be
520 fjp 36205 relevant and will need to be replaced by debconf settings appropriate for
521     your architecture.
522 fjp 32199
523     </para>
524    
525 fjp 32276 <sect2 id="preseed-l10n">
526 fjp 32199 <title>Localization</title>
527     <para>
528    
529     Setting localization values will only work if you are using initrd preseeding.
530 fjp 36205 With all other methods the preconfiguration file will only be loaded after
531     these questions have been asked.
532 fjp 32199
533     </para><para>
534    
535     The locale can be used to specify both language and country.
536     To specify the locale as a boot parameter, use
537     <userinput>debian-installer/locale=<replaceable>en_US</replaceable></userinput>.
538    
539 fjp 32424 <informalexample role="example"><screen>
540 fjp 32199 # Locale sets language and country.
541     d-i debian-installer/locale string en_US
542     </screen></informalexample>
543    
544     </para><para>
545    
546 fjp 32276 Keyboard configuration consists of selecting a keyboard architecture and a
547     keymap. In most cases the correct keyboard architecture is selected by
548 joeyh 32501 default, so there's normally no need to preseed it. The keymap must
549     be valid for the selected keyboard architecture.
550 fjp 32199
551 fjp 32424 <informalexample role="example"><screen>
552     # Keyboard selection.
553     #d-i console-tools/archs select at
554     d-i console-keymaps-at/keymap select us
555     # Example for a different keyboard architecture
556     #d-i console-keymaps-usb/keymap select mac-usb-us
557     </screen></informalexample>
558    
559 fjp 32276 </para><para>
560    
561 fjp 36205 To skip keyboard configuration, preseed
562 fjp 32276 <classname>console-tools/archs</classname> with
563     <userinput>skip-config</userinput>.
564     This will result in the kernel keymap remaining active.
565    
566     </para>
567    
568     <note><para>
569 fjp 32199
570 fjp 32276 The changes in the input layer for 2.6 kernels have made the keyboard
571     architecture virtually obsolete. For 2.6 kernels normally a <quote>PC</quote>
572     (<userinput>at</userinput>) keymap should be selected.
573    
574     </para></note>
575     </sect2>
576    
577     <sect2 id="preseed-network">
578 fjp 32199 <title>Network configuration</title>
579     <para>
580    
581     Of course, preseeding the network configuration won't work if you're
582 fjp 36205 loading your preconfiguration file from the network. But it's great when
583     you're booting from CD or USB stick. If you are loading preconfiguration
584     files from the network, you can pass network config parameters by using
585     kernel boot parameters.
586 fjp 32199
587 cjwatson 33890 </para><para>
588 fjp 32200
589 cjwatson 33890 If you need to pick a particular interface when netbooting before loading
590 fjp 36205 a preconfiguration file from the network, use a boot parameter such as
591 cjwatson 33890 <userinput>netcfg/choose_interface=<replaceable>eth1</replaceable></userinput>.
592    
593 cjwatson 33891 </para>
594    
595 fjp 32424 <informalexample role="example"><screen>
596 fjp 32199 # netcfg will choose an interface that has link if possible. This makes it
597     # skip displaying a list if there is more than one interface.
598     d-i netcfg/choose_interface select auto
599    
600 cjwatson 33890 # To pick a particular interface instead:
601     #d-i netcfg/choose_interface select eth1
602    
603 fjp 32199 # If you have a slow dhcp server and the installer times out waiting for
604     # it, this might be useful.
605     #d-i netcfg/dhcp_timeout string 60
606    
607 joeyh 34168 # If you prefer to configure the network manually, uncomment this line and
608     # the static network configuration below.
609 fjp 32199 #d-i netcfg/disable_dhcp boolean true
610 joeyh 34168
611 fjp 36205 # If you want the preconfiguration file to work on systems both with and
612     # without a dhcp server, uncomment these lines and the static network
613     # configuration below.
614 joeyh 34168 #d-i netcfg/dhcp_failed note
615     #d-i netcfg/dhcp_options select Configure network manually
616    
617     # Static network configuration.
618 fjp 32199 #d-i netcfg/get_nameservers string 192.168.1.1
619     #d-i netcfg/get_ipaddress string 192.168.1.42
620     #d-i netcfg/get_netmask string 255.255.255.0
621     #d-i netcfg/get_gateway string 192.168.1.1
622     #d-i netcfg/confirm_static boolean true
623    
624     # Any hostname and domain names assigned from dhcp take precedence over
625     # values set here. However, setting the values still prevents the questions
626     # from being shown, even if values come from dhcp.
627     d-i netcfg/get_hostname string unassigned-hostname
628     d-i netcfg/get_domain string unassigned-domain
629    
630     # Disable that annoying WEP key dialog.
631     d-i netcfg/wireless_wep string
632     # The wacky dhcp hostname that some ISPs use as a password of sorts.
633     #d-i netcfg/dhcp_hostname string radish
634     </screen></informalexample>
635    
636 fjp 32276 </sect2>
637 fjp 32199
638 fjp 32276 <sect2 id="preseed-mirror">
639 fjp 32199 <title>Mirror settings</title>
640     <para>
641    
642 cjwatson 33889 Depending on the installation method you use, a mirror may be used both to
643 fjp 32199 download additional components of the installer, the base system and to
644     set up the <filename>/etc/apt/sources.list</filename> for the installed
645     system.
646    
647     </para><para>
648    
649     The parameter <classname>mirror/suite</classname> determines the suite for
650     the installed system.
651    
652     </para><para>
653    
654     The parameter <classname>mirror/udeb/suite</classname> determines the suite
655     for additional components for the installer. It is only useful to set this
656     if components are actually downloaded over the network and should match the
657     suite that was used to build the initrd for the installation method used for
658     the installation.
659 fjp 36205 By default the value for <classname>mirror/udeb/suite</classname> is the
660     same as <classname>mirror/suite</classname>.
661 fjp 32199
662     </para>
663    
664 fjp 32424 <informalexample role="example"><screen>
665 fjp 32199 d-i mirror/country string enter information manually
666     d-i mirror/http/hostname string http.us.debian.org
667     d-i mirror/http/directory string /debian
668     d-i mirror/http/proxy string
669    
670     # Suite to install.
671     #d-i mirror/suite string testing
672     # Suite to use for loading installer components (optional).
673     #d-i mirror/udeb/suite string testing
674     </screen></informalexample>
675    
676 fjp 32276 </sect2>
677 fjp 32199
678 fjp 32276 <sect2 id="preseed-partman">
679 fjp 32199 <title>Partitioning</title>
680 fjp 32276 <para>
681 fjp 32199
682 fjp 32276 Using preseeding to partition the harddisk is very much limited to what is
683     supported by <classname>partman-auto</classname>. You can choose to either
684     partition existing free space on a disk or a whole disk. The layout of the
685     disk can be determined by using a predefined recipe, a custom recipe from
686 fjp 36205 a recipe file or a recipe included in the preconfiguration file. It is
687     currently not possible to partition multiple disks using preseeding nor to
688     set up RAID.
689 fjp 32276
690     </para>
691    
692     <warning><para>
693    
694     The identification of disks is dependent on the order in which their drivers
695     are loaded. If there are multiple disks in the system, make very sure the
696     correct one will be selected before using preseeding.
697    
698     </para></warning>
699    
700 fjp 32424 <informalexample role="example"><screen>
701 fjp 32199 # If the system has free space you can choose to only partition that space.
702 fjp 36205 # Note: this template must be preseeded with a localized (translated) value.
703 fjp 32199 #d-i partman-auto/init_automatically_partition \
704     # select Use the largest continuous free space
705    
706     # Alternatively, you can specify a disk to partition. The device name can
707     # be given in either devfs or traditional non-devfs format.
708     # For example, to use the first disk devfs knows of:
709     d-i partman-auto/disk string /dev/discs/disc0/disc
710    
711 fjp 35039 # You can choose from any of the predefined partitioning recipes.
712 fjp 36205 # Note: this template must be preseeded with a localized (translated) value.
713 fjp 32199 d-i partman-auto/choose_recipe \
714     select All files in one partition (recommended for new users)
715     #d-i partman-auto/choose_recipe \
716     # select Separate /home partition
717     #d-i partman-auto/choose_recipe \
718     # select Separate /home, /usr, /var, and /tmp partitions
719    
720     # Or provide a recipe of your own...
721     # The recipe format is documented in the file devel/partman-auto-recipe.txt.
722     # If you have a way to get a recipe file into the d-i environment, you can
723     # just point at it.
724     #d-i partman-auto/expert_recipe_file string /hd-media/recipe
725    
726 fjp 36205 # If not, you can put an entire recipe the preconfiguration file in one
727     # (logical) line. This example creates a small /boot partition, suitable
728     # swap, and uses the rest of the space for the root partition:
729 fjp 32199 #d-i partman-auto/expert_recipe string \
730     # boot-root :: \
731     # 40 50 100 ext3 \
732     # $primary{ } $bootable{ } \
733     # method{ format } format{ } \
734     # use_filesystem{ } filesystem{ ext3 } \
735     # mountpoint{ /boot } \
736     # . \
737     # 500 10000 1000000000 ext3 \
738     # method{ format } format{ } \
739     # use_filesystem{ } filesystem{ ext3 } \
740     # mountpoint{ / } \
741     # . \
742     # 64 512 300% linux-swap \
743     # method{ swap } format{ } \
744     # .
745    
746     # This makes partman automatically partition without confirmation.
747     d-i partman/confirm_write_new_label boolean true
748     d-i partman/choose_partition \
749     select Finish partitioning and write changes to disk
750     d-i partman/confirm boolean true
751     </screen></informalexample>
752    
753 fjp 32276 </sect2>
754 fjp 32199
755 fjp 32276 <sect2 id="preseed-time">
756 fjp 32199 <title>Clock and time zone setup</title>
757    
758 fjp 32424 <informalexample role="example"><screen>
759 fjp 32199 # Controls whether or not the hardware clock is set to UTC.
760     d-i clock-setup/utc boolean true
761    
762     # You may set this to any valid setting for $TZ; see the contents of
763     # /usr/share/zoneinfo/ for valid values.
764     d-i time/zone string US/Eastern
765     </screen></informalexample>
766    
767 fjp 32276 </sect2>
768 fjp 32199
769 fjp 32504 <sect2 id="preseed-apt">
770     <title>Apt setup</title>
771     <para>
772    
773     Setup of the <filename>/etc/apt/sources.list</filename> and basic configuration
774     options is fully automated based on your installation method and answers to
775 fjp 35924 earlier questions. You can optionally add other (local) repositories.
776 fjp 32504
777     </para>
778    
779     <informalexample role="example"><screen>
780     # You can choose to install non-free and contrib software.
781     #d-i apt-setup/non-free boolean true
782     #d-i apt-setup/contrib boolean true
783 joeyh 35836 # Uncomment this to avoid adding security sources, or
784     # add a hostname to use a different server than security.debian.org.
785 fjp 35924 #d-i apt-setup/security_host string
786    
787     # Additional repositories, local[0-9] available
788     #d-i apt-setup/local0/comment string local server
789     #d-i apt-setup/local0/repository string \
790     # deb http://local.server/debian stable main
791 fjp 35982 # URL to the public key of the local repository
792 fjp 35924 #d-i apt-setup/local0/key string http://local.server/key
793 fjp 32504 </screen></informalexample>
794    
795     </sect2>
796    
797 fjp 32424 <sect2 id="preseed-account">
798 fjp 32199 <title>Account setup</title>
799     <para>
800    
801     The password for the root account and name and password for a first regular
802     user's account can be preseeded. For the passwords you can use either clear
803     text values or MD5 <emphasis>hashes</emphasis>.
804    
805     </para>
806     <warning><para>
807    
808     Be aware that preseeding passwords is not completely secure as everyone
809 fjp 36205 with access to the preconfiguration file will have the knowledge of these
810     passwords. Using MD5 hashes is considered slightly better in terms of
811     security but it might also give a false sense of security as access to a
812     MD5 hash allows for brute force attacks.
813 fjp 32199
814     </para></warning>
815    
816 fjp 32424 <informalexample role="example"><screen>
817 joeyh 36167 # Skip creation of a root account (normal user account will be able to
818     # use sudo).
819     #d-i passwd/root-login boolean false
820     # Alternatively, to skip creation of a normal user account.
821     #d-i passwd/make-user boolean false
822    
823 fjp 32199 # Root password, either in clear text
824 fjp 33865 #d-i passwd/root-password password r00tme
825     #d-i passwd/root-password-again password r00tme
826 fjp 32199 # or encrypted using an MD5 hash.
827 fjp 33865 #d-i passwd/root-password-crypted password [MD5 hash]
828 fjp 32199
829 joeyh 36167 # To create a normal user account.
830 fjp 33865 #d-i passwd/user-fullname string Debian User
831     #d-i passwd/username string debian
832 fjp 32199 # Normal user's password, either in clear text
833 fjp 33865 #d-i passwd/user-password password insecure
834     #d-i passwd/user-password-again password insecure
835 fjp 32199 # or encrypted using an MD5 hash.
836 fjp 33865 #d-i passwd/user-password-crypted password [MD5 hash]
837 fjp 32199 </screen></informalexample>
838    
839     <para>
840    
841     The <classname>passwd/root-password-crypted</classname> and
842 fjp 36205 <classname>passwd/user-password-crypted</classname> variables can also
843     be preseeded with <quote>!</quote> as their value. In that case, the
844     corresponding account is disabled. This may be convenient for the root
845     account, provided of course that an alternative method is setup to allow
846     administrative activities or root login (for instance by using SSH key
847     authentication or <command>sudo</command>).
848 fjp 32199
849 fjp 32504 </para><para>
850    
851     An MD5 hash for a password can be generated using the following command.
852    
853     <informalexample><screen>
854     $ echo "r00tme" | mkpasswd -s -H MD5
855     </screen></informalexample>
856    
857 fjp 32199 </para>
858 fjp 32276 </sect2>
859 fjp 32199
860 fjp 33825 <sect2 id="preseed-base-installer">
861     <title>Base system installation</title>
862     <para>
863    
864     There is actually not very much that can be preseeded for this stage of the
865     installation. The only questions asked concern the installation of the kernel.
866    
867     </para>
868    
869     <informalexample role="example"><screen>
870     # Select the initramfs generator used to generate the initrd for 2.6 kernels.
871     #d-i base-installer/kernel/linux/initramfs-generators string yaird
872     </screen></informalexample>
873    
874     </sect2>
875    
876 fjp 32276 <sect2 id="preseed-bootloader">
877 fjp 32199 <title>Boot loader installation</title>
878    
879 fjp 32424 <informalexample role="example"><screen>
880 fjp 32199 # Grub is the default boot loader (for x86). If you want lilo installed
881     # instead, uncomment this:
882     #d-i grub-installer/skip boolean true
883    
884     # This is fairly safe to set, it makes grub install automatically to the MBR
885     # if no other operating system is detected on the machine.
886     d-i grub-installer/only_debian boolean true
887    
888     # This one makes grub-installer install to the MBR if if finds some other OS
889     # too, which is less safe as it might not be able to boot that other OS.
890     d-i grub-installer/with_other_os boolean true
891    
892     # Alternatively, if you want to install to a location other than the mbr,
893     # uncomment and edit these lines:
894     #d-i grub-installer/bootdev string (hd0,0)
895     #d-i grub-installer/only_debian boolean false
896     #d-i grub-installer/with_other_os boolean false
897     </screen></informalexample>
898    
899 fjp 32276 </sect2>
900 fjp 32199
901 joeyh 33719 <sect2 id="preseed-pkgsel">
902 fjp 32199 <title>Package selection</title>
903 fjp 32276 <para>
904 fjp 32199
905 fjp 32276 You can choose to install any combination of tasks that are available.
906     Available tasks as of this writing include:
907    
908 fjp 32424 </para>
909    
910 fjp 32276 <itemizedlist>
911     <listitem><para>
912 joeyh 36744 <userinput>standard</userinput>
913 fjp 32276 </para></listitem>
914     <listitem><para>
915 joeyh 36744 <userinput>desktop</userinput>
916 fjp 32276 </para></listitem>
917     <listitem><para>
918 joeyh 36744 <userinput>gnome-desktop</userinput>
919 fjp 32276 </para></listitem>
920     <listitem><para>
921 joeyh 36744 <userinput>kde-desktop</userinput>
922 fjp 32276 </para></listitem>
923     <listitem><para>
924 joeyh 36744 <userinput>web-server</userinput>
925 fjp 32276 </para></listitem>
926     <listitem><para>
927 joeyh 36744 <userinput>print-server</userinput>
928 fjp 32276 </para></listitem>
929     <listitem><para>
930 joeyh 36744 <userinput>dns-server</userinput>
931 fjp 32276 </para></listitem>
932     <listitem><para>
933 joeyh 36744 <userinput>file-server</userinput>
934 fjp 32276 </para></listitem>
935     <listitem><para>
936 joeyh 36744 <userinput>mail-server</userinput>
937 fjp 32276 </para></listitem>
938 joeyh 36744 <listitem><para>
939     <userinput>sql-database</userinput>
940     </para></listitem>
941     <listitem><para>
942     <userinput>laptop</userinput>
943     </para></listitem>
944 fjp 32276 </itemizedlist>
945    
946 fjp 32424 <para>
947    
948 joeyh 33719 You can also choose to install no tasks, and force the installation of a
949     set of packages in some other way. We recommend always including the
950 joeyh 36744 <userinput>standard</userinput> task.
951 fjp 32276
952     </para>
953    
954 fjp 32424 <informalexample role="example"><screen>
955 joeyh 36744 tasksel tasksel/first multiselect standard, desktop
956     #tasksel tasksel/first multiselect standard, web-server
957     #tasksel tasksel/first multiselect standard, kde-desktop
958 joeyh 33719
959     # Some versions of the installer can report back on what software you have
960 fjp 33796 # installed, and what software you use. The default is not to report back,
961 joeyh 33719 # but sending reports helps the project determine what software is most
962     # popular and include it on CDs.
963     #popularity-contest popularity-contest/participate boolean false
964 fjp 32199 </screen></informalexample>
965    
966 fjp 32276 </sect2>
967 fjp 32199
968 joeyh 33719 <sect2 id="preseed-finish">
969     <title>Finishing up the first stage install</title>
970    
971     <informalexample role="example"><screen>
972     # Avoid that last message about the install being complete.
973     d-i prebaseconfig/reboot_in_progress note
974    
975     # This will prevent the installer from ejecting the CD during the reboot,
976     # which is useful in some situations.
977     #d-i cdrom-detect/eject boolean false
978     </screen></informalexample>
979    
980     </sect2>
981    
982 fjp 32276 <sect2 id="preseed-mailer">
983 fjp 32199 <title>Mailer configuration</title>
984 fjp 32276 <para>
985 fjp 32199
986 fjp 32276 During a normal install, exim asks only a few questions. Here's how to
987     avoid even those. More complicated preseeding is possible.
988    
989     </para>
990    
991 fjp 32424 <informalexample role="example"><screen>
992 fjp 32199 exim4-config exim4/dc_eximconfig_configtype \
993     select no configuration at this time
994     exim4-config exim4/no_config boolean true
995     exim4-config exim4/no_config boolean true
996     exim4-config exim4/dc_postmaster string
997     </screen></informalexample>
998    
999 fjp 32276 </sect2>
1000 fjp 32199
1001 fjp 32276 <sect2 id="preseed-X">
1002 fjp 32199 <title>X configuration</title>
1003 fjp 32276 <para>
1004 fjp 32199
1005 fjp 32276 Preseeding Debian's X config is possible, but you probably need to know
1006     some details about the video hardware of the machine, since Debian's X
1007     configurator does not do fully automatic configuration of everything.
1008    
1009     </para>
1010    
1011 fjp 32424 <informalexample role="example"><screen>
1012 fjp 32199 # X can detect the right driver for some cards, but if you're preseeding,
1013     # you override whatever it chooses. Still, vesa will work most places.
1014 cjwatson 33887 #xserver-xorg xserver-xorg/config/device/driver select vesa
1015 fjp 32199
1016     # A caveat with mouse autodetection is that if it fails, X will retry it
1017     # over and over. So if it's preseeded to be done, there is a possibility of
1018     # an infinite loop if the mouse is not autodetected.
1019 cjwatson 33887 #xserver-xorg xserver-xorg/autodetect_mouse boolean true
1020 fjp 32199
1021     # Monitor autodetection is recommended.
1022 cjwatson 33887 xserver-xorg xserver-xorg/autodetect_monitor boolean true
1023 fjp 32199 # Uncomment if you have an LCD display.
1024 cjwatson 33887 #xserver-xorg xserver-xorg/config/monitor/lcd boolean true
1025 fjp 32199 # X has three configuration paths for the monitor. Here's how to preseed
1026     # the "medium" path, which is always available. The "simple" path may not
1027     # be available, and the "advanced" path asks too many questions.
1028 cjwatson 33887 xserver-xorg xserver-xorg/config/monitor/selection-method \
1029 fjp 32199 select medium
1030 cjwatson 33887 xserver-xorg xserver-xorg/config/monitor/mode-list \
1031 fjp 32199 select 1024x768 @ 60 Hz
1032     </screen></informalexample>
1033    
1034 fjp 32276 </sect2>
1035 fjp 32199
1036 fjp 32276 <sect2 id="preseed-other">
1037 fjp 32199 <title>Preseeding other packages</title>
1038    
1039 fjp 32424 <informalexample role="example"><screen>
1040 fjp 32199 # Depending on what software you choose to install, or if things go wrong
1041     # during the installation process, it's possible that other questions may
1042     # be asked. You can preseed those too, of course. To get a list of every
1043     # possible question that could be asked during an install, do an
1044     # installation, and then run these commands:
1045     # debconf-get-selections --installer > file
1046     # debconf-get-selections >> file
1047     </screen></informalexample>
1048    
1049 fjp 32276 </sect2>
1050     </sect1>
1051 fjp 32199
1052 fjp 32276 <sect1 id="preseed-advanced">
1053 fjp 32199 <title>Advanced options</title>
1054 fjp 32424
1055     <sect2 id="preseed-shell">
1056     <title>Shell commands</title>
1057    
1058     <informalexample role="example"><screen>
1059     # d-i preseeding is inherently not secure. Nothing in the installer checks
1060     # for attempts at buffer overflows or other exploits of the values of a
1061 fjp 36205 # preconfiguration file like this one. Only use preconfiguration files from
1062     # trusted locations! To drive that home, and because it's generally useful,
1063     # here's a way to run any shell command you'd like inside the installer,
1064 fjp 32424 # automatically.
1065    
1066     # This first command is run as early as possible, just after
1067     # preseeding is read.
1068     #d-i preseed/early_command string anna-install some-udeb
1069    
1070     # This command is run just before the install finishes, but when there is
1071 joeyh 33719 # still a usable /target directory. You can chroot to /target and use it
1072     # directly, or use the apt-install and in-target commands to easily install
1073     # packages and run commands in the target system.
1074     #d-i preseed/late_command string apt-install zsh; in-target chsh -s /bin/zsh
1075 fjp 32424 </screen></informalexample>
1076    
1077     </sect2>
1078    
1079     <sect2 id="preseed-chainload">
1080 fjp 36205 <title>Chainloading preconfiguration files</title>
1081 fjp 32276 <para>
1082 fjp 32199
1083 fjp 36205 It is possible to include other preconfiguration files from a preconfiguration
1084     file. Any settings in those files will override pre-existing settings from
1085     files loaded earlier. This makes it possible to put, for example, general
1086 fjp 32276 networking settings for your location in one file and more specific
1087     settings for certain configurations in other files.
1088    
1089     </para>
1090    
1091 fjp 32199 <informalexample><screen>
1092 fjp 32276 # More that one file can be listed, separated by spaces; all will be
1093 fjp 32199 # loaded. The included files can have preseed/include directives of their
1094     # own as well. Note that if the filenames are relative, they are taken from
1095 fjp 36205 # the same directory as the preconfiguration file that includes them.
1096 fjp 32199 #d-i preseed/include string x.cfg
1097    
1098 fjp 36205 # The installer can optionally verify checksums of preconfiguration files
1099     # before using them. Currently only md5sums are supported, list the md5sums
1100 fjp 32199 # in the same order as the list of files to include.
1101     #d-i preseed/include/checksum string 5da499872becccfeda2c4872f9171c3d
1102    
1103     # More flexibly, this runs a shell command and if it outputs the names of
1104 fjp 36205 # preconfiguration files, includes those files.
1105 fjp 32199 #d-i preseed/include_command \
1106     # string echo if [ "`hostname`" = bob ]; then echo bob.cfg; fi
1107     </screen></informalexample>
1108    
1109 fjp 32424 </sect2>
1110 fjp 32276 </sect1>
1111 fjp 32199 </appendix>

Properties

Name Value
svn:keywords Id

  ViewVC Help
Powered by ViewVC 1.1.5