B.1. 介绍



B.1.1. 预置方法

一共有三种方法可用于预置: initrdfilenetwork。initrd 方法可以用于任何一种安装方式并支持较多的预置内容,但它需要做的准备工作也最多。file 和 network 方法分别用于不同的安装方式。


安装方式 initrd file network
CD/DVD yes yes yes[a]
netboot yes no yes
硬盘 (包括 U 盘) yes yes yes[a]

[a] 除非您有网络并正确设置 preseed/url

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 CD or CD image has been loaded. For network preseeding it is only after the network has been configured.

[重要] 重要

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.

B.1.2. 限制

虽然使用这种方法能预先设置 debian-installer 的绝大多数问答,但还是有明显的例外。您必须(重新)分区整个硬盘,或者使用磁盘上的剩余空间; 但无法使用已经存在的分区。