A Docker-based solution for creating a customized Debian Trixie (Debian 13) unattended installation ISO.
This automated installer includes:
- Language: English (en_US.UTF-8)
- Country: Switzerland (CH)
- Keyboard Layout: Swiss French (ch-fr)
- Partitioning: Automatic full disk partitioning
- Desktop Environment: None (server installation)
- Packages: Standard system utilities and SSH server
- SSH Configuration: PermitRootLogin enabled (set to
yes) - Additional Scripts: Support for custom post-installation scripts
- Docker installed on your system
- Sufficient disk space (~2GB for building)
- Internet connection to download Debian ISO
docker build -t debian-trixie-installer .Run the Docker container to build the custom ISO:
docker run --rm --privileged \
-v $(pwd)/output:/output \
debian-trixie-installerThe ISO will be created in the output/ directory as debian-trixie-unattended.iso.
You can now use the generated ISO to:
- Boot from a USB drive (use tools like
dd, Rufus, or Etcher to write to USB) - Boot in a virtual machine (VirtualBox, VMware, QEMU, etc.)
- Deploy on physical hardware
The installation will start automatically after 1 second.
- Root password:
root - User:
debian/ Password:debian
Edit preseed.cfg to customize:
- Passwords (use
mkpasswd -m sha-512to generate encrypted passwords) - Hostname and domain
- Package selection
- Partitioning scheme
- Time zone
- And more...
Place your custom post-installation scripts in the additional-scripts/ directory. These scripts will be copied to /root/additional-scripts/ on the installed system.
Example:
cp my-custom-script.sh additional-scripts/
chmod +x additional-scripts/my-custom-script.shThen rebuild the Docker image.
The current configuration uses Swiss French keyboard (ch-fr). To change:
Edit preseed.cfg and modify:
d-i keyboard-configuration/xkb-keymap select ch(fr)
Common alternatives:
- US:
us - UK:
gb - German (Switzerland):
ch(de) - French (France):
fr
.
├── Dockerfile # Docker image definition
├── preseed.cfg # Debian preseed configuration
├── build-installer.sh # ISO building script
├── additional-scripts/ # Custom post-installation scripts
│ ├── README.md
│ └── example.sh
├── .dockerignore # Docker ignore file
└── README.md # This file
- Locale: en_US.UTF-8
- Language: English
- Country: Switzerland
- Timezone: Europe/Zurich
- Uses the entire first disk (
/dev/sda) - Atomic partitioning recipe (one partition for everything)
- Automatically confirms all partitioning decisions
- Automatic network configuration via DHCP
- Default hostname:
debian-trixie - Default domain:
localdomain
- Standard system utilities
- SSH server (OpenSSH)
- sudo
- Root login enabled with password authentication
- SSH service enabled on boot
mkdir -p /path/to/output
docker run --rm --privileged \
-v /path/to/output:/output \
debian-trixie-installerdocker run -it --rm --privileged \
-v $(pwd)/output:/output \
debian-trixie-installer /bin/bashThen manually run:
/build/build-installer.sh-
Change Default Passwords: The preseed uses default passwords for demonstration. Always change these before production use.
-
Root Login: SSH root login is enabled for convenience. Consider disabling it after initial setup or using SSH keys only.
-
Network Security: The system uses DHCP by default. Configure static IPs and firewall rules as needed.
-
Update Regularly: Keep the system updated with security patches:
apt-get update && apt-get upgrade -y
- Ensure the ISO was written correctly to USB/VM
- Try using different USB writing tools
- Check BIOS/UEFI boot settings
- Ensure you have sufficient disk space
- Check internet connectivity for ISO download
- Run with
--privilegedflag for mounting operations
- Check network connectivity (needed for package downloads)
- Review preseed configuration syntax
- Boot in expert mode and check system logs
This project is provided as-is for educational and deployment purposes.
Feel free to submit issues or pull requests for improvements.