Raspberry Pi is transitioning from its firstrun.sh script to cloud-init for more robust and cross-platform OS customization on first boot, offering greater flexibility in configuration.
Cloud-init is a cross-platform, distribution-agnostic tool used to automatically configure systems on first boot. Raspberry Pi is transitioning from its older `firstrun.sh` script to cloud-init for customizing Raspberry Pi OS.
Instead of modifying a single script, cloud-init uses three YAML configuration files (meta-data, network-config, and user-data) placed on the boot partition. These files allow users to configure things like:
* Users and home folders
* Network settings (Wi-Fi and wired)
* SSH access
* Raspberry Pi-specific features (I2C, SPI, UART buses, USB Gadget mode)
Raspberry Pi Imager 2.0 now generates these configuration files by default, making customization easier. Cloud-init offers a more flexible and modern workflow for provisioning Raspberry Pi images.