Tools and (above all) reasonable configs to create custom Debian ISO images
The Debian GNU/Linux Installation Guide refers to preseeding
as a "way to set answers to questions asked during the installation process, without having to manually enter the answers". This provides for a method to automate installations as much as possible: almost zero-click!
The process starts by means of two files included in this repository:
preseed_cfg.tmpl
: a reasonably complete preseed file, see an example here, which must be customized through...dicustomizer.sh
: an interactive Bash script which asks questions, such ashostname
,IP address
, and will produce the actualpreseed.cfg
file
Once the preseed file is available an ISO file must be fabricated by injecting `preseed.cfg` into `initrd`. Additional customization is done on `isolinux` to start the installation without requiring any input from the user.
The ISO file is based on an official Debian installation ISO, e.g. `debian-12.4.0-amd64-netinst.iso`, which must be downloaded separately.
- Set up the directory structure
$ ./preseed_init.sh -d .
[+] Creating/updating hierarchy in directory '.'
[!] Directory . already exists, skipping...
[+] NEW directory ./destination_iso created, OK
[+] NEW directory ./source_iso created, OK
[+] NEW directory ./workdir created, OK
[+] NEW directory ./loopdir created, OK
- Download the source ISO file
$ curl -sSLfO https://cdimage.debian.org/debian-cd/current/amd64/iso-cd/debian-12.4.0-amd64-netinst.iso
$ mv debian-12.4.0-amd64-netinst.iso source_iso/
- Generate the customized
preseed.cfg
$ ./dicustomizer.sh
- Finally, create the customized ISO
$ sudo ./mkiso_preseed.sh
NOTE: root credentials needed