/[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 33889 - (show annotations) (download) (as text)
Mon Jan 9 10:28:27 2006 UTC (7 years, 4 months ago) by cjwatson
File MIME type: text/xml
File size: 32723 byte(s)
a few typo fixes
1 <!-- retain these comments for translator revision tracking -->
2 <!-- $Id$ -->
3
4 <!--
5 Be carefull with the format of this file as it is parsed to generate
6 the example preseed file.
7 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 <appendix id="appendix-preseed">
16 <title>Automating the installation using preseeding</title>
17
18 <para>
19
20 This appendix explains the intricacies of preseeding answers to questions in
21 &d-i; to automate your installation.
22
23 </para><para>
24
25 The configuration fragments used in this appendix are also available as an
26 example preseed file from &urlset-example-preseed;.
27
28 </para>
29
30 <sect1 id="preseed-intro">
31 <title>Introduction</title>
32 <para>
33
34 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
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 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 few installer questions cannot be preseeded because the preseed configuration
53 file is only loaded after they have been asked.
54
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 <entry>CD/DVD</entry>
72 <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 the preseed configuration file is loaded and processed. For initrd preseeding
109 this is right at the start of the installation, before the first question is
110 even asked. For file preseeding this is after the CD or CD image has been
111 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 also already have been processed.
122
123 </para><para>
124
125 Obviously, any questions that have been processed before the
126 preseeding configuration file is loaded cannot be preseeded.
127 <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 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 or use available free space on a disk; it is not possible to use existing
140 partitions. You currently cannot use preseeding to set up RAID and LVM.
141
142 </para>
143 </sect2>
144
145 <!-- Joeyh feels this is too technical, so leave it out for now
146 <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 </para>
164
165 <itemizedlist>
166 <listitem><para>
167 string: allows the user to type any value
168 </para></listitem>
169 <listitem><para>
170 password: similar to string but the value typed is not displayed
171 </para></listitem>
172 <listitem><para>
173 boolean: for yes/no or true/false type of questions
174 </para></listitem>
175 <listitem><para>
176 select: allows the user to select one option from a list
177 </para></listitem>
178 <listitem><para>
179 multiselect: allows the user to select zero, one or more options from a list
180 </para></listitem>
181 <listitem><para>
182 note: used to display a message
183 </para></listitem>
184 </itemizedlist>
185
186 <para>
187
188 In &d-i; templates are stored in a readable file
189 <filename>/var/cache/debconf/templates.dat</filename>. This file contains all fixed
190 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 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 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 -->
205
206 <sect2 id="preseed-hooks">
207 <title>Running custom commands during the installation</title>
208 <para>
209
210 A very powerful and flexible option offered by the preseeding tools is the
211 ability to run commands or scripts at certain points in the installation.
212 See <xref linkend="preseed-shell"/> for details.
213
214 </para>
215
216 <itemizedlist>
217 <listitem><para>
218 <userinput>preseed/early_command</userinput>: is run as soon as the the
219 preseeding configuration file has been loaded
220 </para></listitem>
221 <listitem><para>
222 <userinput>preseed/late_command</userinput>: is run just before the reboot
223 at the end of the install, but before the <filename>/target</filename>
224 filesystem has been unmounted
225 </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 </sect1>
248
249 <sect1 id="preseed-using">
250 <title>Using preseeding</title>
251 <para>
252
253 Of course you will first need to create a preseed file and place it in the
254 location from where you want to use it. Creating the preseed file is covered
255 later in this appendix. Putting it in the correct location is fairly
256 straightforward for network preseeding or if you want to read the file off
257 a floppy or usb-stick. If you want to include the file on a CD or DVD, you
258 will have to remaster the ISO image. How to get the preseed file included
259 in the initrd is outside the scope of this document; please consult the
260 developers documentation for &d-i;.
261
262 </para><para>
263
264 An example preseed file that you can use as basis for your preseed file is
265 available from &urlset-example-preseed;. This file is based on the
266 configuration fragments included in this appendix.
267
268 </para>
269
270 <sect2 id="preseed-loading">
271 <title>Loading the preseed file</title>
272 <para>
273
274 If you are using initrd preseeding, you only have to make sure a file named
275 <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 For the other preseeding methods you need to tell the installer what file to
282 use when you boot it. This is done by passing the kernel a boot parameter,
283 either manually at boot time or by editing the bootloader configuration file
284 (e.g. <filename>syslinux.cfg</filename>) and adding the parameter to the end
285 of the append line(s) for the kernel.
286
287 </para><para>
288
289 If you do specify the preseed file in the bootloader configuration, you might
290 change the configuration so you don't need to hit enter to boot the installer.
291 For syslinux this means setting the timeout to 1 in
292 <filename>syslinux.cfg</filename>.
293
294 </para><para>
295
296 To make sure the installer gets the right preseed file, you can optionally
297 specify a checksum for the file. Currently this needs to be a md5sum, and if
298 specified it must match the preseed file or the installer will refuse to use it.
299
300 </para>
301
302 <informalexample><screen>
303 Boot parameters to specify:
304 - if you're netbooting:
305 preseed/url=http://host/path/to/preseed.cfg
306 preseed/url/checksum=5da499872becccfeda2c4872f9171c3d
307
308 - if you're booting a remastered CD:
309 preseed/file=/cdrom/preseed.cfg
310 preseed/file/checksum=5da499872becccfeda2c4872f9171c3d
311
312 - if you're installing from USB media (put the preseed file in the
313 toplevel directory of the USB stick):
314 preseed/file=/hd-media/preseed.cfg
315 preseed/file/checksum=5da499872becccfeda2c4872f9171c3d
316 </screen></informalexample>
317
318 <para>
319
320 While you're at it, you may want to add a boot parameter
321 <userinput>debconf/priority=critical</userinput>. This will avoid most
322 questions even if the preseeding below misses some.
323
324 </para>
325 </sect2>
326
327 <sect2 id="preseed-bootparms">
328 <title>Using boot parameters to supplement preseeding</title>
329 <para>
330
331 Some parts of the installation process cannot be automated using some forms
332 of preseeding because the questions are asked before the preseed file is
333 loaded. For example, if the preseed file is downloaded over the network,
334 the network setup must be done first. One reason to use initrd preseeding
335 is that it allows preseeding of even these early steps of the installation
336 process.
337
338 </para><para>
339
340 If a preseed file cannot be used to preseed some steps, the install can
341 still be fully automated, since you can pass preseed values to the kernel
342 on the command line. Just pass <userinput>path/to/var=value</userinput>
343 for any of the preseed variables listed in the examples.
344
345 </para>
346 <note><para>
347
348 The 2.4 kernel accepts a maximum of 8 command line options and
349 8 environment options (including any options added by default for the
350 installer). If these numbers are exceeded, 2.4 kernels will drop any
351 excess options and 2.6 kernels will panic. For kernel 2.6.9 and later,
352 you can use 32 command line options and 32 environment options.
353
354 </para></note>
355 <para>
356
357 For most installations some of the default options in your bootloader
358 configuration file, like 'vga=normal', may be safely removed which may
359 allow you to add more options for preseeding.
360
361 </para>
362 <note><para>
363
364 It may not always be possible to specify values with spaces for boot
365 parameters, even if you delimit them with quotes.
366
367 </para></note>
368 </sect2>
369 </sect1>
370
371 <sect1 condition="FIXME" id="preseed-creating">
372 <title>Creating a preseed file</title>
373 <para>
374
375 The preconfiguration file is in the format used by the
376 <command>debconf-set-selections</command> command.
377
378 </para>
379
380 <itemizedlist>
381 <listitem><para>
382 File format
383 </para></listitem>
384 <listitem><para>
385 Only single space allowed between template type and value
386 </para></listitem>
387 <listitem><para>
388 Relation with /var/lib/(c)debconf/templates
389 </para></listitem>
390 <listitem><para>
391 Types of templates and how to provide values for them
392 </para></listitem>
393 <listitem><para>
394 Most values need to be in English or codes
395 </para></listitem>
396 <listitem><para>
397 Using a manual installation as base
398 </para></listitem>
399 <listitem><para>
400 Finding other possible values
401 </para></listitem>
402 </itemizedlist>
403
404 <para>
405
406 To check if the format of your preseed file is valid before performing an
407 install, you can use the command <command>debconf-set-selections -c
408 <replaceable>preseed.cfg</replaceable></command>.
409
410 </para>
411 </sect1>
412
413 <sect1 id="preseed-contents">
414 <title>Contents of the preseed file</title>
415 <para>
416
417 The configuration fragments used in this appendix are also available as an
418 example preseed file from &urlset-example-preseed;.
419
420 </para><para>
421
422 Note that this example is based on an installation for the Intel x86
423 architecture. If you are installing a different architecture, some of the
424 examples (like keyboard selection and bootloader installation) may not be
425 relevant and will need to be replaced by debconf settings appropriate for your
426 architecture.
427
428 </para>
429
430 <sect2 id="preseed-l10n">
431 <title>Localization</title>
432 <para>
433
434 Setting localization values will only work if you are using initrd preseeding.
435 With all other methods the preseed file will only be loaded after these
436 questions have been asked.
437
438 </para><para>
439
440 The locale can be used to specify both language and country.
441 To specify the locale as a boot parameter, use
442 <userinput>debian-installer/locale=<replaceable>en_US</replaceable></userinput>.
443
444 <informalexample role="example"><screen>
445 # Locale sets language and country.
446 d-i debian-installer/locale string en_US
447 </screen></informalexample>
448
449 </para><para>
450
451 Keyboard configuration consists of selecting a keyboard architecture and a
452 keymap. In most cases the correct keyboard architecture is selected by
453 default, so there's normally no need to preseed it. The keymap must
454 be valid for the selected keyboard architecture.
455
456 <informalexample role="example"><screen>
457 # Keyboard selection.
458 #d-i console-tools/archs select at
459 d-i console-keymaps-at/keymap select us
460 # Example for a different keyboard architecture
461 #d-i console-keymaps-usb/keymap select mac-usb-us
462 </screen></informalexample>
463
464 </para><para>
465
466 To skip keyboard configuration preseed
467 <classname>console-tools/archs</classname> with
468 <userinput>skip-config</userinput>.
469 This will result in the kernel keymap remaining active.
470
471 </para>
472
473 <note><para>
474
475 The changes in the input layer for 2.6 kernels have made the keyboard
476 architecture virtually obsolete. For 2.6 kernels normally a <quote>PC</quote>
477 (<userinput>at</userinput>) keymap should be selected.
478
479 </para></note>
480 </sect2>
481
482 <sect2 id="preseed-network">
483 <title>Network configuration</title>
484 <para>
485
486 Of course, preseeding the network configuration won't work if you're
487 loading your preseed file from the network. But it's great when you're
488 booting from CD or USB stick. If you are loading preseed files from
489 the network, you can pass network config parameters in using kernel
490 boot parameters.
491
492 </para>
493
494 <informalexample role="example"><screen>
495 # netcfg will choose an interface that has link if possible. This makes it
496 # skip displaying a list if there is more than one interface.
497 d-i netcfg/choose_interface select auto
498
499 # If you have a slow dhcp server and the installer times out waiting for
500 # it, this might be useful.
501 #d-i netcfg/dhcp_timeout string 60
502
503 # If you prefer to configure the network manually, here's how:
504 #d-i netcfg/disable_dhcp boolean true
505 #d-i netcfg/get_nameservers string 192.168.1.1
506 #d-i netcfg/get_ipaddress string 192.168.1.42
507 #d-i netcfg/get_netmask string 255.255.255.0
508 #d-i netcfg/get_gateway string 192.168.1.1
509 #d-i netcfg/confirm_static boolean true
510
511 # Any hostname and domain names assigned from dhcp take precedence over
512 # values set here. However, setting the values still prevents the questions
513 # from being shown, even if values come from dhcp.
514 d-i netcfg/get_hostname string unassigned-hostname
515 d-i netcfg/get_domain string unassigned-domain
516
517 # Disable that annoying WEP key dialog.
518 d-i netcfg/wireless_wep string
519 # The wacky dhcp hostname that some ISPs use as a password of sorts.
520 #d-i netcfg/dhcp_hostname string radish
521 </screen></informalexample>
522
523 </sect2>
524
525 <sect2 id="preseed-mirror">
526 <title>Mirror settings</title>
527 <para>
528
529 Depending on the installation method you use, a mirror may be used both to
530 download additional components of the installer, the base system and to
531 set up the <filename>/etc/apt/sources.list</filename> for the installed
532 system.
533
534 </para><para>
535
536 The parameter <classname>mirror/suite</classname> determines the suite for
537 the installed system.
538
539 </para><para>
540
541 The parameter <classname>mirror/udeb/suite</classname> determines the suite
542 for additional components for the installer. It is only useful to set this
543 if components are actually downloaded over the network and should match the
544 suite that was used to build the initrd for the installation method used for
545 the installation.
546 By default the value for <classname>mirror/udeb/suite</classname> is the same
547 as <classname>mirror/suite</classname>.
548
549 </para>
550
551 <informalexample role="example"><screen>
552 d-i mirror/country string enter information manually
553 d-i mirror/http/hostname string http.us.debian.org
554 d-i mirror/http/directory string /debian
555 d-i mirror/http/proxy string
556
557 # Suite to install.
558 #d-i mirror/suite string testing
559 # Suite to use for loading installer components (optional).
560 #d-i mirror/udeb/suite string testing
561 </screen></informalexample>
562
563 </sect2>
564
565 <sect2 id="preseed-partman">
566 <title>Partitioning</title>
567 <para>
568
569 Using preseeding to partition the harddisk is very much limited to what is
570 supported by <classname>partman-auto</classname>. You can choose to either
571 partition existing free space on a disk or a whole disk. The layout of the
572 disk can be determined by using a predefined recipe, a custom recipe from
573 a recipe file or a recipe included in the preseed file. It is currently not
574 possible to partition multiple disks using preseeding nor to set up RAID or
575 LVM.
576
577 </para>
578
579 <warning><para>
580
581 The identification of disks is dependent on the order in which their drivers
582 are loaded. If there are multiple disks in the system, make very sure the
583 correct one will be selected before using preseeding.
584
585 </para></warning>
586
587 <informalexample role="example"><screen>
588 # If the system has free space you can choose to only partition that space.
589 #d-i partman-auto/init_automatically_partition \
590 # select Use the largest continuous free space
591
592 # Alternatively, you can specify a disk to partition. The device name can
593 # be given in either devfs or traditional non-devfs format.
594 # For example, to use the first disk devfs knows of:
595 d-i partman-auto/disk string /dev/discs/disc0/disc
596
597 # You can choose from any of the predefined partitioning recipes:
598 d-i partman-auto/choose_recipe \
599 select All files in one partition (recommended for new users)
600 #d-i partman-auto/choose_recipe \
601 # select Separate /home partition
602 #d-i partman-auto/choose_recipe \
603 # select Separate /home, /usr, /var, and /tmp partitions
604
605 # Or provide a recipe of your own...
606 # The recipe format is documented in the file devel/partman-auto-recipe.txt.
607 # If you have a way to get a recipe file into the d-i environment, you can
608 # just point at it.
609 #d-i partman-auto/expert_recipe_file string /hd-media/recipe
610
611 # If not, you can put an entire recipe the preseed file in one (logical)
612 # line. This example creates a small /boot partition, suitable swap, and
613 # uses the rest of the space for the root partition:
614 #d-i partman-auto/expert_recipe string \
615 # boot-root :: \
616 # 40 50 100 ext3 \
617 # $primary{ } $bootable{ } \
618 # method{ format } format{ } \
619 # use_filesystem{ } filesystem{ ext3 } \
620 # mountpoint{ /boot } \
621 # . \
622 # 500 10000 1000000000 ext3 \
623 # method{ format } format{ } \
624 # use_filesystem{ } filesystem{ ext3 } \
625 # mountpoint{ / } \
626 # . \
627 # 64 512 300% linux-swap \
628 # method{ swap } format{ } \
629 # .
630
631 # This makes partman automatically partition without confirmation.
632 d-i partman/confirm_write_new_label boolean true
633 d-i partman/choose_partition \
634 select Finish partitioning and write changes to disk
635 d-i partman/confirm boolean true
636 </screen></informalexample>
637
638 </sect2>
639
640 <sect2 id="preseed-time">
641 <title>Clock and time zone setup</title>
642
643 <informalexample role="example"><screen>
644 # Controls whether or not the hardware clock is set to UTC.
645 d-i clock-setup/utc boolean true
646
647 # You may set this to any valid setting for $TZ; see the contents of
648 # /usr/share/zoneinfo/ for valid values.
649 d-i time/zone string US/Eastern
650 </screen></informalexample>
651
652 </sect2>
653
654 <sect2 id="preseed-apt">
655 <title>Apt setup</title>
656 <para>
657
658 Setup of the <filename>/etc/apt/sources.list</filename> and basic configuration
659 options is fully automated based on your installation method and answers to
660 earlier questions. Only the three variables below are relevant for preseeding.
661
662 </para>
663
664 <informalexample role="example"><screen>
665 # You can choose to install non-free and contrib software.
666 #d-i apt-setup/non-free boolean true
667 #d-i apt-setup/contrib boolean true
668 # To avoid adding security sources, or to use a different server
669 # than security.debian.org.
670 #d-i apt-setup/security_host string
671 </screen></informalexample>
672
673 </sect2>
674
675 <sect2 id="preseed-account">
676 <title>Account setup</title>
677 <para>
678
679 The password for the root account and name and password for a first regular
680 user's account can be preseeded. For the passwords you can use either clear
681 text values or MD5 <emphasis>hashes</emphasis>.
682
683 </para>
684 <warning><para>
685
686 Be aware that preseeding passwords is not completely secure as everyone
687 with access to the preseed file will have the knowledge of these passwords.
688 Using MD5 hashes is considered slightly better in terms of security but it
689 might also give a false sense of security as access to a MD5 hash allows
690 for brute force attacks.
691
692 </para></warning>
693
694 <informalexample role="example"><screen>
695 # Root password, either in clear text
696 #d-i passwd/root-password password r00tme
697 #d-i passwd/root-password-again password r00tme
698 # or encrypted using an MD5 hash.
699 #d-i passwd/root-password-crypted password [MD5 hash]
700
701 # Skip creation of a normal user account.
702 #d-i passwd/make-user boolean false
703
704 # Alternatively, create a normal user account.
705 #d-i passwd/user-fullname string Debian User
706 #d-i passwd/username string debian
707 # Normal user's password, either in clear text
708 #d-i passwd/user-password password insecure
709 #d-i passwd/user-password-again password insecure
710 # or encrypted using an MD5 hash.
711 #d-i passwd/user-password-crypted password [MD5 hash]
712 </screen></informalexample>
713
714 <para>
715
716 The <classname>passwd/root-password-crypted</classname> and
717 <classname>passwd/user-password-crypted</classname> variables can also be
718 preseeded with <quote>!</quote> as their value. In that case, the corresponding
719 account is disabled. This may be convenient for the root account, provided
720 of course that an alternate method is setup to allow administrative
721 activities or root login (for instance by using SSH key authentication or
722 sudo).
723
724 </para><para>
725
726 An MD5 hash for a password can be generated using the following command.
727
728 <informalexample><screen>
729 $ echo "r00tme" | mkpasswd -s -H MD5
730 </screen></informalexample>
731
732 </para>
733 </sect2>
734
735 <sect2 id="preseed-base-installer">
736 <title>Base system installation</title>
737 <para>
738
739 There is actually not very much that can be preseeded for this stage of the
740 installation. The only questions asked concern the installation of the kernel.
741
742 </para>
743
744 <informalexample role="example"><screen>
745 # Select the initramfs generator used to generate the initrd for 2.6 kernels.
746 #d-i base-installer/kernel/linux/initramfs-generators string yaird
747 </screen></informalexample>
748
749 </sect2>
750
751 <sect2 id="preseed-bootloader">
752 <title>Boot loader installation</title>
753
754 <informalexample role="example"><screen>
755 # Grub is the default boot loader (for x86). If you want lilo installed
756 # instead, uncomment this:
757 #d-i grub-installer/skip boolean true
758
759 # This is fairly safe to set, it makes grub install automatically to the MBR
760 # if no other operating system is detected on the machine.
761 d-i grub-installer/only_debian boolean true
762
763 # This one makes grub-installer install to the MBR if if finds some other OS
764 # too, which is less safe as it might not be able to boot that other OS.
765 d-i grub-installer/with_other_os boolean true
766
767 # Alternatively, if you want to install to a location other than the mbr,
768 # uncomment and edit these lines:
769 #d-i grub-installer/bootdev string (hd0,0)
770 #d-i grub-installer/only_debian boolean false
771 #d-i grub-installer/with_other_os boolean false
772 </screen></informalexample>
773
774 </sect2>
775
776 <sect2 id="preseed-pkgsel">
777 <title>Package selection</title>
778 <para>
779
780 You can choose to install any combination of tasks that are available.
781 Available tasks as of this writing include:
782
783 </para>
784
785 <itemizedlist>
786 <listitem><para>
787 <userinput>Standard system</userinput>
788 </para></listitem>
789 <listitem><para>
790 <userinput>Desktop environment</userinput>
791 </para></listitem>
792 <listitem><para>
793 <userinput>Web server</userinput>
794 </para></listitem>
795 <listitem><para>
796 <userinput>Print server</userinput>
797 </para></listitem>
798 <listitem><para>
799 <userinput>DNS server</userinput>
800 </para></listitem>
801 <listitem><para>
802 <userinput>File server</userinput>
803 </para></listitem>
804 <listitem><para>
805 <userinput>Mail server</userinput>
806 </para></listitem>
807 <listitem><para>
808 <userinput>SQL database</userinput>
809 </para></listitem>
810 <listitem><para>
811 <userinput>Laptop</userinput>
812 </para></listitem>
813 </itemizedlist>
814
815 <para>
816
817 You can also choose to install no tasks, and force the installation of a
818 set of packages in some other way. We recommend always including the
819 <userinput>Standard system</userinput> task.
820
821 </para>
822
823 <informalexample role="example"><screen>
824 tasksel tasksel/first multiselect Standard system, Desktop environment
825 #tasksel tasksel/first multiselect Standard system, Web server
826
827 # Some versions of the installer can report back on what software you have
828 # installed, and what software you use. The default is not to report back,
829 # but sending reports helps the project determine what software is most
830 # popular and include it on CDs.
831 #popularity-contest popularity-contest/participate boolean false
832 </screen></informalexample>
833
834 </sect2>
835
836 <sect2 id="preseed-finish">
837 <title>Finishing up the first stage install</title>
838
839 <informalexample role="example"><screen>
840 # Avoid that last message about the install being complete.
841 d-i prebaseconfig/reboot_in_progress note
842
843 # This will prevent the installer from ejecting the CD during the reboot,
844 # which is useful in some situations.
845 #d-i cdrom-detect/eject boolean false
846 </screen></informalexample>
847
848 </sect2>
849
850 <sect2 id="preseed-mailer">
851 <title>Mailer configuration</title>
852 <para>
853
854 During a normal install, exim asks only a few questions. Here's how to
855 avoid even those. More complicated preseeding is possible.
856
857 </para>
858
859 <informalexample role="example"><screen>
860 exim4-config exim4/dc_eximconfig_configtype \
861 select no configuration at this time
862 exim4-config exim4/no_config boolean true
863 exim4-config exim4/no_config boolean true
864 exim4-config exim4/dc_postmaster string
865 </screen></informalexample>
866
867 </sect2>
868
869 <sect2 id="preseed-X">
870 <title>X configuration</title>
871 <para>
872
873 Preseeding Debian's X config is possible, but you probably need to know
874 some details about the video hardware of the machine, since Debian's X
875 configurator does not do fully automatic configuration of everything.
876
877 </para>
878
879 <informalexample role="example"><screen>
880 # X can detect the right driver for some cards, but if you're preseeding,
881 # you override whatever it chooses. Still, vesa will work most places.
882 #xserver-xorg xserver-xorg/config/device/driver select vesa
883
884 # A caveat with mouse autodetection is that if it fails, X will retry it
885 # over and over. So if it's preseeded to be done, there is a possibility of
886 # an infinite loop if the mouse is not autodetected.
887 #xserver-xorg xserver-xorg/autodetect_mouse boolean true
888
889 # Monitor autodetection is recommended.
890 xserver-xorg xserver-xorg/autodetect_monitor boolean true
891 # Uncomment if you have an LCD display.
892 #xserver-xorg xserver-xorg/config/monitor/lcd boolean true
893 # X has three configuration paths for the monitor. Here's how to preseed
894 # the "medium" path, which is always available. The "simple" path may not
895 # be available, and the "advanced" path asks too many questions.
896 xserver-xorg xserver-xorg/config/monitor/selection-method \
897 select medium
898 xserver-xorg xserver-xorg/config/monitor/mode-list \
899 select 1024x768 @ 60 Hz
900 </screen></informalexample>
901
902 </sect2>
903
904 <sect2 id="preseed-other">
905 <title>Preseeding other packages</title>
906
907 <informalexample role="example"><screen>
908 # Depending on what software you choose to install, or if things go wrong
909 # during the installation process, it's possible that other questions may
910 # be asked. You can preseed those too, of course. To get a list of every
911 # possible question that could be asked during an install, do an
912 # installation, and then run these commands:
913 # debconf-get-selections --installer > file
914 # debconf-get-selections >> file
915 </screen></informalexample>
916
917 </sect2>
918 </sect1>
919
920 <sect1 id="preseed-advanced">
921 <title>Advanced options</title>
922
923 <sect2 id="preseed-shell">
924 <title>Shell commands</title>
925
926 <informalexample role="example"><screen>
927 # d-i preseeding is inherently not secure. Nothing in the installer checks
928 # for attempts at buffer overflows or other exploits of the values of a
929 # preseed file like this one. Only use preseed files from trusted
930 # locations! To drive that home, and because it's generally useful, here's
931 # a way to run any shell command you'd like inside the installer,
932 # automatically.
933
934 # This first command is run as early as possible, just after
935 # preseeding is read.
936 #d-i preseed/early_command string anna-install some-udeb
937
938 # This command is run just before the install finishes, but when there is
939 # still a usable /target directory. You can chroot to /target and use it
940 # directly, or use the apt-install and in-target commands to easily install
941 # packages and run commands in the target system.
942 #d-i preseed/late_command string apt-install zsh; in-target chsh -s /bin/zsh
943 </screen></informalexample>
944
945 </sect2>
946
947 <sect2 id="preseed-chainload">
948 <title>Chainloading preseed files</title>
949 <para>
950
951 It is possible to include other preseed files from a preseed file. Any
952 settings in those files will override pre-existing settings from files
953 loaded earlier. This makes it possible to put, for example, general
954 networking settings for your location in one file and more specific
955 settings for certain configurations in other files.
956
957 </para>
958
959 <informalexample><screen>
960 # More that one file can be listed, separated by spaces; all will be
961 # loaded. The included files can have preseed/include directives of their
962 # own as well. Note that if the filenames are relative, they are taken from
963 # the same directory as the preseed file that includes them.
964 #d-i preseed/include string x.cfg
965
966 # The installer can optionally verify checksums of preseed files before
967 # using them. Currently only md5sums are supported, list the md5sums
968 # in the same order as the list of files to include.
969 #d-i preseed/include/checksum string 5da499872becccfeda2c4872f9171c3d
970
971 # More flexibly, this runs a shell command and if it outputs the names of
972 # preseed files, includes those files.
973 #d-i preseed/include_command \
974 # string echo if [ "`hostname`" = bob ]; then echo bob.cfg; fi
975 </screen></informalexample>
976
977 </sect2>
978 </sect1>
979 </appendix>

Properties

Name Value
svn:keywords Id

  ViewVC Help
Powered by ViewVC 1.1.5