This project contains the configuration for building a custom Debian Live ISO based on Debian Testing with GNOME.
Before you begin, ensure you have the necessary tools installed on your Debian-based system.
sudo apt install -y live-build debootstrap git qemu-system-x86 qemu-utils genisoimage xorriso squashfs-tools curl wgetIf you are setting up this project for the first time or need to re-initialize the configuration:
lb config --distribution testing \
--archive-areas "main contrib non-free non-free-firmware" \
--linux-packages "linux-image" \
--debian-installer-gui true \
--debian-installer liveTo add or remove packages, edit the package list file:
config/package-lists/desktop.list.chroot
Add the names of the packages you want to install, one per line.
To speed up subsequent builds and avoid re-downloading packages, you can use apt-cacher-ng.
sudo apt install apt-cacher-ng
sudo systemctl enable --now apt-cacher-ngConfigure live-build to use the local proxy:
lb config --apt-http-proxy "http://localhost:3142/"To build the ISO image, run:
sudo lb buildThis process will take some time as it downloads packages and constructs the filesystem. The final ISO will be generated in the current directory (e.g., live-image-amd64.hybrid.iso).
You can test the generated ISO using QEMU without rebooting your machine.
qemu-system-x86_64 -m 4G -enable-kvm -cdrom live-image-amd64.hybrid.iso- -m 4G: Allocates 4GB of RAM to the virtual machine.
- -enable-kvm: Uses KVM virtualization for better performance.
- -cdrom: Specifies the ISO file to boot from.
If you need to rebuild the image (e.g., to update packages or apply configuration changes), you must clean the workspace first.
Step 1: Clean previous build artifacts
sudo lb clean --allStep 2: Regenerate configuration This step is crucial after cleaning to restore necessary state files.
lb configStep 3: Build again
sudo lb buildNote: Since this distribution is based on Debian Testing, rebuilding will automatically fetch the latest versions of all packages from the repositories.
If the build fails with an error like umount: .../chroot/proc: target is busy, it means a process is still holding the filesystem open.
Fix:
-
Force Unmount:
sudo umount -l chroot/proc sudo umount -l chroot/sys
-
Clean and Rebuild:
sudo lb clean --all lb config sudo lb build