chore(images): compress disk images with xz instead of zstd#3107
Merged
Conversation
- Package release images as `.img.xz` (`xz -9e -T0`) instead of `.img.zst` - Fixes flashing in balenaEtcher, which has no native zstd support - ~12% smaller downloads than zstd -19 (794 MB vs 907 MB on pi4-64) - Update rpi-imager JSON generator + tests to match `.img.xz` assets - Update install docs/FAQ; drop the Etcher "decompress first" workaround Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
There was a problem hiding this comment.
Pull request overview
Switches release disk-image compression from zstd (.img.zst) to xz (.img.xz) so that release artifacts can be flashed directly by both Raspberry Pi Imager and balenaEtcher, and updates the Raspberry Pi Imager JSON tooling + docs accordingly.
Changes:
- Update the disk-image build workflow to produce
.img.xzartifacts (and matching checksums/metadata). - Update the Raspberry Pi Imager JSON generator (and tests) to discover
.img.xzassets. - Update website “get started” + installation/FAQ docs to reference
.img.xzandxz -dextraction.
Reviewed changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| website/layouts/_default/get-started.html | Updates the website “Pre-built disk images” blurb to reference .img.xz instead of .zst. |
| website/data/faq.yaml | Updates macOS Imager FAQ guidance to reference .img.xz and xz -d. |
| website/content/docs/installation-options.md | Updates installation docs to reflect .img.xz assets and removes Etcher-specific zstd workaround. |
| tools/raspberry_pi_imager/tests/test_build_pi_imager_json.py | Adjusts unit tests to expect .img.xz release assets and non-image filtering. |
| tools/raspberry_pi_imager/README.md | Updates tool documentation to describe filtering .xz assets. |
| tools/raspberry_pi_imager/build_pi_imager_json.py | Updates asset filtering/board parsing and metadata URL derivation for .img.xz. |
| .github/workflows/build-balena-disk-image.yaml | Changes CI packaging from zstd to xz and updates artifact/attestation patterns accordingly. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Addresses Copilot review on #3107. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



Issues Fixed
No linked issue. Distributable disk images were compressed with zstd (
.img.zst), which balenaEtcher cannot flash — Etcher has no native zstd support (etcher#2856 is still open), forcing users to manually decompress first. Raspberry Pi Imager's zstd path has also been flaky.Description
Switch release disk-image compression from zstd to xz (
.img.xz,xz -9e -T0).xzis the only format flashed natively out of the box by both Raspberry Pi Imager and balenaEtcher, and is the format official Raspberry Pi OS images already ship as.pi4-64image (4.67 GB raw): xz is ~12% smaller than the current zstd (794 MB vs 907 MB). Kept-T0(multi-threaded) — single-threaded shaved only ~0.7% more but took ~4× longer..img.xzassets.Checklist