Create/Update Simple-CDD Profile

While inside a workspace, you can create/update your a profile. This section guides you on how to create/update profiles.

Storing Location

All profile files are stored in the workspace's ./profiles directory.

Profile Filesystem

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.filetype

PROFILE_NAME.downloads

This 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.

PROFILE_NAME.excludes

This file is responsible to kick included packages out of the ISO image.

PROFILE_NAME.packages

This file is responsible for installing the packages after Debian is installed. Some useful software would be:

# install firewall as default
ufw

# tree mechanism to list directory
tree

PROFILE_NAME.preseed

This 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.txt
buster = https://www.debian.org/releases/buster/example-preseed.txt
jessie = https://www.debian.org/releases/jessie/example-preseed.txt

Main source = https://salsa.debian.org/debian/simple-cdd/blob/master/profiles/default.preseed

Some very useful inclusion looks like:

## use non-free and contrib settings
d-i apt-setup/non-free boolean true
d-i apt-setup/contrib boolean true

Each parts has its own meaning.

  1. d-i = Debian Installer settings
  2. apt-setup = section name
  3. non-free = section item
  4. boolean = setting type
  5. true = setting value

PROFILE_NAME.udebs

These 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 packages
firmware-realtek
firmware-atheros
firmware-brcm80211
firmware-ipw2x00
firmware-iwlwifi
firmware-linux
firmware-ralink
firmware-ti-connectivity

PROFILE_NAME.postinst

This 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/sh
1>&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.