d-i-manual - en to zh_CN translation catalogue (156 entries)

note: Tag: title
en: Automating the installation using preseeding
zh_CN: 使用预置自动进行安装

note: Tag: para
en: This appendix explains how to preseed answers to questions in &d-i; to automate your installation.
zh_CN: 本附录说明如何预置 &d-i; 中提问的答案，让安装过程自动化。

note: Tag: para
en: The configuration fragments used in this appendix are also available as an example preconfiguration file from &urlset-example-preseed;.
zh_CN: 本附录使用的配置片段还放在预置例子文件 &urlset-example-preseed; 里面。

note: Tag: title
en: Introduction
zh_CN: 介绍

note: Tag: para
en: Preseeding provides a way to set answers to questions asked during the installation process, without having to manually enter the answers while the installation is running. This makes it possible to fully automate most types of installation and even offers some features not available during normal installations.
zh_CN: 预置提供了一种在安装过程中回答问题，而无须手动键入答案的途径。这让完全自动进行大多数的安装成为可能，并提供了一些普通安装方式下不具备的特性。

note: Tag: para
en: Preseeding is not required. If you use an empty preseed file, the installer will behave just the same way as in a normal manual installation. Each question you preseed will (if you got it right!) modify the installation in some way from that baseline.
zh_CN: 预置文件并非必须。如果您使用空的预置文件，安装程序就会跟正常手动安装一样。每个问题的预置(如果使用正确!)都会以同样的方式修改对应的基准。

note: Tag: title
en: Preseeding methods
zh_CN: 预置方法

note: Tag: para
en: There are three methods that can be used for preseeding: <firstterm>initrd</firstterm>, <firstterm>file</firstterm> and <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.
zh_CN: 一共有三种方法可用于预置: <firstterm>initrd</firstterm>、<firstterm>file</firstterm> 和 <firstterm>network</firstterm>。initrd 方法可以用于任何一种安装方式并支持较多的预置内容，但它需要做的准备工作也最多。file 和 network 方法分别用于不同的安装方式。

note: Tag: para
en: The following table shows which preseeding methods can be used with which installation methods.
zh_CN: 下面的表格显示了各种安装方式可选择的预置方法。

note: Tag: entry
en: Installation method
zh_CN: 安装方式

note: Tag: entry
en: <entry>yes</entry>
zh_CN: <entry>是</entry>

note: Tag: para
en: but only if you have network access, and set <literal>preseed/url</literal> appropriately
zh_CN: 除非您有网络并正确设置 <literal>preseed/url</literal>

note: Tag: entry
en: <entry>no</entry>
zh_CN: <entry>否</entry>

note: Tag: entry
en: hd-media <phrase condition="bootable-usb">(including usb-stick)</phrase>
zh_CN: 硬盘 <phrase condition="bootable-usb">(包括 U 盘)</phrase>

note: Tag: para
en: An important difference between the preseeding methods is the point at which the preconfiguration file is loaded and processed. For initrd preseeding this is right at the start of the installation, before the first question is even asked. Preseeding from the kernel command line happens just after. It is thus possible to override configuration set in the initrd by editing the kernel command line (either in the bootloader configuration or manually at boot time for bootloaders that allow it). For file preseeding this is after the installation image has been loaded. For network preseeding it is only after the network has been configured.
zh_CN: 这些预置方法的主要不同之处在于何时预置文件被加载和处理。对于 initrd 方法，它是在第一个问题询问之前，安装开始的时候。来自内核命令行的前置尽在其后发生。这样能够通过编辑内核命令行，来否决 initrd 中设置的配置（或者在 bootloader配置，或者对于允许的 bootloader 在引导时手动）。对于 file 方法，它是在加载安装映像之后。对 network 方法，它在网络配置完毕之后。

note: Tag: para
en: 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). A not so convenient way to avoid these questions from being asked is to preseed them through the boot parameters, as described in <xref linkend="preseed-bootparms"/>.
zh_CN: 显而易见，在加载预置文件之前需要的过程都不能被预置(这里面包括只在 medium 或 low 优先级出现的问题，像首先运行的硬件检测)。避免询问这些问题的不那么方便的方法，是通过引导参数来预置它们，如在<xref linkend="preseed-bootparms"/>中描述的。

note: Tag: para
en: In order to easily 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 at critical priority, which avoids many unimportant questions. See <xref linkend="preseed-auto"/> for details.
zh_CN: 为了容易地避免在预置之前询问，您可以让安装程序运行在 <quote>auto</quote> 模式。它延迟了预置之前出现询问问题(例如，语言、国家和键盘选择)，直至连上网络，使它们可以进行预置。它还让安装运行在 critical 优先级下，避免不重要的问题。参阅 <xref linkend="preseed-auto"/> 了解详细信息。

note: Tag: title
en: Limitations
zh_CN: 限制

note: Tag: para
en: Although most questions used by &d-i; can be preseeded using this method, there are some notable exceptions. You must (re)partition an entire disk or use available free space on a disk; it is not possible to use existing partitions.
zh_CN: 虽然使用这种方法能预先设置 &d-i; 的绝大多数问答，但还是有明显的例外。您必须(重新)分区整个硬盘，或者使用磁盘上的剩余空间; 但无法使用已经存在的分区。

note: Tag: title
en: Using preseeding
zh_CN: 使用预置

note: Tag: para
en: 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 usb-stick. If you want to include the file in an installation ISO image, you will have to remaster the 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;.
zh_CN: 您首先要创建一个预置文件，并将它置于希望使用的地方。创建预置文件在后面的附录中有说明。如果您打算使用网络预置或者从 U 盘读取，直接将它放到正确的地方就可以了。如果您希望将它放到安装 ISO 映像上面，那就需要重新制作一个映像文件。而如何将预置文件包含到 initrd 里面，超出了本文档的范围；请查询 &d-i; 开发者文档。

note: Tag: para
en: An example preconfiguration file that you can use as basis for your own preconfiguration file is available from &urlset-example-preseed;. This file is based on the configuration fragments included in this appendix.
zh_CN: 有一个预置文件的例子放在 &urlset-example-preseed;，您可以拿它作为自己预置文件的基础。此文件基于本附录所列的配置文件片段。

note: Tag: title
en: Loading the preconfiguration file
zh_CN: 加载预置文件

note: Tag: para
en: If you are using initrd preseeding, you only have to make sure a file named <filename>preseed.cfg</filename> is included in the root directory of the initrd. The installer will automatically check if this file is present and load it.
zh_CN: 如果使用 initrd 预置，您只需确保一个名为 <filename>preseed.cfg</filename> 的文件包含在 initrd 的根目录里面。安装程序会自动检测并加载。

note: Tag: para
en: For the other preseeding methods you need to tell the installer what file to use when you boot it. This is normally done by passing the kernel a boot parameter, either manually at boot time or by editing the bootloader configuration file <phrase arch="linux-any">(e.g. <filename>syslinux.cfg</filename>) and adding the parameter to the end of the append line(s) for the kernel.</phrase><phrase arch="hurd-any">(e.g. <filename>grub.cfg</filename>) and adding the parameter to the end of the <filename>gnumach.gz</filename> line.</phrase>
zh_CN: 其他的预置方法，您需要在启动的时候告诉安装程序所使用的文件。这通过给内核传递引导参数完成，可以在启动时手动指定，或者编辑 bootloader 的配置文件<phrase arch="linux-any">(如: <filename>syslinux.cfg</filename>)，并在内核的附加行后面添加参数。</phrase><phrase arch="hurd-any">(如: <filename>grub.cfg</filename>)，并在 <filename>gnumach.gz</filename> 行后添加参数。</phrase>

