No description
Find a file
2025-08-21 07:35:43 -07:00
config first commit 2025-08-21 07:31:52 -07:00
modules first commit 2025-08-21 07:31:52 -07:00
.gitignore first commit 2025-08-21 07:31:52 -07:00
bootc-compat.sh first commit 2025-08-21 07:31:52 -07:00
build-with-cache.sh first commit 2025-08-21 07:31:52 -07:00
config.toml first commit 2025-08-21 07:31:52 -07:00
create-and-boot-vm.sh first commit 2025-08-21 07:31:52 -07:00
create-bootc-image.sh first commit 2025-08-21 07:31:52 -07:00
debian-bootc-vm.xml first commit 2025-08-21 07:31:52 -07:00
debian_bootc_dockerfile.txt first commit 2025-08-21 07:31:52 -07:00
default-network.xml first commit 2025-08-21 07:31:52 -07:00
justfile first commit 2025-08-21 07:31:52 -07:00
README.md Added README.md 2025-08-21 07:35:43 -07:00
setup-apt-cacher-ng.sh first commit 2025-08-21 07:31:52 -07:00
show-debian-releases.sh first commit 2025-08-21 07:31:52 -07:00
test-bootc-container.sh first commit 2025-08-21 07:31:52 -07:00

Debian Bootc Simple

This is a less complex way to create bootc images than the deb-bootc-compose method that mirrors how Fedora does it.

Prerequisites

  • Debian-based system (tested on Debian 13 Trixie)
  • podman or docker for container operations
  • qemu-utils for image format conversion
  • grub-pc-bin for bootloader installation
  • kpartx for partition management
  • just command runner (install with cargo install just)

Quick Start

1. Build a QCOW2 Image

# Create QCOW2 image from container (default)
just qcow2

# Create QCOW2 image from chroot
just qcow2-chroot

2. Build Different Formats

# ISO image
just iso

# Raw disk image
just img

# VMware format
just vmdk

# VirtualBox format
just vdi

# All formats at once
just all

3. Customize Image Size

# Create 20GB QCOW2 image
just custom 20 qcow2

# Create 15GB ISO from chroot
just custom-chroot 15 iso

4. Choose Debian Release

# Use Debian 14 (Forky)
just qcow2-chroot-release forky

# Use Debian Sid
just qcow2-chroot-release sid

# Use environment variable
DEBIAN_RELEASE=sid just qcow2-chroot

Build Types

Container Method (Default)

Extracts filesystem from a container image:

just qcow2

Chroot Method

Builds from a chroot environment:

just qcow2-chroot

Output Formats

  • QCOW2: QEMU Copy-On-Write (default)
  • ISO: Bootable ISO image
  • IMG: Raw disk image
  • VMDK: VMware disk format
  • VDI: VirtualBox disk format

Debian Releases

  • trixie: Debian 13 (Testing) - Default
  • forky: Debian 14 (Unstable)
  • sid: Debian Sid (Always Unstable)

VM Testing

Create and boot a VM with the generated image:

just vm

Configuration

View current configuration:

just config

Check available options:

./create-bootc-image.sh --help

Cleanup

# Clean output files
just clean

# Clean work directories
just clean-work

# Clean everything
just clean-all

Advanced Usage

Build Container Only

just build

Setup apt-cacher-ng for faster builds

just setup-cache

Test container functionality

just test

File Structure

  • create-bootc-image.sh - Main orchestration script
  • modules/ - Modular components for different build stages
  • config/defaults.sh - Configuration defaults
  • justfile - Command shortcuts and examples
  • debian_bootc_dockerfile.txt - Container definition
  • debian-bootc-vm.xml - VM configuration template

Troubleshooting

If you encounter issues:

  1. Check disk space: df -h
  2. Clean work directories: just clean-work
  3. Verify prerequisites: which podman qemu-img grub-install
  4. Check logs in the output directory

Examples

# Basic workflow
just qcow2
just vm

# Chroot workflow with custom size
just custom-chroot 25 qcow2
just vm

# Multiple formats from chroot
just all-chroot

# Debian 14 with custom size
just custom-chroot-release 30 iso forky