Create PXE autoinstall image from running system (Debian)

Galmi asked:

I need to create a PXE boot image from running system. I already tried remastersys, live-boot, relinux and other available software but none of them meets my requirements. Tools like remastersys or relinux can create live image from my Debian but without any support for automatic installation, which is my primary requirement.

Is there any tool to creating autoinstalling image from running system? Or to create a Debian preseed file? I also prefer a tool which can create these images automatically, without any manual intervention like modifying a default Debian netboot installer ISO. These images will be deployed by Cobbler if it matters.

I answered:

The Debian manual indicates a method of generating a partial preseed file from a running system:

An alternative method is to do a manual installation and then, after rebooting, use the debconf-get-selections from the debconf-utils package to dump both the debconf database and the installer’s cdebconf database to a single file:

$ debconf-get-selections --installer > file
$ debconf-get-selections >> file

However, a file generated in this manner will have some items that should not be preseeded, and the example file is a better starting place for most users.

Given the warning here, you should inspect this file carefully before using it. You may find it better to simply create your own preseed files and use them to automate your installations.

View the full question and answer on Server Fault.

Creative Commons License
This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 Unported License.