3 KiB
3 KiB
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)
podmanordockerfor container operationsqemu-utilsfor image format conversiongrub-pc-binfor bootloader installationkpartxfor partition managementjustcommand runner (install withcargo 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 scriptmodules/- Modular components for different build stagesconfig/defaults.sh- Configuration defaultsjustfile- Command shortcuts and examplesdebian_bootc_dockerfile.txt- Container definitiondebian-bootc-vm.xml- VM configuration template
Troubleshooting
If you encounter issues:
- Check disk space:
df -h - Clean work directories:
just clean-work - Verify prerequisites:
which podman qemu-img grub-install - 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