Differences between revisions 1 and 45 (spanning 44 versions)
Revision 1 as of 2004-10-05 02:52:52
Size: 2034
Editor: anonymous
Comment:
Revision 45 as of 2005-05-04 15:31:10
Size: 4268
Editor: anonymous
Comment:
Deletions are marked like this. Additions are marked like this.
Line 3: Line 3:
Most of the questions asked by d-i 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. 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.
Line 6: Line 6:
Values can be set on the installer's boot line, for example: 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:
Line 8: Line 8:
  linux debconf/priority=critical   linux mirror/suite=unstable
Line 11: Line 11:
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#id2511063 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".
Line 13: Line 14:
Note that most preseeding support has been added after rc1 of the installer. Also note that most preseeding support has been added after rc1 of the installer.
Line 15: Line 16:
= Preseeding language and country =
Since these questions come before the preseed udebs do their work, language and country can only be preseeded when the installer is booted, perhaps via a modified syslinux.cfg file.
Here's an example:
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".

= Examples =
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

= Hard won knowledge I =
There are several ways to overcome the limitation of 255/225(?) characters on the kernel command line, such as using local preseed files. This gem
http://lists.debian.org/debian-boot/2005/03/msg01061.html
states that a local preseed.cfg will automatically be used when placed
in the root directory of the initrd.

= Hard won knowledge II =
add "languagechooser/language-name=English" to the append line of your boot loader, it can't be preseeded any other way. (Thanks, Christian Perrier)

= Hard won knowledge III =
To make partman continue automatically, be sure to have the partman/confirm
set to true in your preseed. (Beware, this fsck's up your drive real good!)
preseed.cfg:
Line 19: Line 41:
  languagechooser/language-name=French
  countrychooser/country-name-shortlist=France
  countrychooser/country-name=France
  d-i partman/confirm boolean true
Line 24: Line 44:
Apparently two values in countrychooser must be seeded (why?). (Thanks, Christian Perrier)
Line 26: Line 46:
= Preseeding mirror =
If you're doing a netboot install or the like, it's nice to be able to preseed a mirror to use. Here's an example in preseed file format, that makes it use a manually entered mirror:
{{{
  d-i mirror/country string enter information manually
  d-i mirror/http/hostname string your-mirror-name-here
  d-i mirror/http/directory string /debian
  d-i mirror/suite string unstable
  #d-i mirror/http/proxy string http://10.11.12.1:3128/
}}}
= Hard won knowledge IV =
As Joey said, do not use /preseed.cfg in your initrd.gz (I should have listened). I tried it and failed, it couldn't get the local mirror. Using the exact same preseed file with preseed/url=... worked like a charm. Now I got to find the way to make it reboot automatically at the end of the installation process ;-)
Line 36: Line 49:
= Preseeding partman =
Realistically, only the automatic partitioning choices of partman can be preseeded. To get any more control, you really want to provide a partman-auto recipe (how?). Here's one value that should work as of a few days ago:
{{{
  d-i partman/confirm boolean true
}}}
= how to easier win knowledge =
 * read the fine manual at http://d-i.alioth.debian.org/manual
 * espcially the chapter about preseeding at http://d-i.alioth.debian.org/manual/en.i386/ch04s07.html
 * study the preseeding example in the manual at http://d-i.alioth.debian.org/manual/en.i386/apcs01.html
 * it contains - at least - "hard won knowledge II-IV" ;-)
 * "hard won knowlegde I" should be moved to ["DebianInstallerFAQ"]

----

Preseeding d-i

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:

  linux mirror/suite=unstable

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".

Examples

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.

Hard won knowledge I

There are several ways to overcome the limitation of 255/225(?) characters on the kernel command line, such as using local preseed files. This gem http://lists.debian.org/debian-boot/2005/03/msg01061.html states that a local preseed.cfg will automatically be used when placed in the root directory of the initrd.

Hard won knowledge II

add "languagechooser/language-name=English" to the append line of your boot loader, it can't be preseeded any other way. (Thanks, Christian Perrier)

Hard won knowledge III

To make partman continue automatically, be sure to have the partman/confirm set to true in your preseed. (Beware, this fsck's up your drive real good!) preseed.cfg:

  d-i   partman/confirm                 boolean true

(Thanks, Christian Perrier)

Hard won knowledge IV

As Joey said, do not use /preseed.cfg in your initrd.gz (I should have listened). I tried it and failed, it couldn't get the local mirror. Using the exact same preseed file with preseed/url=... worked like a charm. Now I got to find the way to make it reboot automatically at the end of the installation process ;-)

how to easier win knowledge