note: Tag: para
en: If you do specify the preconfiguration file in the bootloader configuration, you might change the configuration so you don't need to hit enter to boot the installer. <phrase arch="linux-any">For syslinux this means setting the timeout to <literal>1</literal> in <filename>syslinux.cfg</filename>.</phrase><phrase arch="hurd-any">For grub this means setting the timeout to <literal>0</literal> in <filename>grub.cfg</filename>.</phrase>
zh_CN: 如果在 bootloader 配置里指定预置文件，可以修改配置而不再需要键入回车来引导安装程序。<phrase arch="linux-any">对于 syslinux，这意味着在 <filename>syslinux.cfg</filename> 中将超时 timeout 设置为 <literal>1</literal>。</phrase><phrase arch="hurd-any">对于 grub 则意味着在 <filename>grub.cfg</filename> 中将超时 timeout 设置为 <literal>0</literal>。</phrase>

note: Tag: para
en: To make sure the installer gets the right preconfiguration file, you can optionally specify a checksum for the file. Currently this needs to be a md5sum, and if specified it must match the preconfiguration file or the installer will refuse to use it.
zh_CN: 为了保证安装程序得到正确的预置文件，您可以选择为预置文件指定校验和。当前使用的是 md5sum，如果指定了，那么配置文件必须匹配，否则安装程序将拒绝使用。

note: Tag: screen
en: Boot parameters to specify:
    - if you're netbooting:
      preseed/url=http://host/path/to/preseed.cfg
      preseed/url/checksum=5da499872becccfeda2c4872f9171c3d
    - or
      preseed/url=tftp://host/path/to/preseed.cfg
      preseed/url/checksum=5da499872becccfeda2c4872f9171c3d
    
    - if you're booting a remastered installation image:
      preseed/file=/cdrom/preseed.cfg
      preseed/file/checksum=5da499872becccfeda2c4872f9171c3d
    
    - if you're installing from USB media (put the preconfiguration file in the
      toplevel directory of the USB stick):
      preseed/file=/hd-media/preseed.cfg
      preseed/file/checksum=5da499872becccfeda2c4872f9171c3d
zh_CN: 要指定的引导参数:
    - 如果使用网络启动:
      preseed/url=http://host/path/to/preseed.cfg
      preseed/url/checksum=5da499872becccfeda2c4872f9171c3d
    -或者 
      preseed/url=tftp://host/path/to/preseed.cfg
      preseed/url/checksum=5da499872becccfeda2c4872f9171c3d
    
    - 如果从定制的安装映像启动:
      preseed/file=/cdrom/preseed.cfg
      preseed/file/checksum=5da499872becccfeda2c4872f9171c3d
    
    - 如果用 USB 设备安装(将预置文件放入 U 盘的顶极目录):
      preseed/file=/hd-media/preseed.cfg
      preseed/file/checksum=5da499872becccfeda2c4872f9171c3d

note: Tag: para
en: Note that <filename>preseed/url</filename> can be shortened to just <filename>url</filename>, <filename>preseed/file</filename> to just <filename>file</filename> and <filename>preseed/file/checksum</filename> to just <filename>preseed-md5</filename> when they are passed as boot parameters.
zh_CN: 注意，作为引导参数时 <filename>preseed/url</filename> 可以缩写为 <filename>url</filename>、<filename>preseed/file</filename> 缩写为 <filename>file</filename>、<filename>preseed/file/checksum</filename> 缩写为 <filename>preseed-md5</filename>。

note: Tag: title
en: Using boot parameters to preseed questions
zh_CN: 使用引导参数预置问题的答案

note: Tag: para
en: 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.
zh_CN: 如果预置文件无法设置一些步骤，安装也可以完全自动进行，这是因为您可以在引导安装程序时，在命令行上为内核传递预置的值。

note: Tag: para
en: Boot parameters can also be used if you do not really want to use preseeding, but just want to provide an answer for a specific question. Some examples where this can be useful are documented elsewhere in this manual.
zh_CN: 引导参数可以在您不想使用预置的时候使用，但只提供一个特定问题的答案。在本手册中有一些这样的示例。

note: Tag: para
en: To set a value to be used inside &d-i;, just pass <userinput><replaceable>path/to/variable</replaceable>=<replaceable>value</replaceable></userinput> for any of the preseed variables listed in the examples in this appendix. If a value is to be used to configure packages for the target system, you will need to prepend the <firstterm>owner</firstterm><footnote> <para> The owner of a debconf variable (or template) is normally the name of the package that contains the corresponding debconf template. For variables used in the installer itself the owner is <quote>d-i</quote>. Templates and variables can have more than one owner which helps to determine whether they can be removed from the debconf database if the package is purged. </para> </footnote> of the variable as in <userinput><replaceable>owner</replaceable>:<replaceable>path/to/variable</replaceable>=<replaceable>value</replaceable></userinput>. If you don't specify the owner, the value for the variable will not be copied to the debconf database in the target system and thus remain unused during the configuration of the relevant package.
zh_CN: 要设置 &d-i; 中使用的值，只须传递 <userinput><replaceable>path/to/variable</replaceable>=<replaceable>value</replaceable></userinput>，它们是本附录中所列的任何一个。如果该值是用于配置目标系统的软件包，您需要预先设置 <userinput><replaceable>owner</replaceable>:<replaceable>path/to/variable</replaceable>=<replaceable>value</replaceable></userinput> 中的 <firstterm>owner</firstterm><footnote> <para> debconf 变量(或模板)的 owner 通常是包含对应 debconf 模板的软件包明。对于安装程序自己使用的变量，owner 是 <quote>d-i</quote>。模板和变量可以有多个 owner，以助于删除软件包时判断它们是否要从 debconf 数据库中删除。</para> </footnote> 变量。如果您不指定 owner，该变量的值不会复制到目标系统上的 debconf 数据库，并在相关的软件包的配置中不使用。

note: Tag: para
en: Normally, preseeding a question in this way will mean that the question will not be asked. To set a specific default value for a question, but still have the question asked, use <quote>?=</quote> instead of <quote>=</quote> as operator. See also <xref linkend="preseed-seenflag"/>.
zh_CN: 通常，采用这种方式预置是为了问题不再被询问。为了设置一个问题的默认答案，并仍然显示问题，请使用 <quote>?=</quote> 替换 <quote>=</quote> 作为操作符。参阅 <xref linkend="preseed-seenflag"/>。

note: Tag: para
en: 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. The <literal>preseed/url</literal> variable for example has been aliased as <literal>url</literal>. Another example is the <literal>tasks</literal> alias, which translates to <literal>tasksel:tasksel/first</literal>.
zh_CN: 注意，一些常用的引导参数变量有简写别名。如果有简写形式，它们将会被用在附录的例子里面替代全称。例如，<literal>preseed/url</literal> 变量简写为 <literal>url</literal>。另一个例子是 <literal>tasks</literal>，它转换成 <literal>tasksel:tasksel/first</literal>。

