rpi-preseed

device v1.0.0

First boot OS customisation with rpi-preseed

Additional Documentation

This layer installs rpi-preseed, which applies a per-device configuration from file once at first boot. The configuration file is supplied for each device. This layer does not install one.

Slotted images

On a slotted image, this layer automatically pulls in rpi-preseed-slotted which ensures the files written by the domains in IGconf_rpipreseed_domains are retained across reboots and slot updates. rpi-preseed’s state is shared by all slots, meaning a configuration is applied once per device, not once per slot. Files rpi-preseed writes that are owned by other software are declared by other applicable layers, eg NetworkManager Connections by network-manager. Files of a domain that isn’t selected do not persist.

Typically, the configuration file is installed at device provisioning rather than image build, so it has to be supplied on a writable partition. See the rpi-preseed documentation for where it can read its configuration from. An example drop-in for rpi-preseed.service that sets the location:

# /usr/lib/systemd/system/rpi-preseed.service.d/config.conf
[Unit]
ConditionPathExists=
ConditionPathExists=/persistent/rpi-preseed.toml
ConditionPathExists=!/var/lib/rpi-preseed/applied

[Service]
Environment=RPI_PRESEED_CONFIG=/persistent/rpi-preseed.toml

Relationships

Provides: boot:os-customisation:rpi-preseed

Requires Provider: systemd, hw:device:rpi

mmdebstrap

Packages

Installs:

Attributes

File: rpi/device/provisioning/rpi-preseed.yaml

Type: static