This project automates the management of Ubuntu spin distributions (Kubuntu, Xubuntu, Lubuntu, Ubuntu MATE, Ubuntu Budgie, Edubuntu) for netboot.xyz's boot-via-ISO method. It discovers new versions, generates metadata, and produces JSON files consumed by netboot.xyz's mini-ISO tool.
Ubuntu CDN → check_new_versions.py → Version Templates (YAML)
↓
update_iso_info.py (downloads ISOs, calculates SHA256)
↓
Updated YAML with checksums
↓
generate_iso_json.py
↓
JSON files for netboot.xyz
↓
Embedded in mini-ISO initrd
ubuntu-spins/
├── config/
│ ├── spins.yaml # Spin definitions (URL patterns, content IDs)
│ ├── release_codenames.yaml # Version → codename mapping
│ └── versions/ # Per-version YAML configs with SHA256/sizes
│ ├── 22.04.5.yaml
│ ├── 24.04.2.yaml
│ ├── 24.04.3.yaml
│ ├── 24.10.yaml
│ └── 25.04.yaml
├── scripts/
│ ├── check_new_versions.py # Discovers new versions, creates templates
│ ├── fetch_checksums.py # Fast checksum fetching from SHA256SUMS files
│ ├── update_iso_info.py # Downloads ISOs, calculates SHA256/sizes (slower)
│ ├── generate_iso_json.py # Aggregates YAMLs → JSON
│ └── validate_json.py # Validates JSON output format
├── output/
│ └── *.json # Generated JSON files (one per spin)
└── .github/workflows/
├── check-versions.yml # Daily version checker (creates PRs)
├── update-iso-info.yml # Manual ISO updater
└── process-iso.yml # Builds custom initrd with JSONs
Purpose: Discover new Ubuntu versions and create templates
Usage:
# Check for all new versions
python3 scripts/check_new_versions.py
# Check specific version
python3 scripts/check_new_versions.py --version 24.04.3
# Dry run (show what would be done)
python3 scripts/check_new_versions.py --dry-run
# Verbose output
python3 scripts/check_new_versions.py -vWhat it does:
- Scrapes Ubuntu CDN for version directories
- Compares against existing
config/versions/*.yaml - For each new version:
- Checks ISO availability (HEAD request) for each spin
- Creates YAML template if ISOs exist
- Sets SHA256/size to empty (filled later by update_iso_info.py)
Purpose: Fetch SHA256 checksums from published SHA256SUMS files (100x faster)
Usage:
# Fetch checksums for all spins in a version
python3 scripts/fetch_checksums.py --config config/versions/25.10.yaml
# Fetch with verbose output
python3 scripts/fetch_checksums.py --config config/versions/25.10.yaml -vWhat it does:
- Reads version YAML
- Fetches SHA256SUMS file from each spin's release directory
- Parses checksums and file sizes from the published data
- Updates YAML with checksums (completes in ~2-3 seconds)
Performance: ~2.5 seconds vs. ~4 hours for downloading full ISOs
Purpose: Download ISOs and calculate SHA256 hashes (backup method)
Usage:
# Update all spins in a version config
python3 scripts/update_iso_info.py --config config/versions/24.04.3.yaml
# Update specific spin only
python3 scripts/update_iso_info.py --config config/versions/24.04.3.yaml --spin kubuntu
# Use torrent for faster download
python3 scripts/update_iso_info.py --config config/versions/24.04.3.yaml --use-torrentWhat it does:
- Reads version YAML
- Downloads each ISO (direct or torrent) - 4-7GB per ISO
- Calculates SHA256 and file size locally
- Updates YAML with checksums
Note: This method is 100x slower than fetch_checksums.py. Use only when SHA256SUMS files are unavailable.
Purpose: Aggregate all versions into JSON format for netboot.xyz
Usage:
python3 scripts/generate_iso_json.py --output-dir output/What it does:
- Reads all
config/versions/*.yamlfiles - Aggregates by spin (kubuntu.json, xubuntu.json, etc.)
- Only includes entries with valid SHA256 and size > 0
- Outputs JSON in netboot.xyz format
Defines each Ubuntu spin with URL patterns:
spins:
kubuntu:
name: Kubuntu
content_id: "org.kubuntu:kubuntu"
url_base: https://cdimage.ubuntu.com/kubuntu/releases/
path_template: "{{ release }}/release/kubuntu-{{ version }}-desktop-amd64.iso"Maps versions to Ubuntu release names:
release_codenames:
"24.04":
codename: "Noble Numbat"
release: "noble"Per-version configuration with all spins:
version: 24.04.3
spin_groups:
kubuntu:
spins:
- name: kubuntu
version: 24.04.3
release: noble
files:
iso:
sha256: "abc123..." # Filled by update_iso_info.py
size: 4527759360- Trigger: Daily cron (00:00 UTC) or manual
- What it does: Runs
check_new_versions.py, creates PR with new templates - Manual inputs:
version(specific version),dry_run(preview mode)
- Trigger: Manual dispatch only
- What it does: Downloads full ISOs, calculates checksums, updates YAMLs
- Manual inputs:
spin(specific spin),version,use_torrent - Note: This is the slow method (downloads 4-7GB ISOs). Consider using
fetch_checksums.pyinstead (100x faster)
- Trigger: Push to master or manual
- What it does:
- Builds mini-iso-tools
- Extracts vmlinuz/initrd from mini-ISO
- Generates JSON files
- Embeds JSONs in initrd
- Creates draft release
- Version template generation
- ISO availability checking
- JSON aggregation
- Multi-version support
- GitHub workflow automation
- ✅ Empty SHA256 in 24.04.2 Xubuntu → Need to run update_iso_info.py
- ✅ Missing 25.10 codename → Added "Questing Quetzel"
- ✅ Script only logged warnings → Now creates templates
- ✅ No requirements.txt → Created
- ✅ Workflow references non-existent files → Fixed
- Ubuntu Desktop/Server not included - Only spins are tracked (could expand to official Ubuntu)
- Checksum fetching optimized - Now uses SHA256SUMS files (via fetch_checksums.py) instead of downloading entire ISOs
- Validation implemented - validate_json.py ensures JSON output compatibility
- Only amd64 architecture - No arm64 support yet
- Manual ISO updates - update_iso_info.py requires manual trigger for checksum updates
- Wait for daily workflow to detect new version
- Review PR from
check-versionsworkflow - Merge PR (adds templates with empty checksums)
- Fill checksums using fast method:
python3 scripts/fetch_checksums.py --config config/versions/{VERSION}.yaml - Generate JSON:
python3 scripts/generate_iso_json.py --output-dir output/ - Commit and push changes
- Run:
python3 scripts/check_new_versions.py --version {VERSION} - Verify:
config/versions/{VERSION}.yamlcreated - Fetch checksums (fast):
python3 scripts/fetch_checksums.py --config config/versions/{VERSION}.yaml -v - Generate JSON:
python3 scripts/generate_iso_json.py --output-dir output/ - Validate:
python3 scripts/validate_json.py - Commit and push
Use this only if SHA256SUMS files are unavailable:
- Run:
python3 scripts/check_new_versions.py --version {VERSION} - Verify:
config/versions/{VERSION}.yamlcreated - Download ISOs and calculate checksums (slow):
python3 scripts/update_iso_info.py --config config/versions/{VERSION}.yaml - Generate JSON:
python3 scripts/generate_iso_json.py --output-dir output/ - Commit and push
check_new_versions.py → version YAML → update_iso_info.py →
generate_iso_json.py → JSON files → process-iso.yml →
Mini-ISO with embedded JSONs → netboot.xyz
check_new_versions.py → HEAD request to CDN →
Only creates template if ISO exists → Prevents broken configs
Install with: pip install -r requirements.txt
- requests (HTTP client)
- beautifulsoup4 (HTML parsing for version scraping)
- pyyaml (YAML reading)
- ruamel.yaml (YAML writing with formatting preservation)
- lxml (BS4 parser backend)
# Check what new versions would be added (dry run)
python3 scripts/check_new_versions.py --dry-run
# Test specific version
python3 scripts/check_new_versions.py --version 25.10 --dry-run
# Generate JSONs and verify output
python3 scripts/generate_iso_json.py --output-dir output/
ls -lh output/
# Verify JSON structure
jq . output/kubuntu.json | head -50- Cause: ISOs not yet published on CDN for that version
- Fix: Wait for Ubuntu to publish release, or check URL manually
- Cause: Template created but checksums not calculated
- Fix: Run
update_iso_info.pyon that config file
- Cause: generate_iso_json.py skips entries with empty SHA256 or size=0
- Fix: Update checksums first, then regenerate JSON
- Cause: Missing dependencies
- Fix: Ensure
requirements.txtis used in workflow
- Automatic checksum updates - Integrate fetch_checksums.py into check-versions workflow
- Add official Ubuntu releases - Expand beyond just spins to include ubuntu-desktop, ubuntu-server
- Better error handling - Retry logic, partial failure recovery
- arm64 architecture support - Expand to more architectures
- Testing framework - Unit tests for scripts
- Version comparison in PRs - Show diffs between versions
- Multiple image types - Live, Minimal, Netboot variants
- Checksums for vmlinuz/initrd - In process-iso workflow
- Metrics dashboard - Track version coverage
- Automated deprecated version cleanup - Remove EOL versions
| File | Generated By | Consumed By |
|---|---|---|
config/spins.yaml |
Manual | check_new_versions, update_iso_info |
config/release_codenames.yaml |
Manual | check_new_versions, generate_iso_json |
config/versions/*.yaml |
check_new_versions | update_iso_info, generate_iso_json |
output/*.json |
generate_iso_json | process-iso workflow, netboot.xyz |
vmlinuz, initrd |
process-iso workflow | netboot.xyz users |
- Both desktop and server ISOs are supported - The system handles both image types
- Version templates are created with empty checksums - Run update_iso_info.py or fetch_checksums.py to fill them
- JSON generation skips incomplete entries - Ensures only valid data reaches users
- process-iso.yml is the final step that packages everything for netboot.xyz
- Generated JSON format matches netboot.xyz's expected schema (products:1.0)
- Checksum fetching is fast - fetch_checksums.py parses SHA256SUMS files (100x faster than downloading ISOs)