note: Tag: para
en: 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.
zh_CN: <quote>---</quote> 在启动选项中有特殊含义。最后一个 <quote>---</quote> 后面出现的内核参数将被复制到安装的 bootloader 设置(假如安装程序支持 bootloader)。安装程序可以自动发现它能识别的选项(就像预置选项)。

note: Tag: para
en: 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.)
zh_CN: 当前的 linux 内核(2.6.9 和更新的)，可以指定最多 32 个命令行选项和 32 个环境变量选项，包括安装程序默认的选项。如果数目超出，内核将崩溃。(早期的内核，接受的数目更少。)

note: Tag: para
en: 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.
zh_CN: 大多数安装过程，在引导配置文件中一些默认的选项，比如 <literal>vga=normal</literal>，可以放心地删除，这让您可以添加更多的预置选项。

note: Tag: para
en: It may not always be possible to specify values with spaces for boot parameters, even if you delimit them with quotes.
zh_CN: 引导参数中即使使用引号，也可能无法夹杂空格。

note: Tag: title
en: Auto mode
zh_CN: auto 模式

note: Tag: para
en: 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.
zh_CN: 有几个 &debian; 安装程序的特性结合到一起，在引导提示时允许相当简单的命令行，导致了任何复杂的定制化自动安装。

note: Tag: para
en: This is enabled by using the <literal>Automated install</literal> boot choice, also called <literal>auto</literal> for some architectures or boot methods. In this section, <literal>auto</literal> is thus not a parameter, it means selecting that boot choice, and appending the following boot parameters on the boot prompt. <phrase arch="x86">See <xref linkend="boot-screen"/> for information on how to add a boot parameter.</phrase>
zh_CN: 这通过使用 <literal>Automated install</literal> 引导选择来启动，对一些架构或引导方法也被称为 <literal>auto</literal>。 在这节中，这样 <literal>auto</literal> 不是参数，它意味着选择引导选项，并在引导提示上增补后面的引导参数。<phrase arch="x86">请参见<xref linkend="boot-screen"/> 如何添加引导参数的信息。</phrase>

note: Tag: para
en: 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/&releasename;/./preseed.cfg</literal>.
zh_CN: 为了表达清楚，这里有一些例子，可以用在引导提示符后面：<informalexample><screen>
    auto url=autoserver
    </screen></informalexample> 这需要一个 DHCP 服务器能找到并且 DNS 可以解析 <literal>autoserver</literal>，或许要加上 DHCP 提供的本地域名。如果域名是 <literal>example.com</literal>，并有相应的 DHCP 设置，那么预置文件将从 <literal>http://autoserver.example.com/d-i/&releasename;/./preseed.cfg</literal> 获得。

note: Tag: para
en: The last part of that url (<literal>d-i/&releasename;/./preseed.cfg</literal>) is taken from <literal>auto-install/defaultroot</literal>. By default this includes the directory <literal>&releasename;</literal> to allow future versions to specify their own codename and 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/&releasename;/./scripts/late_command.sh</literal>.
zh_CN: url 的最后一部分(<literal>d-i/&releasename;/./preseed.cfg</literal>)来自 <literal>auto-install/defaultroot</literal>。默认包括 <literal>&releasename;</literal> 目录，让将来的版本在可控的方式下指定自己的代号。<literal>/./</literal> 位用来定位相对于根目录的子目录(用于 preseed/include 和 preseed/run)。使文件可以指定为完整路径、以 / 开始的位置或者相对于最后一个预置的文件。这样可以建立更具移植性的脚本，让各级脚本完整地移动到新的位置而不被破坏。比如，复制 web 服务器上的文件到 U 盘。本例中，如果预置文件的 <literal>preseed/run</literal> 为 <literal>/scripts/late_command.sh</literal>，那么文件将从 <literal>http://autoserver.example.com/d-i/&releasename;/./scripts/late_command.sh</literal> 获得。

note: Tag: para
en: If there is no local DHCP or DNS infrastructure, or if you do not want to use the default path to <filename>preseed.cfg</filename>, 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 <literal>/</literal> 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:
zh_CN: 如果本地没有 DHCP 或 DNS，或者您不想使用 <filename>preseed.cfg</filename> 的默认路径，可以直接指定路径。并且，如果不使用 <literal>/./</literal> 元素，它将定位到路径的起始点 (例如 URL 中的第三个 <literal>/</literal>)。下面的例子是局域网中最基本的要求：<informalexample><screen>
    auto url=<replaceable>http://192.168.1.2/path/to/mypreseed.file</replaceable>
    </screen></informalexample> 它会以下列方式运作：

note: Tag: para
en: if the URL is missing a protocol, http is assumed,
zh_CN: 如果 URL 不含协议，就使用 http

note: Tag: para
en: if the hostname section contains no periods, it has the domain derived from DHCP appended to it, and
zh_CN: 如果主机名不含域名，将使用 DHCP 提供的，并且

note: Tag: para
en: if there's no <literal>/</literal>'s after the hostname, then the default path is added.
zh_CN: 如果主机名后面没有 <literal>/</literal>，那么将加上默认路径。

note: Tag: para
en: 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 scripts specified using <literal>preseed/run</literal> 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.
zh_CN: 除了指定 url 之外，您还可以指定不直接影响 &d-i; 自己行为的设置，但是可以传递到预置文件加载的 <literal>preseed/run</literal> 中的脚本。当前，只有一个 <literal>auto-install/classes</literal>，它的别名是 <literal>classes</literal>。可以这样用：<informalexample><screen>
    auto url=<replaceable>example.com</replaceable> classes=<replaceable>class_A;class_B</replaceable>
    </screen></informalexample> classes 可以指定系统的类型，或者本地化信息。

note: Tag: para
en: 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.
zh_CN: 只要您愿意，当然可以扩充这个概念，合理应用 auto-install 名字空间就是为了这个目的。这就可能会有诸如 <literal>auto-install/style</literal> 的内容加入到您的脚本。如果您觉得需要这样做，请发邮件到 <email>debian-boot@lists.debian.org</email> 邮件列表说明，我们可以避免名字空间的冲突，还可能会为您增加一个参数的别名。

note: Tag: para
en: The <literal>auto</literal> boot choice is not yet defined on all arches. 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> kernel parameter is an alias for <literal>auto-install/enable</literal> and setting it to <literal>true</literal> delays the locale and keyboard questions until after there has been a chance to preseed them, while <literal>priority</literal> is an alias for <literal>debconf/priority</literal> and setting it to <literal>critical</literal> stops any questions with a lower priority from being asked.
zh_CN: <literal>auto</literal> 引导先择并未在所有架构上定义。在内核命令行上可以通过添加 <literal>auto=true priority=critical</literal> 两个参数达到同样的效果。<literal>auto</literal> 内核参数是 <literal>auto-install/enable</literal> 的别名，将其设为 <literal>true</literal> 可以延迟 locale 和键盘等问题的提出，使其可以提供预置，其中 <literal>priority</literal> 是 <literal>debconf/priority</literal> 的别名，设置它为 <literal>critical</literal> 可以禁止在较低优先级下的问题提出。

note: Tag: para
en: 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.
zh_CN: 在使用 DHCP 自动安装时还有一个有趣的额外选项：<literal>interface=auto netcfg/dhcp_timeout=60</literal>，这让机器使用第一个可用的网卡并耐心地等待 DHCP 的查询。

note: Tag: para
en: An extensive example of how to use this framework, including example scripts and classes, can be found on the <ulink url="http://hands.com/d-i/">website of its developer</ulink>. The examples available there also show many other nice effects that can be achieved by creative use of preconfiguration.
zh_CN: 更多使用此框架的例子，包括示例脚本和类，可以在<ulink url="http://hands.com/d-i/">其开发者的网站</ulink>找到。那里的例子还显示出预置可以达到更多的效果。

note: Tag: title
en: Aliases useful with preseeding
zh_CN: 预置中有用的别名

note: Tag: para
en: The following aliases can be useful when using (auto mode) preseeding. Note that these are simply short aliases for question names, and you always need to specify a value as well: for example, <literal>auto=true</literal> or <literal>interface=eth0</literal>.
zh_CN: 下面这些别名在使用(自动)预置时很有用处。注意，它们是提问名称的简写别名，您同时需要指定一个对应的值：例如，<literal>auto=true</literal> 或 <literal>interface=eth0</literal>。

note: Tag: title
en: Examples of boot prompt preseeding
zh_CN: 引导提示预置的例子

note: Tag: para
en: Here are some examples of how the boot prompt might look like (you will need to adapt this to your needs<phrase arch="x86">; also see <xref linkend="boot-screen"/></phrase>).
zh_CN: 这里是一些引导提示看起来什么样子的例子（还需要将这个与您的需要相适应<phrase arch="x86">；还请参见<xref linkend="boot-screen"/> </phrase>）。

note: Tag: title
en: Using a DHCP server to specify preconfiguration files
zh_CN: 使用 DHCP 服务器指定预置文件

note: Tag: para
en: It's also possible to use DHCP to specify a preconfiguration file to download from the network. DHCP allows specifying a filename. Normally this is a file to netboot, but if it appears to be an URL then installation media that support network preseeding will download the file from the URL and use it as a preconfiguration file. Here is an example of how to set it up in the dhcpd.conf for version 3 of the ISC DHCP server (the isc-dhcp-server &debian; package).
zh_CN: 还可以使用 DHCP 来指定从网络下载的预置文件。DHCP 允许指定文件名。通常是用于 netboot 的文件，但如果是一个 URL，那么支持网络预置的安装介质就会从该 URL 下载，并用作预置文件。这里有一个在 dhcpd.conf 中使用的例子，它用于 ISC DHCP 服务器第 3 版(&debian; 里面是 isc-dhcp-server 软件包)。

note: Tag: para
en: Note that the above example limits this filename to DHCP clients that identify themselves as <quote>d-i</quote>, so it will not affect regular DHCP clients, but only the installer. You can also put the text in a stanza for only one particular host to avoid preseeding all installs on your network.
zh_CN: 注意，上面的例子中使用的文件名限定 DHCP 客户端自己是 <quote>d-i</quote>，因此仅适用于安装程序，而对普通的 DHCP 客户端无效。您可以将只用于一个特殊主机的文字放在一段，以避免预置网络中的其他安装。

note: Tag: para
en: A good way to use the DHCP preseeding is to only preseed values specific to your network, such as the &debian; mirror to use. This way installs on your network will automatically get a good mirror selected, but the rest of the installation can be performed interactively. Using DHCP preseeding to fully automate &debian; installs should only be done with care.
zh_CN: 使用 DHCP 预置的一个好方法是仅预置网络相关的值，比如所使用的 &debian; 镜像。这种方式下在网络中安装将会自动选择一个合适的镜像，而其余的安装部分仍可以交互进行。使用 DHCP 预置进行完整的 &debian; 自动安装应该特别小心。

note: Tag: title
en: Creating a preconfiguration file
zh_CN: 创建预置文件

note: Tag: para
en: The preconfiguration file is in the format used by the <command>debconf-set-selections</command> command. The general format of a line in a preconfiguration file is:
zh_CN: 预置文件是 <command>debconf-set-selections</command> 命令使用的格式。通常预置文件中每一行的格式为：

note: Tag: para
en: The file should start with <literal>#_preseed_V1</literal>
zh_CN: 文件应该以 <literal>#_preseed_V1</literal>开始

note: Tag: para
en: There are a few rules to keep in mind when writing a preconfiguration file.
zh_CN: 编写预置文件的时候要留意几条规则。

note: Tag: para
en: Put only a single space or tab between type and value: any additional whitespace will be interpreted as belonging to the value.
zh_CN: 在类型和值之间只有一个空格或者 tab：任何额外的空格将被解释为值的一部分。

note: Tag: para
en: A line can be split into multiple lines by appending a backslash (<quote><literal>\</literal></quote>) as the line continuation character. A good place to split a line is after the question name; a bad place is between type and value. Split lines will be joined into a single line with all leading/trailing whitespace condensed to a single space.
zh_CN: 一行可以通过行尾的反斜杠(<quote><literal>\</literal></quote>)连接符分成多行。分割一行比较妥当的地方是在问题后面；在类型和值之间分割则是糟糕做法。被分割的行连接时会把行首和行尾的空格缩减为一个空格，再组成单独一行。

note: Tag: para
en: For debconf variables (templates) used only in the installer itself, the owner should be set to <quote>d-i</quote>; to preseed variables used in the installed system, the name of the package that contains the corresponding debconf template should be used. Only variables that have their owner set to something other than <quote>d-i</quote> will be propagated to the debconf database for the installed system.
zh_CN: 只在安装程序自己使用的 debconf 变量(模板)，owner 应该设置为 <quote>d-i</quote>; 要在安装后的系统里面预置变量，应该使用名称中包含对应 debconf 模板的软件包。只有那些 owner 为非 <quote>d-i</quote> 的变量将被保存到安装后系统的 debconf 数据库里面。

note: Tag: para
en: Most questions need to be preseeded using the values valid in English and not the translated values. However, there are some questions (for example in <classname>partman</classname>) where the translated values need to be used.
zh_CN: 大多数问题需要使用有效的英文预置值，而不是翻译过的值。但有些问题(例如 <classname>partman</classname>)，需要使用翻译过的值。

note: Tag: para
en: Some questions take a code as value instead of the English text that is shown during installation.
zh_CN: 有些问题在安装过程中显示值的代码而不是英文文本。

note: Tag: para
en: Start with <literal>#_preseed_V1</literal>
zh_CN: 以<literal>#_preseed_V1</literal>开始

note: Tag: para
en: A comment consists of a line which <emphasis>starts</emphasis> with a hash character (<quote><literal>#</literal></quote>) and extends up to the length of that line.
zh_CN: 注释行必须以井号（<quote><literal>#</literal></quote>）<emphasis>打头</emphasis>，一直延续到行尾。

note: Tag: para
en: The easiest way to create a preconfiguration file is to use the example file linked in <xref linkend="preseed-contents"/> as basis and work from there.
zh_CN: 建立预置文件最简单的方法是使用例子文件作为工作的基础，它位于 <xref linkend="preseed-contents"/>。

note: Tag: para
en: An alternative method is to do a manual installation and then, after rebooting, use the <command>debconf-get-selections</command> from the <classname>debconf-utils</classname> package to dump both the debconf database and the installer's cdebconf database to a single file:
zh_CN: 另一种方法是手动安装，重启后使用 <classname>debconf-utils</classname> 软件包里面的 <command>debconf-get-selections</command>，将 debconf 数据库和安装程序的 cdebconf 数据库导出到单一一个文件：

note: Tag: para
en: However, a file generated in this manner will have some items that should not be preseeded, and the example file is a better starting place for most users.
zh_CN: 但用此方法产生的文件，有些项无法预置。对于大多数用户，示例文件是一个较佳的开始。

note: Tag: para
en: This method relies on the fact that, at the end of the installation, the installer's cdebconf database is saved to the installed system in <filename>/var/log/installer/cdebconf</filename>. However, because the database may contain sensitive information, by default the files are only readable by root.
zh_CN: 这种方法在安装的最后，安装程序的 cdebconf 数据库被保存到新安装系统的 <filename>/var/log/installer/cdebconf</filename> 文件。由于数据库里面常还有敏感的信息，默认只为 root 可读。

note: Tag: para
en: The directory <filename>/var/log/installer</filename> and all files in it will be deleted from your system if you purge the package <classname>installation-report</classname>.
zh_CN: 如果您清除 <classname>installation-report</classname> 软件包，那么 <filename>/var/log/installer</filename> 目录及其中的所有文件将从您的系统中删除。

note: Tag: para
en: To check possible values for questions, you can use <command>nano</command> to examine the files in <filename>/var/lib/cdebconf</filename> while an installation is in progress. View <filename>templates.dat</filename> for the raw templates and <filename>questions.dat</filename> for the current values and for the values assigned to variables.
zh_CN: 为了检测问题答案可用的值，您可以在安装进行中使用 <command>nano</command> 检查 <filename>/var/lib/cdebconf</filename> 下的文件。<filename>templates.dat</filename> 是原始的模板，<filename>questions.dat</filename> 是当前变量设置的值。

note: Tag: para
en: To check if the format of your preconfiguration file is valid before performing an install, you can use the command <command>debconf-set-selections -c <replaceable>preseed.cfg</replaceable></command>.
zh_CN: 为了在安装之前测试您的预置文件是否有效，您可以使用 <command>debconf-set-selections -c <replaceable>preseed.cfg</replaceable></command> 命令。

note: Tag: title
en: Contents of the preconfiguration file (for &releasename;)
zh_CN: 预置文件的内容(&releasename;)

note: Tag: para
en: Note that this example is based on an installation for the Intel x86 architecture. If you are installing a different architecture, some of the examples (like keyboard selection and bootloader installation) may not be relevant and will need to be replaced by debconf settings appropriate for your architecture.
zh_CN: 请注意，这里的例子是基于 Intel x86 架构的安装过程。如果您安装到其他架构，其中的一些例子(像键盘选择和 bootloader 安装)可能不恰当，需要用适合您架构的 debconf 设置替换。

note: Tag: para
en: Details on how the different Debian Installer components actually work can be found in <xref linkend="module-details"/>.
zh_CN: 有关不同 Debian 安装程序模块的工作细节，请参阅 <xref linkend="module-details"/>。

note: Tag: title
en: Localization
zh_CN: 本地化

note: Tag: para
en: During a normal install the questions about localization are asked first, so these values can only be preseeded via the initrd or kernel boot parameter methods. Auto mode (<xref linkend="preseed-auto"/>) includes the setting of <literal>auto-install/enable=true</literal> (normally via the <literal>auto</literal> preseed alias). This delays the asking of the localisation questions, so that they can be preseeded by any method.
zh_CN: 在一般的安装中，首先询问地区信息，所以这些值只通过 initrd 或内核引导参数方法来预置。自动模式（<xref linkend="preseed-auto"/>) 包括 <literal>auto-install/enable=true</literal> 的设置（通常通过<literal>auto</literal>预置别名）。这延迟询问地区问题，使它们可以被任何方法预置。

note: Tag: para
en: The locale can be used to specify both language and country and can be any combination of a language supported by &d-i; and a recognized country. If the combination does not form a valid locale, the installer will automatically select a locale that is valid for the selected language. To specify the locale as a boot parameter, use <userinput>locale=<replaceable>en_US.UTF-8</replaceable></userinput>.
zh_CN: locale 用于指定语言和国家或者任何 &d-i; 支持的语言与地区的组合。如果组合起来的不是有效的 locale，安装程序会自动选择一个指定语言可用的 locale。要在引导参数上指定本地，比如使用 <userinput>locale=<replaceable>en_US.UTF-8</replaceable></userinput>。

note: Tag: para
en: Although this method is very easy to use, it does not allow preseeding of all possible combinations of language, country and locale<footnote> <para> Preseeding <literal>locale</literal> to <userinput>en_NL</userinput> would for example result in <literal>en_US.UTF-8</literal> as default locale for the installed system. If e.g. <literal>en_GB.UTF-8</literal> is preferred instead, the values will need to be preseeded individually. </para> </footnote>. So alternatively the values can be preseeded individually. Language and country can also be specified as boot parameters.
zh_CN: 虽然这个方法很容易使用，但它无法预置所有的语言、国家和地方组合<footnote> <para> 比如预置 <literal>locale</literal> 为 <userinput>en_NL</userinput> 在安装后的系统中默认的 locale 将是 <literal>en_US.UTF-8</literal>。如果想使用 <literal>en_GB.UTF-8</literal>，该值应该分别进行预置。</para> </footnote>。因此另一种方法是单独预置各值。语言和国家可以在引导参数里面指定。

note: Tag: para
en: Keyboard configuration consists of selecting a keymap and (for non-latin keymaps) a toggle key to switch between the non-latin keymap and the US keymap. Only basic keymap variants are available during installation. Advanced variants are available only in the installed system, through <command>dpkg-reconfigure keyboard-configuration</command>.
zh_CN: 键盘配置包括选择的 keymap 和(对于非拉丁 keymap)切换键，该键用于非拉丁和 US keymap 来回切换。安装的时候只有几种基本的 keymap 可用。高级的要在安装好的系统下才能使用，使用 <command>dpkg-reconfigure keyboard-configuration</command> 配置。

note: Tag: para
en: To skip keyboard configuration, preseed <classname>keymap</classname> with <userinput>skip-config</userinput>. This will result in the kernel keymap remaining active.
zh_CN: 要跳过键盘配置，可通过 <userinput>skip-config</userinput> 来预置 <classname>keymap</classname>。这将导致内核 keymap 保持活动。

note: Tag: title
en: Network configuration
zh_CN: 网络设置

note: Tag: para
en: Of course, preseeding the network configuration won't work if you're loading your preconfiguration file from the network. But it's great when you're booting from optical disc or USB stick. If you are loading preconfiguration files from the network, you can pass network config parameters by using kernel boot parameters.
zh_CN: 显而易见，预置网络设置对于从网络加载预置文件无效。但对从光盘和 U 盘引导很有帮助。如果您计划从网络加载预置文件，应该使用传递网络设置给内核引导参数的方式。

note: Tag: para
en: If you need to pick a particular interface when netbooting before loading a preconfiguration file from the network, use a boot parameter such as <userinput>interface=<replaceable>eth1</replaceable></userinput>.
zh_CN: 如果您需要网络引导从网络加载预置文件前指定网卡，请用这种引导参数 <userinput>interface=<replaceable>eth1</replaceable></userinput>。

note: Tag: para
en: Although preseeding the network configuration is normally not possible when using network preseeding (using <quote>preseed/url</quote>), you can use the following hack to work around that, for example if you'd like to set a static address for the network interface. The hack is to force the network configuration to run again after the preconfiguration file has been loaded by creating a <quote>preseed/run</quote> script containing the following commands:
zh_CN: 虽然使用网络预置(用 <quote>preseed/url</quote>)通常并不能配置网络，但是您可以使用下面的技巧实现。例如，为网卡设置静态地址。它使加载了预置文件以后网络预置再运行一次，这需要将下面的命令包含在 <quote>preseed/run</quote> 脚本里面：

note: Tag: para
en: The following debconf variables are relevant for network configuration.
zh_CN: 下面的 debconf 变量与网络配置相关。

note: Tag: para
en: Please note that <command>netcfg</command> will automatically determine the netmask if <classname>netcfg/get_netmask</classname> is not preseeded. In this case, the variable has to be marked as <literal>seen</literal> for automatic installations. Similarly, <command>netcfg</command> will choose an appropriate address if <classname>netcfg/get_gateway</classname> is not set. As a special case, you can set <classname>netcfg/get_gateway</classname> to <quote>none</quote> to specify that no gateway should be used.
zh_CN: 请注意，如果 <classname>netcfg/get_netmask</classname> 没有预置，那么 <command>netcfg</command> 将自动侦测掩码。在这种情况下，变量必须标记为 <literal>seen</literal> 来自动安装。类似地，如果没有设置 <classname>netcfg/get_gateway</classname>，那么 <command>netcfg</command> 将选择一个合适的地址。特殊情况下，可以将 <classname>netcfg/get_gateway</classname> 设置为 <quote>none</quote>，来指定不使用网关。

note: Tag: title
en: Network console
zh_CN: 网络控制台

note: Tag: para
en: More information related to network-console can be found in <xref linkend="network-console"/>.
zh_CN: 关于网络控制台的更多信息，请参阅 <xref linkend="network-console"/>。

note: Tag: title
en: Mirror settings
zh_CN: 镜像设置

note: Tag: para
en: Depending on the installation method you use, a mirror may be used to download additional components of the installer, to install the base system, and to set up the <filename>/etc/apt/sources.list</filename> for the installed system.
zh_CN: 根据您使用的安装方式，镜像可用于下载安装程序的额外组件、安装基本系统以及为所安装的系统建立 <filename>/etc/apt/sources.list</filename>。

note: Tag: para
en: The parameter <classname>mirror/suite</classname> determines the suite for the installed system.
zh_CN: 参数 <classname>mirror/suite</classname> 决定了安装好的系统使用的套件。

note: Tag: para
en: The parameter <classname>mirror/udeb/suite</classname> determines the suite for additional components for the installer. It is only useful to set this if components are actually downloaded over the network and should match the suite that was used to build the initrd for the installation method used for the installation. Normally the installer will automatically use the correct value and there should be no need to set this.
zh_CN: 参数 <classname>mirror/udeb/suite</classname> 决定安装程序使用的额外组件的套件。它只在组件通过网络下载并与安装时使用的 initrd 建立套件相匹配时才有效。通常安装程序会自动安装并使用正确的值而毋需手动设置。

note: Tag: title
en: Account setup
zh_CN: 帐号设置

note: Tag: para
en: The password for the root account and name and password for a first regular user's account can be preseeded. For the passwords you can use either clear text values or crypt(3) <emphasis>hashes</emphasis>.
zh_CN: root 帐号的密码和第一个普通用户的名字和密码都可以预置。您可以给密码使用纯文本或 crypt(3) <emphasis>哈希</emphasis> 值。

note: Tag: para
en: Be aware that preseeding passwords is not completely secure as everyone with access to the preconfiguration file will have the knowledge of these passwords. Storing hashed passwords is considered secure unless a weak hashing algorithm like DES or MD5 is used which allow for bruteforce attacks. Recommended password hashing algorithms are SHA-256 and SHA512.
zh_CN: 要知道预置密码并不安全，每个可以访问预置文件的用户都可以看到这些密码。存储哈希密码被认为是安全的，除非使用了可以被暴力破解的弱哈希算法，如 DES 或 MD5。推荐的密码哈希算法为 SHA-256 和 SHA512。

note: Tag: para
en: The <classname>passwd/root-password-crypted</classname> and <classname>passwd/user-password-crypted</classname> variables can also be preseeded with <quote>!</quote> as their value. In that case, the corresponding account is disabled. This may be convenient for the root account, provided of course that an alternative method is set up to allow administrative activities or root login (for instance by using SSH key authentication or <command>sudo</command>).
zh_CN: <classname>passwd/root-password-crypted</classname> 和 <classname>passwd/user-password-crypted</classname> 变量也可以使用 <quote>!</quote> 作为它们的预置值。在这种情况下，相应的帐号关闭。这对于 root 帐号会比较方便，提供了替代方法来设置允许管理活动或 root 登录（例如通过使用 SSH 密钥认证或 <command>sudo</command>）。

note: Tag: para
en: The following command (available from the <classname>whois</classname> package) can be used to generate a SHA-512 based crypt(3) hash for a password:
zh_CN: 下面的命令（从 <classname>whois</classname> 软件包中获得）可用于生成密码的基于crypt(3)的 SHA-512 值：

note: Tag: title
en: Clock and time zone setup
zh_CN: 时钟与时区设置

note: Tag: title
en: Partitioning
zh_CN: 分区

note: Tag: para
en: Using preseeding to partition the harddisk is limited to what is supported by <classname>partman-auto</classname>. You can choose to partition either existing free space on a disk or a whole disk. The layout of the disk can be determined by using a predefined recipe, a custom recipe from a recipe file or a recipe included in the preconfiguration file.
zh_CN: 使用预置进行硬盘分区受限于 <classname>partman-auto</classname> 提供的支持。您可以选择使用磁盘上已有的空闲分区或者整个磁盘。磁盘的布局将取决于所使用的预定义方案，用户自定义的方案文件或预置文件包含的方案。

note: Tag: para
en: Preseeding of advanced partition setups using RAID, LVM and encryption is supported, but not with the full flexibility possible when partitioning during a non-preseeded install.
zh_CN: 已经支持包括 RAID、LVM 和加密高级分区设置的预置，但对于非预置安装的分区仍然弹性不足。

note: Tag: para
en: The examples below only provide basic information on the use of recipes. For detailed information see the files <filename>partman-auto-recipe.txt</filename> and <filename>partman-auto-raid-recipe.txt</filename> included in the <classname>debian-installer</classname> package. Both files are also available from the <ulink url="&url-d-i-doc-devel;">&d-i; source repository</ulink>. Note that the supported functionality may change between releases.
zh_CN: 下面的例子仅提供了使用方案的最基本信息。详细的内容清参考文件 <filename>partman-auto-recipe.txt</filename> 和 <filename>partman-auto-raid-recipe.txt</filename>，它们含在 <classname>debian-installer</classname> 软件包里。这两个文件也可以从 <ulink url="&url-d-i-doc-devel;">&d-i; source repository</ulink>获取。注意不同发布版支持的功能会有所改变。

note: Tag: para
en: The identification of disks is dependent on the order in which their drivers are loaded. If there are multiple disks in the system, make very sure the correct one will be selected before using preseeding.
zh_CN: 磁盘的标识基于对应驱动加载的次序。如果系统里面有多个磁盘，要确定预置使用了正确的那一个。

note: Tag: title
en: Partitioning example
zh_CN: 分区示例

note: Tag: title
en: Partitioning using RAID
zh_CN: 使用 RAID 分区

note: Tag: para
en: You can also use preseeding to set up partitions on software RAID arrays. Supported are RAID levels 0, 1, 5, 6 and 10, creating degraded arrays and specifying spare devices.
zh_CN: 您可以使用预置来建立软 RAID 阵列。支持 RAID 等级 0、1、5、6 和 10，建立降级阵列(degraded arrays)和指定额外设备。

note: Tag: para
en: If you are using RAID 1, you can preseed grub to install to all devices used in the array; see <xref linkend="preseed-bootloader"/>.
zh_CN: 如果是使用 RAID 1，您可以预置 grub 安装所有的阵列中的设备; 参见 <xref linkend="preseed-bootloader"/>。

note: Tag: para
en: This type of automated partitioning is easy to get wrong. It is also functionality that receives relatively little testing from the developers of &d-i;. The responsibility to get the various recipes right (so they make sense and don't conflict) lies with the user. Check <filename>/var/log/syslog</filename> if you run into problems.
zh_CN: 这种自动分区方式很容易出错。&d-i; 开发人员对它的功能只进行了相对较少的测试。让各种方案都正确(有意义而不冲突)的责任在于用户。如果您遇到问题，检查一下 <filename>/var/log/syslog</filename>。

note: Tag: title
en: Controlling how partitions are mounted
zh_CN: 分区挂载控制

note: Tag: para
en: Normally, filesystems are mounted using a universally unique identifier (UUID) as a key; this allows them to be mounted properly even if their device name changes. UUIDs are long and difficult to read, so, if you prefer, the installer can mount filesystems based on the traditional device names, or based on a label you assign. If you ask the installer to mount by label, any filesystems without a label will be mounted using a UUID instead.
zh_CN: 文件系统一般使用 UUID 作为关键字挂载; 这使得在设备名变更的情况下仍然可以正常挂载。UUID 本身很长不容易阅读，因此，安装程序也可以依照您的意愿使用传统设备名或者指定标签(label)挂载文件系统。假如安装程序使用标签方式，那些没有标签的文件系统仍然使用 UUID 方式挂载。

note: Tag: para
en: Devices with stable names, such as LVM logical volumes, will continue to use their traditional names rather than UUIDs.
zh_CN: 具有固定名称的设备，比如 LVM 逻辑卷，将继续使用它们自己的名字而不是 UUID 方式挂载。

note: Tag: para
en: Traditional device names may change based on the order in which the kernel discovers devices at boot, which may cause the wrong filesystem to be mounted. Similarly, labels are likely to clash if you plug in a new disk or a USB drive, and if that happens your system's behaviour when started will be random.
zh_CN: 传统设备名会根据内核在引导时发现的次序进行调整，这将导致挂载错误的文件系统。与此类似，假如您插入一个新磁盘或 USB 设备，标签也可能有冲突发生。这样系统启动后会出现一些随机的情况。

note: Tag: title
en: Base system installation
zh_CN: 基本系统安装

note: Tag: para
en: There is actually not very much that can be preseeded for this stage of the installation. The only questions asked concern the installation of the kernel.
zh_CN: 本阶段的安装并没有多少东西需要预置。仅有一个与内核安装相关的问题。

note: Tag: title
en: Apt setup
zh_CN: 设置 apt

note: Tag: para
en: Setup of the <filename>/etc/apt/sources.list</filename> and basic configuration options is fully automated based on your installation method and answers to earlier questions. You can optionally add other (local) repositories.
zh_CN: 设置 <filename>/etc/apt/sources.list</filename> 和其他的基本配置选项，将自动地基于您使用的安装方式以及前面问题的回答。您也可以选择性地安装其他(或本地)的仓库。

note: Tag: title
en: Package selection
zh_CN: 选择软件包

note: Tag: para
en: You can choose to install any combination of tasks that are available. Available tasks as of this writing include:
zh_CN: 您可以选择安装存在的任务的组合。本文编撰时已有的任务包括：

note: Tag: para
en: <userinput>standard</userinput> (standard tools)
zh_CN: <userinput>standard</userinput>（标准工具）

note: Tag: para
en: <userinput>desktop</userinput> (graphical desktop)
zh_CN: <userinput>desktop</userinput>（图形化桌面）

note: Tag: para
en: <userinput>gnome-desktop</userinput> (Gnome desktop)
zh_CN: <userinput>gnome-desktop</userinput> （Gnome 桌面）

note: Tag: para
en: <userinput>xfce-desktop</userinput> (XFCE desktop)
zh_CN: <userinput>xfce-desktop</userinput> （XFCE 桌面）

note: Tag: para
en: <userinput>kde-desktop</userinput> (KDE Plasma desktop)
zh_CN: <userinput>kde-desktop</userinput> （KDE Plasma 桌面）

note: Tag: para
en: <userinput>cinnamon-desktop</userinput> (Cinnamon desktop)
zh_CN: <userinput>cinnamon-desktop</userinput> （Cinnamon 桌面）

note: Tag: para
en: <userinput>mate-desktop</userinput> (MATE desktop)
zh_CN: <userinput>mate-desktop</userinput> （MATE 桌面）desktop)

note: Tag: para
en: <userinput>lxde-desktop</userinput> (LXDE desktop)
zh_CN: <userinput>lxde-desktop</userinput> （LXDE 桌面）

note: Tag: para
en: <userinput>web-server</userinput> (web server)
zh_CN: <userinput>web-server</userinput> （web 服务器）

note: Tag: para
en: <userinput>ssh-server</userinput> (SSH server)
zh_CN: <userinput>ssh-server</userinput> （SSH 服务器）

note: Tag: para
en: You can also choose to install no tasks, and force the installation of a set of packages in some other way. We recommend always including the <userinput>standard</userinput> task.
zh_CN: 您可以不选任务，并用其他方法安装一系列软件包。我们推荐选上 <userinput>standard</userinput> 任务。

note: Tag: para
en: Or if you don't want the tasksel dialog to be shown at all, preseed <classname>pkgsel/run_tasksel</classname> (no packages are installed via tasksel in that case).
zh_CN: 或者，如果您根本不希望 tasksel 对话框出现，请预置 <classname>pkgsel/run_tasksel</classname>（这种情况将不会通过 tasksel 安装任何软件包）。

note: Tag: para
en: If you want to install some individual packages in addition to packages installed by tasks, you can use the parameter <classname>pkgsel/include</classname>. The value of this parameter can be a list of packages separated by either commas or spaces, which allows it to be used easily on the kernel command line as well.
zh_CN: 如果您打算安装一些安装任务之外的独立软件包，可以使用参数 <classname>pkgsel/include</classname>。该参数的值可以是用逗号或空格分开的软件包列表，便于在内核命令行上使用。

note: Tag: title
en: Boot loader installation
zh_CN: 安装 bootloader

note: Tag: para
en: An MD5 hash for a password for <classname>grub</classname> can be generated using <command>grub-md5-crypt</command>, or using the command from the example in <xref linkend="preseed-account"/>.
zh_CN: <classname>grub</classname> 使用的密码 MD5 值可以使用 <command>grub-md5-crypt</command> 生成，或者使用 <xref linkend="preseed-account"/> 例子中的命令。

note: Tag: title
en: Finishing up the installation
zh_CN: 完成安装

note: Tag: screen
en: # During installations from serial console, the regular virtual consoles
    # (VT1-VT6) are normally disabled in /etc/inittab. Uncomment the next
    # line to prevent this.
    #d-i finish-install/keep-consoles boolean true
    
    # Avoid that last message about the install being complete.
    d-i finish-install/reboot_in_progress note
    
    # This will prevent the installer from ejecting the disc during the reboot,
    # which is useful in some situations.
    #d-i cdrom-detect/eject boolean false
    
    # This is how to make the installer shutdown when finished, but not
    # reboot into the installed system.
    #d-i debian-installer/exit/halt boolean true
    # This will power off the machine instead of just halting it.
    #d-i debian-installer/exit/poweroff boolean true
zh_CN: # During installations from serial console, the regular virtual consoles
    # (VT1-VT6) are normally disabled in /etc/inittab. Uncomment the next
    # line to prevent this.
    #d-i finish-install/keep-consoles boolean true
    
    # Avoid that last message about the install being complete.
    d-i finish-install/reboot_in_progress note
    
    # This will prevent the installer from ejecting the disk during the reboot,
    # which is useful in some situations.
    #d-i cdrom-detect/eject boolean false
    
    # This is how to make the installer shutdown when finished, but not
    # reboot into the installed system.
    #d-i debian-installer/exit/halt boolean true
    # This will power off the machine instead of just halting it.
    #d-i debian-installer/exit/poweroff boolean true

note: Tag: title
en: Preseeding other packages
zh_CN: 预置其他的软件包

note: Tag: title
en: Advanced options
zh_CN: 高级选项

note: Tag: title
en: Running custom commands during the installation
zh_CN: 安装过程中运行用户命令

note: Tag: para
en: 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.
zh_CN: 预置工具提供了一个非常强大和灵活的选项，可以在安装过程的一些环节运行命令或脚本。

note: Tag: para
en: When the filesystem of the target system is mounted, it is available in <filename>/target</filename>. If an installation CD/DVD is used, when it is mounted it is available in <filename>/cdrom</filename>.
zh_CN: 当目标系统的文件系统挂载后，它可以在 <filename>/target</filename> 中使用。如果使用安装 CD/DVD，则挂载后可以在 <filename>/cdrom</filename> 中使用。

note: Tag: title
en: Using preseeding to change default values
zh_CN: 使用预置修改默认值

note: Tag: para
en: 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. <informalexample><screen>
    d-i foo/bar string value
    d-i foo/bar seen false
    </screen></informalexample> The same effect can be achieved for <emphasis>all</emphasis> questions by setting the parameter <classname>preseed/interactive=true</classname> at the boot prompt. This can also be useful for testing or debugging your preconfiguration file.
zh_CN: 也可以使用预置修改问题的默认答案，但同时显示问题。这需要在问题设定值之后，必须将 <firstterm>seen</firstterm> 旗标重置为 <quote>false</quote>。<informalexample><screen>
    d-i foo/bar string value
    d-i foo/bar seen false
    </screen></informalexample> 要对<emphasis>所有</emphasis>问题达到同样效果，可以通过在启动引导符后面设置 <classname>preseed/interactive=true</classname>。这对于测试和调试您的预置文件很有帮助。

note: Tag: para
en: Note that the <quote>d-i</quote> owner should only be used for variables used in the installer itself. For variables belonging to packages installed on the target system, you should use the name of that package instead. See the footnote to <xref linkend="preseed-bootparms"/>.
zh_CN: 注意，<quote>d-i</quote> owner 只应该用于安装程序里面的变量。对于那些属于目标系统软件包的变量，您应该使用软件包的名字替代。请参考 <xref linkend="preseed-bootparms"/> 的脚注。

note: Tag: para
en: If you are preseeding using boot parameters, you can make the installer ask the corresponding question by using the <quote>?=</quote> operator, i.e. <userinput><replaceable>foo</replaceable>/<replaceable>bar</replaceable>?=<replaceable>value</replaceable></userinput> (or <userinput><replaceable>owner</replaceable>:<replaceable>foo/bar</replaceable>?=<replaceable>value</replaceable></userinput>). This will of course only have effect for parameters that correspond to questions that are actually displayed during an installation and not for <quote>internal</quote> parameters.
zh_CN: 如果使用引导参数预置，您可以通过 <quote>?=</quote> 操作符让安装程序询问相关的问题，例如，<userinput><replaceable>foo</replaceable>/<replaceable>bar</replaceable>?=<replaceable>value</replaceable></userinput> (或者 <userinput><replaceable>owner</replaceable>:<replaceable>foo/bar</replaceable>?=<replaceable>value</replaceable></userinput>)。当然，这只会影响在安装时显示出来的问题对应的参数，而不是<quote>内部的</quote>参数。

note: Tag: para
en: For more debugging information, use the boot parameter <classname>DEBCONF_DEBUG=5</classname>. This will cause <classname>debconf</classname> to print much more detail about the current settings of each variable and about its progress through each package's installation scripts.
zh_CN: 获得更多的调试信息，需使用引导参数 <classname>DEBCONF_DEBUG=5</classname>。这将让 <classname>debconf</classname> 打印更多的细节，包括当前变量设置和每个软件包安装脚本的进度。

note: Tag: title
en: Chainloading preconfiguration files
zh_CN: 预置文件链

note: Tag: para
en: It is possible to include other preconfiguration files from a preconfiguration file. Any settings in those files will override pre-existing settings from files loaded earlier. This makes it possible to put, for example, general networking settings for your location in one file and more specific settings for certain configurations in other files.
zh_CN: 可以在一个预置文件里面包含另外的预置文件。这些文件里面的任何设置将覆盖前面加载的设置。有一种用法，例如，通用的网络设置放在一个文件，其他规格的设置放在另外的文件里面。

note: Tag: para
en: 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.
zh_CN: 也可以通过在前面设置 preseed/url 从 initrd 或者文件预置链载进入网络预置。这将使网络预置在网络连通时执行。您应该小心使用，因为这是两种预置，意味着您有机会执行 preseed/early 命令，第二个可以在网络连通后使用。
