#_preseed_V1
#
# https://www.debian.org/releases/stable/amd64/apbs04.en.html
# 

d-i debian-installer/country string NO
d-i debian-installer/keymap select no
d-i debian-installer/language string en_US:en
d-i debian-installer/locale string en_US

#d-i localechooser/supported-locales string en_US.UTF-8 nb_NO.UTF-8

d-i keyboard-configuration/layoutcode string no
d-i keyboard-configuration/variantcode string
d-i keyboard-configuration/xkb-keymap select no

d-i netcfg/choose_interface select auto

d-i netcfg/get_hostname string vimscore-4
d-i netcfg/get_domain string vimscore.com
d-i netcfg/hostname string vimscore-4.vimscore.com

d-i mirror/country string manual
d-i mirror/protocol string http
d-i mirror/http/directory string /debian
d-i mirror/http/hostname string deb.debian.org
d-i mirror/http/proxy string
d-i mirror/suite string stable

d-i hw-detect/load_firmware boolean false
d-i netcfg/wireless_wep string

# A literal "!" disabled the password for root/the user. Can be hard-coded with a crypt(3) hash.
d-i passwd/root-login boolean false
d-i passwd/root-password-crypted password !

d-i passwd/make-user boolean false

d-i passwd/user-fullname string Foo
d-i passwd/username string foo
d-i passwd/user-password string foo
d-i passwd/user-password-again string foo
#d-i passwd/user-password-crypted password !

d-i time/zone string Europe/Oslo
d-i clock-setup/ntp boolean true

d-i partman-auto/method string regular
#d-i partman-auto-lvm/guided_size string max
d-i partman-auto/choose_recipe select atomic

# https://www.bishnet.net/tim/blog/2015/01/29/understanding-partman-autoexpert_recipe/
# https://github.com/xobs/debian-installer/blob/master/doc/devel/partman-auto-recipe.txt
# One single, huge partition. No swap.
d-i partman-auto/expert_recipe string \
        root :: \
                1024 1000000000 -1 ext4 \
                        $primary{ } $bootable{ } \
                        method{ format } format{ } \
                        use_filesystem{ } filesystem{ ext4 } \
                        mountpoint{ / } \
                .
d-i partman-basicfilesystems/no_swap boolean false

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

popularity-contest popularity-contest/participate boolean true
tasksel tasksel/first multiselect standard, ssh-server

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 grub-installer/only_debian boolean true
#d-i grub-installer/with_other_os boolean true
d-i grub-installer/bootdev  string default

d-i finish-install/keep-consoles boolean true
d-i finish-install/reboot_in_progress note

d-i preseed/late_command string \
   mkdir /target/root/.ssh ;\
   cp /authorized_keys /target/root/.ssh/