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.4.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.4-py3-none-any.whl (24.2 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: piburn-0.0.4.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.4.tar.gz
Algorithm Hash digest
SHA256 1d96f7402705610224b206f736486bce35fd880d552a6e4d5ec7b5be8d643ee3
MD5 fa16aa48f5b7a68b7772e21150ddb6c0
BLAKE2b-256 4191db1f9a8c63f3d1a86d78974ac562627b93318df44f8facf31f1b6bf43748

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: piburn-0.0.4-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.4-py3-none-any.whl
Algorithm Hash digest
SHA256 0161f93c1e126eb217c675f81297522d3d32b5358669e8899ff01b1c0c531055
MD5 0ed41043b51a7bdec6ca2f3c845a9e09
BLAKE2b-256 f5908cace3ebaff3ff303703564d8f88285caca9351a93c9f926d692430f0b3e

See more details on using hashes here.

Provenance

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