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, starting hostname number, login method, and target device. The starting number defaults to 1. 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 \
  --start-number 1 \
  --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.3.tar.gz (31.4 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.3-py3-none-any.whl (24.2 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: piburn-0.0.3.tar.gz
  • Upload date:
  • Size: 31.4 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.3.tar.gz
Algorithm Hash digest
SHA256 0ac2d095201b670d356c814f79880a44604f7fbf893b2c453850175a498504ee
MD5 9fea35920cd5d704ba6953c3a8384f57
BLAKE2b-256 852def6567c296b4a0c0a6f13b6a78b3ba141df1e22b5a3935ee3d7729572d03

See more details on using hashes here.

Provenance

The following attestation bundles were made for piburn-0.0.3.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.3-py3-none-any.whl.

File metadata

  • Download URL: piburn-0.0.3-py3-none-any.whl
  • Upload date:
  • Size: 24.2 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.3-py3-none-any.whl
Algorithm Hash digest
SHA256 7445653f12f160446c7281b928460daacb3fb6aff43811bb2097000ea934eeca
MD5 31837bf2c39939fb42fa6b1c6547ff93
BLAKE2b-256 7f7670dc234e963fab411efab894a4db43a77a797259d1b48b208d39e0afaadd

See more details on using hashes here.

Provenance

The following attestation bundles were made for piburn-0.0.3-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