### Locale / Keyboard d-i debian-installer/locale string en_US.UTF-8 d-i keyboard-configuration/xkb-keymap select us ### Network (DHCP) d-i netcfg/choose_interface select auto d-i netcfg/get_hostname string debian d-i netcfg/get_domain string local ### 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 ### User d-i passwd/root-login boolean false # d-i passwd/root-password password 14881488 # d-i passwd/root-password-again password 14881488 d-i passwd/user-fullname string Packer User d-i passwd/username string packer d-i passwd/user-password password 14881488 d-i passwd/user-password-again password 14881488 d-i user-setup/allow-password-weak boolean true ### Time d-i clock-setup/utc boolean true d-i time/zone string UTC ### Partitioning (LVM expert: /boot + VG vg0 + LV swap + LV root=rest) d-i partman-auto/disk string /dev/sda d-i partman-auto/method string lvm # если на диске были старые LVM/RAID — снести без вопросов d-i partman-lvm/device_remove_lvm boolean true d-i partman-md/device_remove_md boolean true d-i partman-md/confirm boolean true d-i partman-md/confirm_nooverwrite boolean true # имя VG фиксируем d-i partman-auto-lvm/new_vg_name string vg0 d-i partman-auto-lvm/guided_size string max # рецепт разметки d-i partman-auto/choose_recipe select boot-root-lvm-swap d-i partman-auto/expert_recipe string \ boot-root-lvm-swap :: \ 512 512 1024 ext4 \ $primary{ } $bootable{ } \ method{ format } format{ } \ use_filesystem{ } filesystem{ ext4 } \ mountpoint{ /boot } \ . \ 1024 1024 -1 lvm \ $primary{ } \ method{ lvm } device{ /dev/sda } \ vg_name{ vg0 } \ . \ 2048 2048 2048 linux-swap \ $lvmok{ } \ in_vg{ vg0 } lv_name{ swap } \ method{ swap } format{ } \ . \ 4096 4096 -1 ext4 \ $lvmok{ } \ in_vg{ vg0 } lv_name{ root } \ method{ format } format{ } \ use_filesystem{ } filesystem{ ext4 } \ mountpoint{ / } \ . # подтверждения без интерактива d-i partman-lvm/confirm boolean true d-i partman-lvm/confirm_nooverwrite boolean true d-i partman/choose_partition select finish d-i partman/confirm_write_new_label boolean true d-i partman/confirm boolean true d-i partman/confirm_nooverwrite boolean true ### Packages tasksel tasksel/first multiselect standard, ssh-server d-i pkgsel/include string sudo openssh-server cloud-init qemu-guest-agent ca-certificates curl popularity-contest popularity-contest/participate boolean false ### Bootloader d-i grub-installer/only_debian boolean true d-i grub-installer/bootdev string /dev/sda # debconf for grub-pc package (this is the screen you see) d-i grub-pc/install_devices multiselect /dev/sda d-i grub-pc/install_devices_empty boolean false ### Late command (самое важное) d-i preseed/late_command string \ in-target usermod -aG sudo packer; \ echo 'packer ALL=(ALL) NOPASSWD:ALL' > /target/etc/sudoers.d/packer; \ chmod 440 /target/etc/sudoers.d/packer; ### Finish d-i finish-install/reboot_in_progress note