Raspberry Pi has introduced plans emigrate away from its present in-house working system customization method — a easy shell script dubbed firstrun.sh — in direction of cloud-init, and has printed steerage on how customers can attempt it out now.
“As a few of you’ll have already observed, the newest Raspberry Pi OS launch based mostly on Debian Trixie now consists of cloud-init,” Raspberry Pi’s Paul Oberosler explains. “This marks the start of a transition away from our legacy first-boot customization system based mostly on the firstrun.sh script. Cloud-init is a cross-platform, distribution-agnostic software used to robotically configure programs on first boot. (Definition tailored from the official cloud-init documentation.) With it, you possibly can provision your Raspberry Pi photos with customers, community settings, SSH keys, storage configurations, and far more — all with out manually logging in after flashing the picture.”
Raspberry Pi has introduced it’s transferring to cloud-init for first-boot configuration in Raspberry Pi OS. (📷: Raspberry Pi)
Born from the community-driven Raspbian Linux distribution, Raspberry Pi OS takes Debian Linux and customizes it for the corporate’s eponymous single-board pc and computer-on-module households. A part of this consists of performing duties on first boot, together with resizing the partitions to fill storage, which was historically carried out utilizing an in-house script known as firstrun.sh. Anybody trying to do their very own customization on first boot might edit this script, and whereas that is nonetheless supported for now the corporate is transferring in direction of a extra sturdy and cross-platform method: cloud-init.
In a cloud-init system three YAML-format configuration recordsdata are positioned within the boot partition, accessible from any Linux, Home windows, or macOS machine: meta-data, network-config, and user-data. The final two are the fascinating ones, permitting the consumer to arrange a default set of customers and residential folders, configure the Wi-Fi and wired networks, arrange SSH entry, and — due to some helpful extensions — arrange Raspberry Pi-specific options like I2C, SPI, UART buses, and USB Gadget mode.
The brand new Raspberry Pi Imager 2.0 already creates the required configuration recordsdata. (📷: Raspberry Pi)
“With the discharge of Raspberry Pi Imager 2.0, cloud-init configuration for Raspberry Pi OS is now generated by default,” Oberosler says. “This makes it simple to additional customise your setup after writing the picture — merely edit the generated user-data or network-config recordsdata on the boot partition. Imager 2.0 additionally understands the Raspberry Pi–particular rpi: choices, so options like SPI or I2C may be enabled straight within the customization UI. The legacy technique nonetheless works, however cloud-init and Netplan open the door to a way more versatile and fashionable workflow. We’ll proceed increasing assist for Raspberry Pi-specific cloud-init modules and streamlined provisioning options in future releases.”
Extra data, together with hyperlinks to documentation, is obtainable on the Raspberry Pi weblog.

