# Debian 13 Preseed Template — Zero-Touch VM Install # Customize variables: HOSTNAME, DOMAIN, PASSWORD ### Localization d-i debian-installer/locale string de_DE.UTF-8 d-i keyboard-configuration/xkb-keymap select de d-i console-setup/ask_detect boolean false ### Network (DHCP) d-i netcfg/choose_interface select auto d-i netcfg/get_hostname string HOSTNAME d-i netcfg/get_domain string DOMAIN ### Mirror d-i mirror/country string manual d-i mirror/http/hostname string deb.debian.org d-i mirror/http/directory string /debian d-i mirror/http/proxy string ### Clock d-i clock-setup/utc boolean true d-i time/zone string Europe/Berlin d-i clock-setup/ntp boolean true ### Partitioning — use entire disk, one partition d-i partman-auto/method string regular d-i partman-auto/choose_recipe select atomic d-i partman-partitioning/confirm_write_new_label boolean true d-i partman/choose_partition select finish d-i partman/confirm boolean true d-i partman/confirm_nooverwrite boolean true ### Root account d-i passwd/root-login boolean true d-i passwd/root-password password PASSWORD d-i passwd/root-password-again password PASSWORD ### User account d-i passwd/make-user boolean true d-i passwd/user-fullname string User d-i passwd/username string user d-i passwd/user-password password PASSWORD d-i passwd/user-password-again password PASSWORD ### APT d-i apt-setup/non-free-firmware boolean true d-i apt-setup/contrib boolean true d-i apt-setup/non-free boolean true ### Package selection tasksel tasksel/first multiselect ssh-server, standard d-i pkgsel/include string open-vm-tools curl sudo qemu-guest-agent cloud-guest-utils d-i pkgsel/upgrade select full-upgrade popularity-contest popularity-contest/participate boolean false ### GRUB d-i grub-installer/only_debian boolean true d-i grub-installer/bootdev string default ### Finish d-i finish-install/reboot_in_progress note d-i debian-installer/exit/poweroff boolean false ### Late command — enable SSH, configure serial console, blacklist floppy # IMPORTANT: Do NOT use heredocs here — shell expansion will break them. # Use echo -e or single-line commands only. d-i preseed/late_command string \ in-target sed -i 's/^#\?PermitRootLogin.*/PermitRootLogin yes/' /etc/ssh/sshd_config; \ in-target sed -i 's/^#\?PasswordAuthentication.*/PasswordAuthentication yes/' /etc/ssh/sshd_config; \ in-target usermod -aG sudo USER; \ in-target bash -c 'echo -e "auto ens192\niface ens192 inet dhcp" > /etc/network/interfaces.d/vmxnet3'; \ in-target bash -c 'echo "blacklist floppy" > /etc/modprobe.d/blacklist-floppy.conf'; \ in-target bash -c 'echo "blacklist pcspkr" >> /etc/modprobe.d/blacklist-floppy.conf'; \ in-target bash -c 'sed -i "s/^GRUB_CMDLINE_LINUX=.*/GRUB_CMDLINE_LINUX=\"console=tty0 console=ttyS0,115200n8\"/" /etc/default/grub; echo "GRUB_TERMINAL=\"console serial\"" >> /etc/default/grub; echo "GRUB_SERIAL_COMMAND=\"serial --speed=115200 --unit=0 --word=8 --parity=no --stop=1\"" >> /etc/default/grub; update-grub'; \ in-target systemctl enable serial-getty@ttyS0.service