summaryrefslogtreecommitdiff
path: root/nl/appendix
diff options
context:
space:
mode:
authorFrans Pop <elendil@planet.nl>2006-11-04 11:07:38 +0000
committerFrans Pop <elendil@planet.nl>2006-11-04 11:07:38 +0000
commit22678abd7f05d096672755b9e9c671aa5bc6e3d3 (patch)
treeece5e4600ca0c0d8f7a68eea2654c051e1c41e26 /nl/appendix
parenteed6d407f361ea01bff258ad43e539e5c39cedb1 (diff)
downloadinstallation-guide-22678abd7f05d096672755b9e9c671aa5bc6e3d3.zip
Update of original English docs
Diffstat (limited to 'nl/appendix')
-rw-r--r--nl/appendix/preseed.xml399
1 files changed, 268 insertions, 131 deletions
diff --git a/nl/appendix/preseed.xml b/nl/appendix/preseed.xml
index 3381a4a2b..396197822 100644
--- a/nl/appendix/preseed.xml
+++ b/nl/appendix/preseed.xml
@@ -1,5 +1,5 @@
<!-- retain these comments for translator revision tracking -->
-<!-- original version: 42305 untranslated -->
+<!-- original version: 42377 untranslated -->
<!--
Be carefull with the format of this file as it is parsed to generate
@@ -17,8 +17,8 @@ Currently only a single variant of the example file is generated (for i386).
<para>
-This appendix explains the intricacies of preseeding answers to questions in
-&d-i; to automate your installation.
+This appendix explains how to preseed answers to questions in &d-i; to
+automate your installation.
</para><para>
@@ -48,9 +48,7 @@ There are three methods that can be used for preseeding:
<firstterm>network</firstterm>. Initrd preseeding will work with any
installation method and supports preseeding of more things, but it requires
the most preparation. File and network preseeding each can be used with
-different installation methods. With file and network preseeding the first
-few installer questions cannot be preseeded because the preconfiguration
-file is only loaded after they have been asked.
+different installation methods.
</para><para>
@@ -71,7 +69,14 @@ installation methods.
<entry>CD/DVD</entry>
<entry>yes</entry>
<entry>yes</entry>
- <entry>no</entry>
+ <entry>yes<footnote id='apx-ps-net'>
+
+ <para>
+ but only if you have network access, and set <literal>preseed/url</literal>
+ appropriately
+ </para>
+
+ </footnote></entry>
</row><row>
<entry>netboot</entry>
<entry>yes</entry>
@@ -81,12 +86,12 @@ installation methods.
<entry>hd-media <phrase condition="bootable-usb">(including usb-stick)</phrase></entry>
<entry>yes</entry>
<entry>yes</entry>
- <entry>no</entry>
+ <entry>yes<footnoteref linkend='apx-ps-net'/></entry>
</row><row condition="supports-floppy-boot">
<entry>floppy based (cd-drivers)</entry>
<entry>yes</entry>
<entry>yes</entry>
- <entry>no</entry>
+ <entry>yes<footnoteref linkend='apx-ps-net'/></entry>
</row><row condition="supports-floppy-boot">
<entry>floppy based (net-drivers)</entry>
<entry>yes</entry>
@@ -113,19 +118,21 @@ configured.
</para><para>
-In practical terms this means for file and network preseeding that the
-questions about language, country and keyboard selection will already have
-been asked. For network preseeding add to that any questions related to
-network configuration. Some other questions that are only displayed
-at medium or low priority (like the first hardware detection run) will
-also already have been processed.
+Obviously, any questions that have been processed before the
+preconfiguration file is loaded cannot be preseeded (this will include
+questions that are only displayed at medium or low priority, like the
+first hardware detection run). <xref linkend="preseed-bootparms"/>
+offers a way to avoid these questions being asked.
</para><para>
-Obviously, any questions that have been processed before the
-preconfiguration file is loaded cannot be preseeded.
-<xref linkend="preseed-bootparms"/> offers a way to avoid these
-questions being asked.
+In order to avoid the questions that would normally appear before the
+preseeding occurs, you can start the installer in <quote>auto</quote>
+mode. This delays questions that would normally be asked too early for
+preseeding (i.e. language, country and keyboard selection) until after
+the network comes up, thus allowing them to be preseeded. It also runs
+the installation in crtitical priority, which avoids many unimportant
+questions. See <xref linkend="preseed-auto"/> for details.
</para>
</sect2>
@@ -162,7 +169,7 @@ The following types of templates are relevant for preseeding.
</para>
-<itemizedlist>
+<itemizedlist spacing="compact">
<listitem><para>
string: allows the user to type any value
</para></listitem>
@@ -202,62 +209,21 @@ are stored in a separate, non-readable file in the same directory.
</para>
</sect2>
-->
-
- <sect2 id="preseed-hooks">
- <title>Running custom commands during the installation</title>
-<para>
-
-A very powerful and flexible option offered by the preconfiguration tools
-is the ability to run commands or scripts at certain points in the
-installation. See <xref linkend="preseed-shell"/> for details.
-
-</para>
-
-<itemizedlist>
-<listitem><para>
- <userinput>preseed/early_command</userinput>: is run as soon as the
- preconfiguration file has been loaded
-</para></listitem>
-<listitem><para>
- <userinput>preseed/late_command</userinput>: is run just before the reboot
- at the end of the install, but before the <filename>/target</filename>
- filesystem has been unmounted
-</para></listitem>
-</itemizedlist>
-
- </sect2>
-
- <sect2 id="preseed-seenflag">
- <title>Using preseeding to change default values</title>
-<para>
-
-It is possible to use preseeding to change the default answer for a
-question, but still have the question asked. To do this the
-<firstterm>seen</firstterm> flag must be reset to <quote>false</quote> after
-setting the value for a question.
-
-</para>
-
-<informalexample><screen>
-d-i foo/bar string value
-d-i foo/bar seen false
-</screen></informalexample>
-
- </sect2>
</sect1>
+
<sect1 id="preseed-using">
<title>Using preseeding</title>
<para>
-Of course you will first need to create a preconfiguration file and place it in
+You will first need to create a preconfiguration file and place it in
the location from where you want to use it. Creating the preconfiguration file
is covered later in this appendix. Putting it in the correct location is fairly
straightforward for network preseeding or if you want to read the file off
a floppy or usb-stick. If you want to include the file on a CD or DVD, you
will have to remaster the ISO image. How to get the preconfiguration file
included in the initrd is outside the scope of this document; please consult
-the developers documentation for &d-i;.
+the developers' documentation for &d-i;.
</para><para>
@@ -322,14 +288,206 @@ Note that <filename>preseed/url</filename> can be shortened to just
<filename>url</filename> and <filename>preseed/file</filename> to just
<filename>file</filename> when they are passed as boot parameters.
+</para>
+ </sect2>
+
+ <sect2 id="preseed-bootparms">
+ <title>Using boot parameters to supplement preseeding</title>
+<para>
+
+If a preconfiguration file cannot be used to preseed some steps, the
+install can still be fully automated, since you can pass preseed values on
+the command line when booting the installer. Just pass
+<userinput>path/to/var=value</userinput> for any of the preseed variables
+listed in the examples.
+
+</para><para>
+
+Note that some variables that are frequently set at the boot prompt
+have a shorter alias. If an alias is available, it is used in the
+examples in this appendix instead of the full variable. In
+particular, the <literal>preseed/url</literal> variable has been
+aliased as <literal>url</literal> and has some extra magic to allow
+shortened urls to be used.
+
+</para><para>
+
+A <quote>--</quote> in the boot options has special meaning. Kernel
+parameters that appear after the last <quote>--</quote> may be copied
+into the bootloader configuration for the installed system (if supported by
+the installer for the bootloader). The installer will automatically filter
+out any options (like preconfiguration options) that it recognizes.
+
+</para>
+<note><para>
+
+Current linux kernels (2.6.9 and later) accept a maximum of 32 command line
+options and 32 environment options, including any options added by default
+for the installer. If these numbers are exceeded, the kernel will panic
+(crash). (For earlier kernels, these numbers were lower.)
+
+</para></note>
+<para>
+
+For most installations some of the default options in your bootloader
+configuration file, like <literal>vga=normal</literal>, may be safely
+removed which may allow you to add more options for preseeding.
+
+</para>
+<note><para>
+
+It may not always be possible to specify values with spaces for boot
+parameters, even if you delimit them with quotes.
+
+</para></note>
+ </sect2>
+
+ <sect2 id="preseed-auto">
+ <title>Auto mode</title>
+<para>
+
+There are several features of Debian Installer that combine to allow
+fairly simple command lines at the boot prompt to result in
+arbitrarily complex customized automatic installs. To illustrate
+this, here are some examples that can be used at the boot prompt:
+
+<informalexample><screen>
+auto url=autoserver
+</screen></informalexample>
+
+This relies on there being a DHCP server that will get the machine to
+the point where <literal>autoserver</literal> can be resolved by DNS,
+perhaps after adding the local domain if that was provided by DHCP.
+If this was done at a site where the domain is
+<literal>example.com</literal>, and they have a reasonably sane DHCP
+setup, it would result in the preseed file being retrieved from
+<literal>http://autoserver.example.com/d-i/etch/./preseed.cfg</literal>.
+
+</para><para>
+
+The path segment of that comes from
+<literal>auto-install/defaultroot</literal>, which includes the
+directory <literal>etch</literal> by default to allow future versions
+to specify their own codename to let people migrate forwards in a
+controlled manner. The <literal>/./</literal> bit is used to indicate
+a root relative to which subsequent paths can be anchored (for use in
+preseed/include and preseed/run). This allows files to be specified
+either as full URLs, paths starting with / that are thus anchored, or
+even paths relative to the location where the last preseed file was
+found. This can be used to construct more portable scripts where an
+entire hierarchy of scripts can be moved to a new location without
+breaking it, for example copying the files onto a USB stick when they
+started out on a web server. In this example, if the preseed file
+sets <literal>preseed/run</literal> to
+<literal>/scripts/late_command.sh</literal> then the file will be
+fetched from
+<literal>http://autoserver.example.com/d-i/etch/./scripts/late_command.sh</literal>.
+
+</para><para>
+
+If there is no local DHCP or DNS infrastructure, or if you
+do not want to use the default path to the preseed.cfg, you can still
+use an explicit url, and if you don't use the <literal>/./</literal>
+element it will be anchored to the start of the path (i.e. the third /
+in the URL). Here is an example that requires minimal support from
+the local network infrastructure:
+
+<informalexample><screen>
+auto url=<replaceable>http://192.168.1.2/path/to/mypreseed.file</replaceable>
+</screen></informalexample>
+
+The way this works is that:
+<itemizedlist spacing="compact">
+<listitem><para>
+if the URL is missing a protocol, http is assumed,
+</para></listitem>
+<listitem><para>
+if the hostname section contains no periods, it has the domain derived
+from DHCP appended to it, and
+</para></listitem>
+<listitem><para>
+if there's no <literal>/</literal>'s after the hostname, then the default
+path is added.
+</para></listitem>
+</itemizedlist>
+
+</para><para>
+
+In addition to specifying the url, you can also specify settings that
+do not directly affect the behavior of &d-i; itself, but can be passed
+through to any scripts that might be specified <literal>preseed/run</literal>
+settings in the loaded preseed file. At present, the only example of
+this is <literal>auto-install/classes</literal>, which has an alias
+<literal>classes</literal>. This can be used thus:
+
+<informalexample><screen>
+auto url=<replaceable>example.com</replaceable> classes=<replaceable>class_A;class_B</replaceable>
+</screen></informalexample>
+
+The classes could for example denote the type of system to be installed,
+or the localization to be used.
+
+</para><para>
+
+It is of course possible to extend this concept, and if you do, it is
+reasonable to use the auto-install namespace for this. So one might have
+something like <literal>auto-install/style</literal> which is then used
+in your scripts. If you feel the need to do this, please mention it on
+the <email>debian-boot@lists.debian.org</email> mailing list so that we
+can avoid namespace conflicts, and perhaps add an alias for the parameter
+for you.
+
+</para><para>
+
+The <literal>auto</literal> boot label is not yet defined on all
+architectures. The same effect may be achieved by simply adding the two
+parameters <literal>auto=true priority=critical</literal> to the kernel
+command line. The <literal>auto</literal> parameter is an alias for
+<literal>auto-install/enabled</literal> and controls the delay of the
+locale and keyboard questions until after there has been a chance to
+preseed them, while <literal>priority</literal> is an alias for
+<literal>preseed/priority</literal> and setting it to
+<literal>critical</literal> stops any questions with a lower priority
+from being asked.
+
</para><para>
-While you're at it, you may want to add a boot parameter
-<userinput>priority=critical</userinput>. This will avoid most
-questions even if the preseeding below misses some.
+Additional options that may be of interest while attempting to
+automate an install while using DHCP are: <literal>interface=auto
+netcfg/dhcp_timeout=60</literal> which makes the machine choose the
+first viable NIC and be more patient about getting a reply to its
+DHCP query.
</para>
</sect2>
+
+ <sect2 id="preseed-aliases">
+ <title>Aliases useful with preseeding</title>
+<para>
+
+The following aliases can be useful when using (auto mode) preseeding.
+
+</para>
+
+<!-- Setting column width does not seem to work; use non-breaking spaces
+ to separate columns a bit -->
+<informaltable frame="none">
+<tgroup cols="2"><tbody>
+<row><entry>auto</entry><entry>auto-install/enabled</entry></row>
+<row><entry>classes</entry><entry>auto-install/classes</entry></row>
+<row><entry>fb</entry><entry>debian-installer/framebuffer</entry></row>
+<row><entry>locale</entry><entry>debian-installer/locale</entry></row>
+<row><entry>priority</entry><entry>debconf/priority</entry></row>
+<row><entry>file</entry><entry>preseed/file</entry></row>
+<row><entry>url</entry><entry>preseed/url</entry></row>
+<row><entry>hostname&nbsp;&nbsp;&nbsp;</entry><entry>netcfg/get_hostname</entry></row>
+<row><entry>domain</entry><entry>netcfg/get_domain</entry></row>
+<row><entry>interface</entry><entry>netcfg/choose_interface</entry></row>
+<row><entry>suite</entry><entry>mirror/suite</entry></row>
+</tbody></tgroup>
+</informaltable>
+
+ </sect2>
<sect2 id="preseed-dhcp">
<title>Using a DHCP server to specify preconfiguration files</title>
@@ -367,69 +525,9 @@ automate Debian installs should only be done with care.
</para>
</sect2>
-
- <sect2 id="preseed-bootparms">
- <title>Using boot parameters to supplement preseeding</title>
-<para>
-
-Some parts of the installation process cannot be automated using some forms
-of preseeding because the questions are asked before the preconfiguration
-file is loaded. For example, if the preconfiguration file is downloaded over
-the network, the network setup must be done first. One reason to use initrd
-preseeding is that it allows preseeding of even these early steps of the
-installation process.
-
-</para><para>
-
-If a preconfiguration file cannot be used to preseed some steps, the install
-can still be fully automated, since you can pass preseed values to the kernel
-on the command line. Just pass <userinput>path/to/var=value</userinput>
-for any of the preseed variables listed in the examples.
-
-</para><para>
-
-Note that some variables that are frequently set at the boot prompt have a
-shorter alias. If an alias is available, it is used in the examples in
-this appendix instead of the full variable.
-
-</para><para>
-
-A <quote>--</quote> in the boot options has special meaning. Kernel
-parameters that appear after the last <quote>--</quote> will be copied
-into the installed bootloader configuration (if supported by the
-installer for the bootloader). Note that the <quote>--</quote> may
-already be present in the default boot parameters, which means that
-unless you add another <quote>--</quote> all parameters specified
-at the boot prompt will be copied. That being the case, you should
-specify any preconfiguration options before any options required by the
-hardware in order to boot, and separate them with a <quote>--</quote>
-to ensure that only the latter are copied onto the target system.
-
-</para>
-<note><para>
-
-Current linux kernels (2.6.9 and later) accept a maximum of 32 command line
-options and 32 environment options, including any options added by default
-for the installer. If these numbers are exceeded, the kernel will panic
-(crash). (For earlier kernels, these numbers were lower.)
-
-</para></note>
-<para>
-
-For most installations some of the default options in your bootloader
-configuration file, like <literal>vga=normal</literal>, may be safely
-removed which may allow you to add more options for preseeding.
-
-</para>
-<note><para>
-
-It may not always be possible to specify values with spaces for boot
-parameters, even if you delimit them with quotes.
-
-</para></note>
- </sect2>
</sect1>
+
<sect1 id="preseed-creating">
<title>Creating a preconfiguration file</title>
<para>
@@ -529,6 +627,7 @@ an install, you can use the command <command>debconf-set-selections -c
</para>
</sect1>
+
<sect1 id="preseed-contents">
<title>Contents of the preconfiguration file</title>
<para>
@@ -1190,11 +1289,19 @@ xserver-xorg xserver-xorg/config/monitor/mode-list \
</sect2>
</sect1>
+
<sect1 id="preseed-advanced">
<title>Advanced options</title>
- <sect2 id="preseed-shell">
- <title>Shell commands</title>
+ <sect2 id="preseed-hooks">
+ <title>Running custom commands during the installation</title>
+<para>
+
+A very powerful and flexible option offered by the preconfiguration tools
+is the ability to run commands or scripts at certain points in the
+installation.
+
+</para>
<informalexample role="example"><screen>
# d-i preseeding is inherently not secure. Nothing in the installer checks
@@ -1216,6 +1323,24 @@ xserver-xorg xserver-xorg/config/monitor/mode-list \
</screen></informalexample>
</sect2>
+
+ <sect2 id="preseed-seenflag">
+ <title>Using preseeding to change default values</title>
+<para>
+
+It is possible to use preseeding to change the default answer for a
+question, but still have the question asked. To do this the
+<firstterm>seen</firstterm> flag must be reset to <quote>false</quote> after
+setting the value for a question.
+
+</para>
+
+<informalexample><screen>
+d-i foo/bar string value
+d-i foo/bar seen false
+</screen></informalexample>
+
+ </sect2>
<sect2 id="preseed-chainload">
<title>Chainloading preconfiguration files</title>
@@ -1230,7 +1355,7 @@ settings for certain configurations in other files.
</para>
<informalexample><screen>
-# More that one file can be listed, separated by spaces; all will be
+# More than one file can be listed, separated by spaces; all will be
# loaded. The included files can have preseed/include directives of their
# own as well. Note that if the filenames are relative, they are taken from
# the same directory as the preconfiguration file that includes them.
@@ -1253,6 +1378,18 @@ settings for certain configurations in other files.
d-i preseed/run string foo.sh
</screen></informalexample>
+<para>
+
+It is also possible to chainload from the initrd or file preseeding phase,
+into network preseeding by setting preseed/url in the earlier files.
+This will cause network preseeding to be performed when the network comes
+up. You need to be careful when doing this, since there will be two
+distinct runs at preseeding, meaning for example that you get another
+chance to run the preseed/early command, the second one happening after the
+network comes up.
+
+</para>
+
</sect2>
</sect1>
</appendix>