Skip to main content

Tests Lint Python versions License: MIT Ruff

logo

piburn turns removable microSD cards into ready-to-boot Ubuntu Server nodes for a Raspberry Pi cluster. It downloads and verifies the latest stable Raspberry Pi image, writes cloud-init configuration, safely ejects each card, and optionally generates an Ansible inventory.

The tool is intentionally conservative: it only offers physical, writable, removable media of at least 4 GiB and verifies that the selected device has not changed before destructive operations.

Table of Contents

Installation

piburn requires macOS and Python 3.8 or newer. It has no third-party runtime dependencies.

Install it:

pip install piburn

The piburn command is now available:

piburn --help

Quick start

Insert a microSD card and run:

piburn

The interactive interface asks for the number of cards, Wi-Fi credentials, hostname prefix, login method, and target device. Cards are prepared one at a time, so a single card reader is enough.

At the end, the tool can replace ansible/inventory.ini and prints one ready-to-use command per node:

SSH commands:
ssh pomponchik@pi-1.local
ssh pomponchik@pi-2.local

Press Ctrl+C at any step to stop.

Warning: flashing and integrity testing erase the selected card completely. Always verify the device name, model, and capacity before confirming it.

What gets configured

Every card receives:

  • the latest published stable Ubuntu Server ARM64 image for Raspberry Pi;
  • a unique hostname such as pi-1.local;
  • the pomponchik user by default;
  • Wi-Fi with DHCP and optional Ethernet DHCP for a future wired switch;
  • either an SSH public key or a shared login password;
  • Avahi for .local name discovery;
  • cloud-init configuration that expands the root filesystem on first boot.

Remote images are downloaded into a temporary directory and removed after success, failure, or Ctrl+C. They are never kept in a persistent cache. A local file supplied through --image is never deleted.

Login methods

For passwordless access, piburn discovers a standard public key such as ~/.ssh/id_ed25519.pub. Create one when needed:

ssh-keygen -t ed25519

Alternatively, choose password login. The generated default is a random 20-character alphanumeric password, and only its SHA-512 crypt hash is written to cloud-init.

The Wi-Fi password is hidden while typing and is not stored on the Mac after the process exits. It must be written to the card's network-config so the Raspberry Pi can join the network.

Card integrity test

The optional full integrity test writes a deterministic pattern across the card's entire reported capacity and reads it back. This can detect corrupted or counterfeit media, but it is destructive and may take longer than flashing Ubuntu itself.

Non-interactive usage

Passwords are accepted through environment variables rather than command-line arguments:

export PIBURN_WIFI_PASSWORD='wifi-password'

piburn \
  --non-interactive \
  --count 2 \
  --no-check \
  --ssid MyNetwork \
  --wifi-password-env PIBURN_WIFI_PASSWORD \
  --prefix pi \
  --auth-mode ssh-key \
  --device /dev/disk4 \
  --device /dev/disk5 \
  --inventory \
  --inventory-path ansible/inventory.ini \
  --yes

unset PIBURN_WIFI_PASSWORD

To reuse one card reader, repeat the same --device value. After ejecting a completed card, piburn waits for the next one.

For password login, also export a user password:

export PIBURN_USER_PASSWORD='node-password'

Then replace --auth-mode ssh-key in the command with --auth-mode password --user-password-env PIBURN_USER_PASSWORD. Unset both password variables after the run.

Run piburn --help for every available option.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

piburn-0.0.1.tar.gz (30.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

piburn-0.0.1-py3-none-any.whl (24.1 kB view details)

Uploaded Python 3

File details

Details for the file piburn-0.0.1.tar.gz.

File metadata

  • Download URL: piburn-0.0.1.tar.gz
  • Upload date:
  • Size: 30.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for piburn-0.0.1.tar.gz
Algorithm Hash digest
SHA256 ca1a21b102b2658b3106d11531cb5b7e201e5d52e9ce68626dff06c1ced62259
MD5 6fcf67dc26ff76cab23c790351e2260c
BLAKE2b-256 1788a1ecfa86292fe586470c178b2167d1db4a150f185175f2f687adfbd28739

See more details on using hashes here.

Provenance

The following attestation bundles were made for piburn-0.0.1.tar.gz:

Publisher: release.yml on pomponchik/piburn

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file piburn-0.0.1-py3-none-any.whl.

File metadata

  • Download URL: piburn-0.0.1-py3-none-any.whl
  • Upload date:
  • Size: 24.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for piburn-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 6bdecc35e359e8e5e237a4be25cef4948858866a85658469b493c7fc02a44a05
MD5 5551100b596d6ae695fde1ec621ae195
BLAKE2b-256 8b7d46e0debebce34f95eac1dd86cfdab6a43a4da4803a3006ca8e1c24d0897b

See more details on using hashes here.

Provenance

The following attestation bundles were made for piburn-0.0.1-py3-none-any.whl:

Publisher: release.yml on pomponchik/piburn

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page