imagestack/tools/pxe_utils/files/preseed.cfg
2026-01-28 09:21:36 +01:00

119 lines
5.1 KiB
INI

### Preseed Installation fuer Debian 13 Trixie
### Vorbereitung
d-i debconf/priority string critical
d-i finish-install/reboot_in_progress note
popularity-contest popularity-contest/participate boolean false
### Lokalisierung
d-i debian-installer/language string de
d-i debian-installer/country string DE
d-i debian-installer/locale string de_DE.UTF-8
d-i localechooser/supported-locales multiselect de_DE.UTF-8
d-i console-setup/ask_detect boolean false
d-i keyboard-configuration/xkb-keymap select de
d-i keyboard-configuration/variant select Deutschland
d-i keyboard-configuration/modelcode string pc105
d-i clock-setup/utc boolean true
d-i time/zone string Europe/Berlin
d-i tzdata/Areas select Europe
d-i tzdata/Zones/Europe select Berlin
### Netzwerk
d-i netcfg/enable boolean true
d-i netcfg/choose_interface select auto
d-i netcfg/hostname string computerspende
d-i netcfg/get_domain string unassigned-domain
### APT / Mirror
d-i mirror/country string manual
d-i mirror/http/hostname string ftp2.de.debian.org
d-i mirror/http/directory string /debian
d-i mirror/http/proxy string
d-i apt-setup/use_mirror boolean true
d-i apt-setup/disable-cdrom-entries boolean true
d-i apt-setup/non-free-firmware boolean true
d-i apt-setup/non-free boolean true
d-i apt-setup/contrib boolean true
### Benutzer
d-i passwd/root-login boolean false
d-i passwd/username string computerspende
d-i passwd/user-fullname string computerspende
d-i passwd/user-uid string 1000
d-i passwd/user-password password csw
d-i passwd/user-password-again password csw
d-i user-setup/allow-password-weak boolean true
d-i user-setup/encrypt-home boolean false
d-i passwd/user-default-groups string audio cdrom video sudo
### Software
tasksel tasksel/first multiselect standard, gnome-desktop
d-i pkgsel/install-language-support boolean true
d-i pkgsel/update-policy select Install security updates automatically
d-i pkgsel/upgrade select full-upgrade
d-i pkgsel/include string git vim htop curl jq acpi
### Partitionierung
# Finde die groesste nicht USB Disk. (HDD bei Desktops erst nach Installation anschliessen
d-i partman/early_command string \
DISK="$(/lib/partman/list-devices disk | while read d; do b="$(basename "$d")"; r="$(cat "/sys/block/$b/removable" 2>/dev/null || echo 1)"; s="$(cat "/sys/block/$b/size" 2>/dev/null || echo 0)"; [ "$r" = "0" ] && echo "$s $d"; done | sort -nr | head -n1 | awk '{print $2}')"; \
[ -z "$DISK" ] && DISK="$(/lib/partman/list-devices disk | head -n1)"; \
echo "Auto-selected install disk: $DISK" > /var/log/partman-auto-disk.log; \
debconf-set partman-auto/disk "$DISK"
d-i partman-partitioning/choose_label select gpt
d-i partman/choose_label select gpt
d-i partman-md/confirm boolean true
d-i partman-md/deleteverify boolean true
d-i partman-lvm/device_remove_lvm boolean true
d-i partman-lvm/vgdelete_confirm boolean true
d-i lvmcfg/vgdelete_confirm boolean true
d-i partman-auto/method string regular
# Legt folgende Partitionen an (EFI, Root, Swap)
d-i partman-auto/expert_recipe string \
uefi-bios-atomic :: \
1 1 2 free \
$iflabel{ gpt } \
$bios_grub{ } \
method{ biosgrub } \
. \
512 512 512 fat32 \
$iflabel{ gpt } \
$primary{ } \
method{ efi } format{ } \
mountpoint{ /boot/efi } \
. \
2048 2048 2048 linux-swap \
method{ swap } format{ } \
. \
1000 10000 -1 ext4 \
$primary{ } \
method{ format } format{ } \
use_filesystem{ } filesystem{ ext4 } \
mountpoint{ / } \
.
d-i partman-auto/choose_recipe select uefi-bios-atomic
d-i partman/choose_partition select finish
d-i partman/confirm boolean true
d-i partman/confirm_nooverwrite boolean true
d-i partman-partitioning/confirm_write_new_label boolean true
### GRUB
d-i grub-installer/only_debian boolean true
d-i grub-installer/bootdev string default
d-i partman-efi/non_efi_system boolean true
### late_command (WICHTIG: letzter Befehl ohne ; und ohne \)
d-i preseed/late_command string \
in-target --pass-stdout sh -c 'install -d /opt'; \
in-target --pass-stdout sh -c 'curl -fsSL --retry 5 --retry-delay 2 http://10.7.3.101:8888/preseed_late.sh -o /opt/preseed_late.sh'; \
in-target --pass-stdout sh -c 'chmod +x /opt/preseed_late.sh && /opt/preseed_late.sh'