Most of the questions asked by DebianInstaller can be preseeded by setting the answers in the debconf database. This can be used to do automatic installs. This page gathers our collective knowledge on the topic, so please add any tips you have.
There are currently two main mechanisms to preseed debconf values. Values can be set on the installer's boot line, for example this is useful for testing the unstable version of the installer in a netboot install:
The preseed udebs can be used to load a file containing values to preseed, either from the network or local media. The installation manual explains how to set this up: http://d-i.alioth.debian.org/manual/en.i386/ch04s07.html#automatic-install and includes a complete example. Note that you can check preseed-files for errors with "debconf-set-selections -c $file".
Also note that most preseeding support has been added after rc1 of the installer.
If you need the preseeding feature for a fully automated installation in a network with dhcp server be careful to not exceed the maximum of eight parameters for the kernel to boot. This could be a slight problem if you want to use a different language, keymap and country. Another fact: if you want to use dhcp to set the hostname and domain automatically, you need to pass "debconf/priority=critical" to the kernel at boot time and set "d-i netcfg/get_hostname" and "d-i netcfg/get_domain" to "string unassigned-hostname" and "string unassigned-domain".
Problems when downloading the installer packages from the local network ftp using the sarge proftpd - server? From woody to sarge there was a new delay module compiled into proftpd, which should be disabled with the entry ?DelayEngine off in /etc/proftpd.conf. If not there will be errors when downloading on random packages. Of course you can retry the download and now this package works, but then it is not really automagically preseeded.
Post here any links you have to example preseed files. Note that using any of these files directly is not wise, as a malicious person could probably come up with values for a preseed file that makes d-i misbehave. Also, the files are downloaded over http, so are vulnerable to man in the middle spoof attacks. The best way to use any preseed file is to copy it to your own local web server or media, and look it over before using it.
Joey Hess's modular/hierarchical preseed configuration, supporting installs via usb keychain or netboot with varying configurations for different machine types. http://kitenet.net/~joey/d-i/preseed
Christian Perrier's page documenting automated d-i installs in vmware, using netboot. http://people.debian.org/~bubulle/d-i/vmware-fai.html
Simon Kirkby's fully automatic basic install. !Warning! will format machine without asking. http://interthingy.com/digby
Holger Levsen's d-i examples showing a way to preserve partitions and ssh-host-keys: http://layer-acht.org/d-i/
Using network-console and preseeding is described on an extra page, ?DebianInstallerNetworkConsole
Phil Hands' d-i setup, that allows minimal (i.e. no exim) installs, works from CD, PXE & USB (read the HOWTO's), and allows custom configs to be specified at the boot: prompt http://hands.com/d-i/
Do not work of a debconf-get-selections (--installer) generated preseed.cfg but get the values from it and modify http://www.debian.org/releases/sarge/example-preseed.txt with them.
- Be aware there is only one space in preseed files between subkey and value on "owner key/subkey value" lines. debconf-get-selections generates extra spaces.
Kernel parameters. The total length is not to exceed 255/225(?) characters, (2.6.8); kernels >= 2.6.9 should be able to handle up to 32 parameters.
Having a preseed.cfg file in the root of the initrd.gz, as mentioned here: http://lists.debian.org/debian-boot/2005/03/msg01061.html only works with recent daily builds, and is not a feature present in ["RC3"] (see http://lists.debian.org/debian-devel-changes/2004/12/msg00963.html )
The following parameters can not be preseeded any other way then from the kernel commandline : "languagechooser/language-name=English" "countrychooser/shortlist=US", "console-keymaps-at/keymap=us" and "netcfg/choose_interface=eth0||auto". (unless using the initrd /preseed.cfg trick above)
- When a preseed install stops unexpectedly on partman, the following line maybe is missing from your preseed.cfg (beware, this fsck's up your drive real good!) preseed.cfg:
d-i partman/confirm boolean true
- As Joey said, do not use /preseed.cfg in your initrd.gz (I should have listened). I tried hard and failed, it couldn't get the local mirror. Using the exact same preseed file with preseed/url=... worked like a charm.
- To reboot automatically at the end of the 1st stage, add in preseed.cfg:
d-i prebaseconfig/reboot_in_progress note
- Do not change directories, unless you can restore to them in the base-config/late_command command because this prevents the menu from functioning. This is especially true if you run a full-auto install, because the menu still runs, under water, and directs your install.
- Do not reboot in the base-config/late_command command, the installation process will start again at the start of the 2nd stage.