How to install distrobuilder¶
Installing from package¶
distrobuilder is available from the Snap Store.
sudo snap install distrobuilder --classic
Installing from source¶
To compile distrobuilder from source, first install the Go programming language, and some other dependencies.
Debian-based:
sudo apt update sudo apt install -y golang-go gcc debootstrap rsync gpg squashfs-tools git make build-essential libwin-hivex-perl wimtools genisoimage
ArchLinux-based:
sudo pacman -Syu sudo pacman -S go gcc debootstrap rsync gnupg squashfs-tools git make hivex cdrtools wimlib --needed
Red Hat-based:
sudo dnf check-update sudo dnf install golang gcc debootstrap rsync gnupg2 squashfs-tools git make hivex genisoimage
NOTE: Distrobuilder requires Go 1.21 or higher, if your distribution doesn’t have a recent enough version available, get it from upstream.
Second, download the source code of the distrobuilder repository (this repository).
mkdir -p $HOME/go/src/github.com/lxc/
cd $HOME/go/src/github.com/lxc/
git clone https://github.com/lxc/distrobuilder
Third, enter the directory with the source code of distrobuilder and run make to compile the source code. This will generate the executable program distrobuilder, and it will be located at $HOME/go/bin/distrobuilder.
cd ./distrobuilder
make
Finally, you can run distrobuilder as follows.
$HOME/go/bin/distrobuilder
You may also add the directory $HOME/go/bin/ to your $PATH so that you do not need to run the command with the full path.
Runtime dependencies for building VM images¶
If you intend to build Incus VM images (via distrobuilder build-incus --vm),
your system will need certain tools installed:
Debian-based:
sudo apt update sudo apt install -y btrfs-progs dosfstools qemu-kvm