Skip to content

Instantly share code, notes, and snippets.

@crpb
Last active Mar 30, 2022
Embed
What would you like to do?
My Base Debian Seed Template for simple virtual Machines. The Disk-layout is on purpose to be able to extend the Disk with no further investigation on the Guest-Level with `echo 1 > /sys/block/sda/device/rescan && growpart /dev/sda 1 && resize2fs /dev/sda1`
d-i debian-installer/locale string en_US
d-i localechooser/supported-locales multiselect en_US.UTF-8, de_DE.UTF-8
d-i keyboard-configuration/xkb-keymap select us
d-i netcfg/get_hostname string debian-raw
d-i netcfg/get_domain string unassigned-domain
d-i anna/choose_modules string network-console
d-i network-console/authorized_keys_url string http://URLTO/pub.key
d-i network-console/password password INSERTCOINH3R3
d-i network-console/password-again password INSERTCOINH3R3
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 mirror/suite string stable
d-i passwd/root-login boolean false
d-i passwd/user-fullname string cb
d-i passwd/username string cb
d-i passwd/user-password-crypted password XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXx
d-i clock-setup/cet boolean true
d-i time/zone string Europe/Berlin
d-i clock-setup/ntp boolean true
d-i partman-auto/disk string /dev/sda
d-i partman-auto/method string regular
d-i partman-auto/expert_recipe string myroot :: 1000 50 -1 ext4 \
$primary{ } $bootable{ } method{ format } \
format{ } use_filesystem{ } filesystem{ ext4 } \
mountpoint{ / } \
.
d-i partman-auto/choose_recipe select myroot
d-i partman-basicfilesystems/no_swap boolean false
#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
d-i partman-md/confirm boolean true
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
d-i base-installer/install-recommends boolean false
d-i apt-setup/non-free boolean true
d-i apt-setup/contrib boolean true
d-i apt-setup/services-select multiselect security, updates
d-i apt-setup/security_host string security.debian.org
d-i apt-setup/local0/repository string \
http://ftp2.de.debian.org/debian buster-backports main contrib
d-i apt-setup/local0/source boolean true
tasksel tasksel/first multiselect ssh-server
d-i pkgsel/include string openssh-server vim-nox sudo tmux vim-pathogen zsh wget
d-i grub-installer/only_debian boolean true
d-i grub-installer/bootdev string /dev/sda
d-i finish-install/reboot_in_progress note
d-i preseed/late_command string apt-install zsh; in-target chsh -s /bin/zsh; \
in-target dd if=/dev/zero of=/swapfile bs=1024 count=2M ;\
in-target mkswap /swapfile ; in-target chmod 600 /swapfile;\
printf "/swapfile\tswap\tswap\tdefaults\t0\t0\n" >> /target/etc/fstab ;\
in-target chsh -s /bin/zsh -u cb; in-target su - cb -c 'mkdir -p ~/.ssh'; \
wget https://URLTO/pub.key -O /target/home/cb/.ssh/authorized_keys; \
in-target chown cb:cb /home/cb/.ssh/authorized_keys ; \
in-target chsh -s /bin/zsh cb; \
in-target sed -i 's/^#PasswordAuth.*/PasswordAuthentication=no/g' /etc/ssh/sshd_config ;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment