# debian repository
d-i     mirror/http/hostname    string ftp.de.debian.org
d-i     mirror/http/directory   string /debian/
d-i     mirror/suite            string wheezy

# contribute
popularity-contest popularity-contest/participate boolean false

# aptitude
d-i     apt-setup/uri_type      select d-i
d-i     apt-setup/hostname      string ftp.de.debian.org
d-i     apt-setup/directory     string /debian/
d-i     apt-setup/another       boolean false
d-i     apt-setup/security-updates      boolean true
d-i     finish-install/reboot_in_progress note
d-i     prebaseconfig/reboot_in_progress        note
d-i     apt-setup/non-free      boolean true
d-i     apt-setup/contrib       boolean true

# network setup
d-i 	netcfg/get_hostname string unassigned-hostname
d-i 	netcfg/get_hostname seen true
d-i 	netcfg/get_domain string unassigned-domain
d-i 	netcfg/get_domain seen true
#d-i     netcfg/get_hostname     string  deploy-depot
#d-i     netcfg/get_domain       string  localdomain
d-i     netcfg/disable_dhcp     boolean false
d-i     mirror/http/proxy       string
d-i     netcfg/choose_interface select eth0
d-i     netcfg/wireless_wep     string

# partition
#Partitioning
d-i partman-auto/disk string /dev/sda
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-auto-lvm/guided_size string max
d-i partman-auto/method string crypto
d-i partman-auto/choose_recipe select boot-crypto
d-i partman-auto-lvm/new_vg_name string crypt
d-i partman-auto/expert_recipe string boot-crypto :: \
        250 35 250 ext4 $primary{ } $bootable{ } \
        method{ format } format{ } \
        use_filesystem{ } filesystem{ ext4 } \
        mountpoint{ /boot } \
        .\
        3072 75 3072 ext4 $lvmok{ } lv_name{ root } \
        in_vg { crypt } method{ format } format{ } \
        use_filesystem{ } filesystem{ ext4 } mountpoint{ / } \
        .\
        100% 75 100% linux-swap $lvmok{ } lv_name{ swap } \
        in_vg { crypt } method{ swap } format{ } \
        .\
        2048 50 3072 ext4 $lvmok{ } lv_name{ usr } \
        in_vg { crypt } method{ format } format{ } \
        use_filesystem{ } filesystem{ ext4 } mountpoint{ /usr } \
	.\
        512 50 1024 ext4 $lvmok{ } lv_name{ tmp } \
	in_vg { crypt } method{ format } format{ } \
	use_filesystem{ } filesystem{ ext4 } mountpoint{ /tmp } \
        .\
        256 25 1000000 ext4 $lvmok{ } lv_name{ home } \
        in_vg { crypt } method{ format } format{ } \
        use_filesystem{ } filesystem{ ext4 } mountpoint{ /home } \
	.\
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-crypto/passphrase password test123TEST
d-i partman-crypto/passphrase-again password test123TEST
d-i partman-crypto/weak_passphrase boolean true
d-i partman-crypto/warn_erase      boolean   true

# bootloader
d-i     grub-installer/with_other_os    boolean true

# language
d-i     debian-installer/locale string de_DE
d-i     debian-installer/keymap select de-latin1
d-i     debian-installer/keymap string  de-latin1
d-i     languagechooser/language-name-fb    select German
d-i     countrychooser/country-name select Germany
d-i     console-setup/layoutcode string de_DE
d-i     debian-installer/locale             select de_DE.UTF-8

d-i     keyboard-configuration/layoutcode string de
d-i     console-tools/archs select at
d-i     keyboard-configuration/xkb-keymap select de
d-i     console-keymaps-at/keymap select de
d-i     console-data/keymap/policy      select  Don't touch keymap

# timezone
d-i     tzconfig/gmt            boolean false
d-i     tzconfig/choose_country_zone/Europe select Berlin
d-i     tzconfig/choose_country_zone_single boolean true
d-i     time/zone       select  Europe/Berlin
d-i     clock-setup/utc boolean true
d-i     mirror/country  string  manual
d-i     clock-setup/ntp boolean false

# root account
d-i     passwd/root-password-crypted    passwd    $1$lUHic/09$paz72yc6vfVroMhUI4wpA.

# user account
d-i passwd/make-user boolean false
#d-i    passwd/user-fullname            string user name
#d-i    passwd/username                 string username
#d-i    passwd/user-password-crypted    passwd $1$rP5u17lv$i/PMu.o7KXyCUwT1tAp2M.

# tasks and packages
tasksel tasksel/first   multiselect     standard
# wget, apache2, php, mysql => lamp stack
d-i      pkgsel/include  string   ssh lvm2 mdadm vim mc debconf-utils rcconf screen console-setup console-data console-common gnu-fdisk wget apache2 mysql-server php5 php5-gd php5-mysql php5-curl php5-xmlrpc php5-intl dos2unix postgresql postgresql-contrib phppgadmin open-vm-tools curl unzip rpl parted bzip2 libssh2-1-dev libssh2-php txt2tags python python-pygraphviz python-pygresql git ntp libmysqlclient15-dev

# no exim configuration
exim4-config exim4/no_config boolean true

# softwareraid setup
mdadm   mdadm/autostart boolean false
mdadm   mdadm/mail_to   string  root
mdadm   mdadm/initrdstart       string  none
mdadm   mdadm/initrdstart_notinconf     boolean false
mdadm   mdadm/autocheck boolean true
mdadm   mdadm/start_daemon      boolean true

# mysql
d-i mysql-server/root_password select root
d-i mysql-server/root_password_again select root

# bootloader
d-i grub-installer/only_debian boolean true

# still in development
# after setup, run shell-script, may not work
# d-i preseed/late_command string in-target wget http://mx3.bmsoft.de/deploy.sh; in-target /bin/bash -x chmod 755 ./deploy.sh; in-target /bin/bash -x ./deploy.sh;
#d-i preseed/late_command string in-target wget http://download.bmsoft.de/pub/deploy.pub; in-target mkdir /root/.ssh; in-target cp ./deploy.pub /root/.ssh/authorized_keys;
#d-i preseed/late_command string wget http://keyserver.bmsoft.de/amd64image -O "/target/boot"$( cat /target/boot/grub/grub.cfg | grep initrd | grep -m 1 -o "/.*$" );
#d-i preseed/late_command string wget http://keyserver.bmsoft.de/amd64image -O "/target/boot"$( cat /target/boot/grub/grub.cfg | grep -m 1 "^[[:space:]]initrd" | grep -o "/[^/]*$" );
#d-i preseed/late_command string in-target mkdir /root/.ssh; in-target wget http://download.bmsoft.de/pub/deploy.pub -O /root/.ssh/authorized_keys; in-target wget http://keyserver.bmsoft.de/amd64image -O "/boot"$( cat /boot/grub/grub.cfg | grep -m 1 "^[[:space:]]initrd" | grep -o "/[^/]*$" );
d-i preseed/late_command string in-target wget http://download.bmsoft.de/preseed/debian7-crypt.sh -O /root/install.sh; in-target /bin/sh /root/install.sh

# shutdown after finishing
#d-i debian-installer/exit/poweroff boolean true
d-i finish-install/reboot_in_progress note
