While inside a workspace, you can create/update your a profile. This section guides you on how to create/update profiles.
All profile files are stored in the workspace's ./profiles directory.
Before starting, we should understand how profile files works. Firstly, all profiles follow a naming pattern that acts as its unified label. Hence they follows this pattern:
PROFILE_NAME.filetypeThis file is responsible for making deb/udeb packages available on ISO regardless of being used/installed during the installation process. Its goal is to ensure the packages are always available in the ISO image.
This file is responsible to kick included packages out of the ISO image.
This file is responsible for installing the packages after Debian is installed. Some useful software would be:
# install firewall as defaultufw# tree mechanism to list directorytreeThis file feeds the installer with default actions and values like reply “Yes”, “No”, disabling prompt, etc. The huge list is available depending on your distribution here:
stable = https://www.debian.org/releases/stable/example-preseed.txtbuster = https://www.debian.org/releases/buster/example-preseed.txtjessie = https://www.debian.org/releases/jessie/example-preseed.txtMain source = https://salsa.debian.org/debian/simple-cdd/blob/master/profiles/default.preseedSome very useful inclusion looks like:
## use non-free and contrib settingsd-i apt-setup/non-free boolean trued-i apt-setup/contrib boolean trueEach parts has its own meaning.
d-i = Debian Installer settingsapt-setup = section namenon-free = section itemboolean = setting typetrue = setting valueThese are installer software packages for Debian to use during installation. It will not carry forward to target's packages. Some highly useful inclusion would be those network firmware repository:
# firmware packagesfirmware-realtekfirmware-atherosfirmware-brcm80211firmware-ipw2x00firmware-iwlwififirmware-linuxfirmware-ralinkfirmware-ti-connectivityThis is the post installation SHELL script executed after the operating system is installed. Since it is a SHELL script, you must grant executable permission to it ($ chmod +x PROFILENAME.postinst). The script should be written in a way that you're already using the operating system, not on RAM disk.
For multiple profiles, script executions is based on the profiles list position. Hence, you have to be careful with the positioning to avoid code conflicts. For simplification, you should write each scripts as an independent script (rather than source one another).
For safety, use POSIX SHELL script instead of BASH script to maximize compatibility. Example:
#!/bin/sh1>&2 echo "executing PROFILE_NAME.postinst"Once you're done, you can proceed to the next stage: creating conf file. You can find the guide in index page.