Create ISO images to automate Debian installations, by appending a preseed file to Debian official images.
Project description
Debseed
Create ISO images to automate Debian installations, by appending a preseed file to Debian official images.
Prerequisites
This application must be run on Linux and requires python3, xorriso and isolinux. Example on Debian:
sudo apt install python3-pip xorriso isolinux
Installation
Install the application using pip:
pip3 install debseed
Or, if you wish to automatically publish the generated ISO files to a VMWare datastore, install the application with additional dependencies:
pip3 install debseed[vmware]
Usage examples
Download latest Debian ISO file and generate a custom ISO file from it, using the generic edition:
debseed update
Generate a custom ISO file from a specific image and preseed file:
debseed generate debian-11.5.0-amd64-netinst.iso path/to/preseed.cfg
To print full usage instructions, run:
debseed --help
Configuration
Configuration of Debseed is defined in the following files (by decreasing priority):
local.conf
in current working directory~/.config/debseed.conf
in home directoryC:/ProgramData/debseed.conf
(Windows) or/etc/debseed.conf
(Linux)
Configuration section [debseed]
contains general-purpose application settings.
Specific sets of generation parameters, called editions, are configured in their own configuration section. For example, section named default
is configured using configuration section [debseed:default]
.
See example.
Development
Create Python virtual environment (example on a Debian workstation):
python3 -m venv .venv
source .venv/bin/activate
python -m pip install --upgrade pip wheel
pip install -r requirements_all.txt
Run commands:
python -m debseed --help
Clean repository:
find . \( -name __pycache__ -o -name build -o -name dist -o -name "*.egg-info" \) -not -path "./.venv/*" -exec rm -rf {} \;
Create Python redistribuable package:
pip wheel --no-deps -w dist .
Prepare Twine for package upload (if necessary):
pip install twine
$env:REQUESTS_CA_BUNDLE="...ca-certificates.crt"
Check package (in particular, verify version in file name):
twine check dist/...
Upload le paquet:
twine upload --repository ... dist/...
Troubleshooting
To display information about an ISO, use command isoinfo
from Debian package genisoimage
, example:
isoinfo -d -i path.iso
Extract initial ramdisk:
cd debseed.tmp/...
mkdir extracted-initrd
cd extracted-initrd
cpio -idm < ../initrd
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.