Debian Preseed – How Does Preseed Install Work?

debianpreseed

I am trying to create an automated installer for my debian server, so if the hardware breaks, my employees can reinstall it without selecting languages, adding users and most importantly without having to call the IT dept. I read all the documentations related to preseed files on debian's website but I could not make it work. I already created the preseed.cfg file and it should be working, but the installer never recognises it. I even tried a third party script, that embeds my preseed file to the ISO but it did not work either (was unable to boot from USB). Could anyone provide a simple step-by-step guide on where should I put the preseed.cfg and how to launch the installer in a way it actually uses that file?

[UPDATE]

This is what I did so far:

1) I created a pressed.cfg file, based on the example file on debian's website.

2) I made an USB debian installer (Tried with both dd command and rufus) both worked WITHOUT the preseed file.

3) I copied preseed.cfg to the USB root and also to a folder called 'preseed' (I read it somewhere that it might help).

4) Started the PC, booted from the USB.

5) Selected the automated install option, pressed TAB key to open up the parameter editor and added "preseed/file=/hd-media/preseed.cfg".

At this point I either get an error message saying the preseed file not found or my boot parameter get completely ignored and a normal install start.

This is the error message I get:

Failed to retrieve the preconfiguration file

The file needed for preconfiguration could not be retrieved from /hd-media/preseed.cfg.
The installation will proceed in non-automated mode.

I really want to avoid hosting the preseed file on my site because I do not want to expose my server settings.

Best Answer

Preseed files can work many ways. The specific details gets can get pretty complicated and be different based on your hardware.

Assuming your installer supports your network hardware, one way is to pass the installer a url to the preseed file.

Another way is to modify the initrd.gz and embed the file in there.

You can provide the preseed via DHCP server.

You can place it in a file on a CD image.

In almost all cases you do have to pass an additional parameter in the boot command line, so you need to update install media bootloader in addition to placing the file.

The installation guide does provide most of the general information you would need.

Since you mentioned USB media to boot, you probably want to see the section B.2.1 which mentions what where to place the file and the boot options you need.

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