mkosi is a command-line tool for building customized, bootable OS images. It wraps distribution package managers (dnf, apt, pacman, zypper, apk) and deeply integrates with systemd components (systemd-nspawn, systemd-repart, systemd-boot, systemd-vmspawn, ukify) to produce disk images, containers, unified kernel images, initrds, and extension images. The tool supports multiple output formats (disk, tar, cpio, uki, esp, sysext, confext, portable, oci, directory, addon) and can generate images for a wide range of Linux distributions including Fedora, Debian, Ubuntu, Arch, CentOS, openSUSE, and more. The architecture is a modular Python application with a central build pipeline orchestrated in mkosi/__init__.py. Configuration is handled via layered INI-style files with conditional [Match]/[Assert] sections, allowing complex multi-image builds. A sandbox abstraction (sandbox.py) isolates tool execution using Linux namespaces, mounts, and seccomp filters. Distribution-specific installers are registered via a class registry pattern in mkosi/distribution/__init__.py. The tool also provides standalone subcommands: mkosi-initrd, mkosi-addon, mkosi-sandbox, each with its own entry point. Key features include incremental caching, SecureBoot signing, verity and TPM support, kernel-install integration, tools tree for reproducible builds, and a comprehensive manifest generation. The codebase is well-structured with clear separation between configuration, sandboxing, package management, and image creation. It has extensive tests (pytest with integration markers) and active CI.
The clonezilla-util is a command-line utility for managing Clonezilla backup images. It enables users to list, mount, and extract files from Clonezilla images without requiring a full restoration. The application leverages a modular architecture with separate libraries for handling Clonezilla specifics, compression formats, partclone parsing, and virtual file system integration via Dokan for Windows. Key features include efficient random-access reading through caching and indexing mechanisms, support for multiple compression formats (gzip, bzip2, xz, zstd), and the ability to mount images as virtual drives for seamless file explorer access. The codebase demonstrates strong engineering practices with interface-based design, reusable stream utilities, and performance-oriented components like buffer pools and caching streams. While the Dokan dependency limits cross-platform functionality to Windows, the core libraries (libCommon, libClonezilla, etc.) are designed to be portable and could be adapted to other platforms with alternative filesystem abstractions. The project is actively maintained with ongoing performance optimizations and a comprehensive test suite.