Skip to content

Instantly share code, notes, and snippets.

@D4rk4
Forked from JonasProgrammer/preseed.txt
Last active July 30, 2020 23:50
Show Gist options
  • Save D4rk4/7612b96985d088769f60cda958dcf9e2 to your computer and use it in GitHub Desktop.
Save D4rk4/7612b96985d088769f60cda958dcf9e2 to your computer and use it in GitHub Desktop.
### Keyboard config
d-i debian-installer/locale string en_US.UTF-8
d-i console-setup/ask_detect boolean false
d-i keyboard-configuration/layoutcode string us
d-i keyboard-configuration/xkb-keymap us
d-i keyboard-configuration/xkb-keymap select us
d-i keyboard-configuration/toggle select No toggling
d-i keyboard-configuration/variantcode string American English
### Network configuration
d-i netcfg/choose_interface select auto
d-i netcfg/get_hostname string unassigned-hostname
d-i netcfg/get_domain string unassigned-domain
d-i netcfg/hostname string k8s-demo
d-i netcfg/wireless_wep string
d-i netcfg/dhcp_hostname string k8s-demo
d-i hw-detect/load_firmware boolean true
### Mirror settings
d-i mirror/country string manual
d-i mirror/http/hostname string cdn.debian.net
d-i mirror/http/directory string /debian
d-i mirror/http/proxy string
### Account setup
d-i passwd/root-login boolean false
# To create a normal user account.
d-i passwd/user-fullname string K8S Admin
d-i passwd/username string k8s
d-i passwd/user-password password K8Sdemo
d-i passwd/user-password-again password K8Sdemo
# The user account will be added to some standard initial groups. To
# override that, use this.
#d-i passwd/user-default-groups string audio cdrom video
### Clock and time zone setup
d-i clock-setup/utc boolean true
d-i time/zone string UTC
d-i clock-setup/ntp boolean true
d-i clock-setup/ntp-server string clock.ix.gs
### Partitioning
d-i partman-auto/method string lvm
d-i partman-lvm/device_remove_lvm boolean true
d-i partman-md/device_remove_md boolean true
d-i partman-lvm/confirm boolean true
d-i partman-lvm/confirm_nooverwrite boolean true
d-i partman-auto/choose_recipe select atomic
d-i partman-basicfilesystems/no_swap boolean true
d-i partman-lvm/expert_recipe string \
boot-root :: \
250 50 1000 xfs \
$primary{ } $bootable{ } \
method{ format } format{ } \
use_filesystem{ } filesystem{ xfs } \
mountpoint{ /boot } \
. \
5000 10000 1000000000 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
### Apt setup
d-i apt-setup/non-free boolean true
d-i apt-setup/contrib boolean true
d-i debian-installer/allow_unauthenticated boolean true
d-i apt-setup/local0/repository string https://apt.kubernetes.io/ kubernetes-xenial main
d-i apt-setup/local0/key string https://packages.cloud.google.com/apt/doc/apt-key.gpg
d-i apt-setup/local1/repository string https://download.docker.com/linux/debian/ stretch stable
d-i apt-setup/local1/key string https://download.docker.com/linux/debian/gpg
### Package selection
tasksel tasksel/first multiselect none, ssh-server, standard
# Individual additional packages to install
d-i pkgsel/include string \
apt-transport-https gnupg2 ca-certificates curl \
iptables linux-headers-amd64 \
docker-ce docker-ce-cli containerd.io \
kubelet kubectl kubeadm
# Whether to upgrade packages after debootstrap.
# Allowed values: none, safe-upgrade, full-upgrade
d-i pkgsel/upgrade select full-upgrade
popularity-contest popularity-contest/participate boolean true
### Boot loader installation
d-i grub-installer/only_debian boolean true
d-i grub-installer/with_other_os boolean true
d-i grub-installer/bootdev string default
### Finishing up the installation
d-i finish-install/reboot_in_progress note
d-i debian-installer/exit/poweroff boolean true
#### Advanced options
### Running custom commands during the installation
d-i preseed/late_command string in-target /bin/sh -c " \
echo k8s-demo > /etc/hostname; \
update-alternatives --set iptables /usr/sbin/iptables-legacy ; \
update-alternatives --set ip6tables /usr/sbin/ip6tables-legacy ; \
update-alternatives --set arptables /usr/sbin/arptables-legacy ; \
update-alternatives --set ebtables /usr/sbin/ebtables-legacy ; \
( systemctl disable nftables && systemctl mask nftables ) ; \
apt-get clean ; \
systemctl enable serial-getty@ttyS0.service ; \
systemctl enable docker.service ; \
|| true"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment