预置提供了一种在安装过程中回答问题,而无须手动键入答案的途径。这让完全自动进行大多数的安装成为可能,并提供了一些普通安装方式下不具备的特性。
预置文件并非必须。如果您使用空的预置文件,安装程序就会跟正常手动安装一样。每个问题的预置(如果使用正确!)都会以同样的方式修改对应的基准。
一共有三种方法可用于预置: initrd、file 和 network。initrd 方法可以用于任何一种安装方式并支持较多的预置内容,但它需要做的准备工作也最多。file 和 network 方法分别用于不同的安装方式。
下面的表格显示了各种安装方式可选择的预置方法。
安装方式 | initrd | file | network |
---|---|---|---|
CD/DVD | yes | yes | yes[a] |
netboot | yes | no | yes |
硬盘 | yes | yes | yes[a] |
基于软盘 (cd-drivers) | yes | yes | yes[a] |
基于软盘 (net-drivers) | yes | no | yes |
[a] 除非您有网络并正确设置 |
这些预置方法的主要不同之处在于何时预置文件被加载和处理。对于 initrd 方法,它是在第一个问题询问之前,安装开始的时候。对于 file 方法,它是在加载 CD 或 CD 映像之后。对 network 方法,它在网络配置完毕之后。
![]() |
重要 |
---|---|
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 第 B.2.2 节 “使用引导参数预置问题的答案”. In order to easily avoid the questions that would normally appear before the preseeding occurs, you can start the installer in “auto” 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 第 B.2.3 节 “auto 模式” for details. |