B.2. Using preseeding

Of course you will first need to create a preseed file and place it in the location from where you want to use it. Creating the preseed 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 floppy or usb-stick. If you want to include the file on a CD or DVD, you will have to remaster the ISO image. How to get the preseed file included in the initrd is outside the scope of this document; please consult the developers documentation for debian-installer.

An example preseed file that you can use as basis for your preseed file is available from ../example-preseed.txt. This file is based on the configuration fragments included in this appendix.

B.2.1. Loading the preseed file

If you are using initrd preseeding, you only have to make sure a file named preseed.cfg is included in the root directory of the initrd. The installer will automatically check if this file is present and load it.

For the other preseeding methods you need to tell the installer what file to use when you boot it. This is done by passing the kernel a boot parameter, either manually at boot time or by editing the bootloader configuration file (e.g. syslinux.cfg) and adding the parameter to the end of the append line(s) for the kernel.

If you do specify the preseed file in the bootloader configuration, you might change the configuration so you don't need to hit enter to boot the installer. For syslinux this means setting the timeout to 1 in syslinux.cfg.

To make sure the installer gets the right preseed file, you can optionally specify a checksum for the file. Currently this needs to be a md5sum, and if specified it must match the preseed file or the installer will refuse to use it.

Boot parameters to specify:
- if you're netbooting:
  preseed/url=http://host/path/to/preseed.cfg
  preseed/url/checksum=5da499872becccfeda2c4872f9171c3d

- if you're booting a remastered CD:
  preseed/file=/cdrom/preseed.cfg
  preseed/file/checksum=5da499872becccfeda2c4872f9171c3d

- if you're installing from USB media (put the preseed file in the
  toplevel directory of the USB stick):
  preseed/file=/hd-media/preseed.cfg
  preseed/file/checksum=5da499872becccfeda2c4872f9171c3d

While you're at it, you may want to add a boot parameter debconf/priority=critical. This will avoid most questions even if the preseeding below misses some.

B.2.2. Using boot parameters to supplement preseeding

Some parts of the installation process cannot be automated using some forms of preseeding because the questions are asked before the preseed file is loaded. For example, if the preseed file is downloaded over the network, the network setup must be done first. One reason to use initrd preseeding is that it allows preseeding of even these early steps of the installation process.

If a preseed file cannot be used to preseed some steps, the install can still be fully automated, since you can pass preseed values to the kernel on the command line. Just pass path/to/var=value for any of the preseed variables listed in the examples.

Note

The 2.4 kernel accepts a maximum of 8 command line options and 8 environment options (including any options added by default for the installer). If these numbers are exceeded, 2.4 kernels will drop any excess options and 2.6 kernels will panic. For kernel 2.6.9 and later, you can use 32 command line options and 32 environment options.

For most installations some of the default options in your bootloader configuration file, like 'vga=normal', may be safely removed which may allow you to add more options for preseeding.

Note

It may not always be possible to specify values with spaces for boot parameters, even if you delimit them with quotes.