### Localization d-i debian-installer/locale string en_US d-i debian-installer/language string en d-i debian-installer/country string CH d-i debian-installer/locale string en_US.UTF-8 d-i keyboard-configuration/xkb-keymap select us ### Network configuration d-i netcfg/choose_interface select auto # Any hostname and domain names assigned from dhcp take precedence over # values set here. However, setting the values still prevents the questions # from being shown, even if values come from dhcp. d-i netcfg/get_hostname string unassigned-hostname # Disable that annoying WEP key dialog. d-i netcfg/wireless_wep string ### Mirror settings # Mirror protocol: # If you select ftp, the mirror/country string does not need to be set. # Default value for the mirror protocol: http. d-i mirror/protocol string http 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 d-i mirror/suite string trixie ### Account setup d-i passwd/root-login boolean false d-i passwd/user-fullname string DevOps d-i passwd/username string devops d-i passwd/user-password password insecure d-i passwd/user-password-again password insecure ### Clock and time zone setup # Controls whether or not the hardware clock is set to UTC. d-i clock-setup/utc boolean true d-i time/zone string Etc/UTC d-i clock-setup/ntp boolean true d-i clock-setup/ntp-server string debian.pool.ntp.org ### Partitioning d-i partman-lvm/device_remove_lvm boolean true d-i partman-lvm/confirm boolean true d-i partman-lvm/confirm_nooverwrite boolean true d-i partman-md/device_remove_md boolean true d-i partman-md/confirm boolean true # Disable no-swap warning #d-i partman-basicfilesystems/no_swap boolean true # Disk partitioning (UEFI + GPT, XFS root, 1 GiB swap) d-i partman-auto/method string regular d-i partman-auto/choose_recipe select uefi-xfs-swap d-i partman-auto/expert_recipe string \ uefi-xfs-swap :: \ 512 512 512 fat32 \ $primary{ } \ method{ efi } format{ } \ . \ 1024 1024 1024 linux-swap \ method{ swap } format{ } \ . \ 1024 1024 -1 xfs \ method{ format } format{ } \ use_filesystem{ } filesystem{ xfs } \ mountpoint{ / } \ . 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 ### Base system installation d-i base-installer/install-recommends boolean true d-i base-installer/kernel/image string linux-image-amd64 ### Apt setup d-i apt-setup/cdrom/set-first boolean false d-i apt-setup/non-free-firmware boolean true d-i apt-setup/non-free boolean true d-i apt-setup/contrib boolean true d-i apt-setup/disable-cdrom-entries boolean true d-i apt-setup/services-select multiselect security updates d-i apt-setup/security_host string security.debian.org ### Package selection tasksel tasksel/first multiselect standard, ssh-server d-i pkgsel/upgrade select full-upgrade d-i pkgsel/include string zram-tools popularity-contest popularity-contest/participate boolean false ### Boot loader installation d-i partman/early_command string \ largest_size=0; \ list-devices disk | while read -r disk; \ do size=$(blockdev --getsize64 "$disk"); \ if [ "$size" -gt "$largest_size" ]; then \ largest_size="$size"; \ echo "$disk" > /tmp/largest_disk; \ fi; \ done; \ largest_disk=$(cat /tmp/largest_disk); \ debconf-set partman-auto/disk "$largest_disk";\ debconf-set grub-installer/bootdev "$largest_disk"; d-i grub-installer/only_debian boolean true d-i grub-installer/with_other_os boolean true d-i finish-install/reboot_in_progress note d-i cdrom-detect/eject boolean true ### use eth0 d-i debian-installer/add-kernel-opts string net.ifnames=0 biosdevname=0 d-i preseed/late_command string \ in-target /bin/sh -eu -c ' \ config=/etc/network/interfaces; \ fail() { echo "preseed-network: $*" >&2; exit 1; }; \ [ -f "$config" ] || fail "missing $config"; \ old=$(awk "\$1 == \"iface\" && \$2 != \"lo\" { if (!(\$2 in names)) { names[\$2] = 1; count++ } } END { if (count != 1) exit 1; for (name in names) print name }" "$config") || fail "expected exactly one non-loopback interface"; \ awk "\$1 == \"mapping\" || \$1 ~ /^(bridge[-_]|bond[-_]|vlan[-_])/ { exit 1 } \$1 == \"source\" && (\$2 != \"/etc/network/interfaces.d/*\" || NF != 2) { exit 1 } \$1 == \"source-directory\" && (\$2 != \"/etc/network/interfaces.d\" || NF != 2) { exit 1 }" "$config" || fail "unsupported custom network configuration"; \ for include in /etc/network/interfaces.d/*; do [ ! -f "$include" ] || fail "nonempty interfaces.d requires explicit mapping"; done; \ [ "$old" != eth0 ] || exit 0; \ temporary=$(mktemp "${config}.preseed.XXXXXX"); \ trap "rm -f -- \"$temporary\"" 0; \ cp -p "$config" "$temporary"; \ awk -v old="$old" "\$1 == \"auto\" || \$1 == \"allow-auto\" || \$1 == \"allow-hotplug\" { for (i = 2; i <= NF; i++) { if (\$i == old) \$i = \"eth0\"; else if (\$i != \"lo\") exit 1 } } \$1 == \"iface\" && \$2 == old { \$2 = \"eth0\" } { print }" "$config" > "$temporary" || fail "inconsistent interface declarations"; \ [ "$(awk "\$1 == \"iface\" && \$2 != \"lo\" { if (!(\$2 in names)) { names[\$2] = 1; count++ } } END { if (count != 1) exit 1; for (name in names) print name }" "$temporary")" = eth0 ] || fail "replacement validation failed"; \ [ -e "$config.preseed.bak" ] || cp -p "$config" "$config.preseed.bak"; \ mv -f -- "$temporary" "$config"; \ echo "preseed-network: configured $old as eth0" >&2; \ ' || exit 1; \ in-target mkdir -p /home/devops/.ssh; \ in-target chmod 700 /home/devops/.ssh; \ in-target /bin/sh -c -- 'echo "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIDHIbR8gMhEFvjIQR3OzAxAQIpNfw4apkXjNTutJRIQf" >> /home/devops/.ssh/authorized_keys'; \ in-target chown -R devops:devops /home/devops/.ssh; \ in-target sed -i s'/#PasswordAuthentication\ yes/PasswordAuthentication\ no/g' /etc/ssh/sshd_config; \ in-target /bin/sh -c -- 'if [ -e /boot/efi/EFI/debian/grubx64.efi ]; then mkdir -p /boot/efi/EFI/BOOT; cp /boot/efi/EFI/debian/grubx64.efi /boot/efi/EFI/BOOT/bootx64.efi; fi'; \ in-target apt-get update; \ in-target apt-get install -y zram-tools; \ in-target /bin/sh -c -- 'echo "ALGO=zstd\nPERCENT=60\nPRIORITY=100" | tee -a /etc/default/zramswap';