# This puts all files in one partition.  You'll need to change proxy settings 
# (USERNAME, PASSWORD, PROXYSERVER) and crypted passwords, as well as the 
# get_domain string to your dns domain.

# This is not quite fully automatic.  It will prompt you for hostname.  If you 
# want to automatically fill in the hostname you'll need to provide it in the 
# kernel APPEND line by saying netcfg/get_hostname=hostname  

# If you've never setup preseeding, the first step is going to be getting PXE 
# netinstall working.  You don't need a full CD, you just need netboot/debian-installer/amd64/linux 
# and netboot/debian-installer/amd64/initrd.gz.  Once you have normal netboot 
# install working, just change your append line to be like the following comment, 
# and then point SERVERIP to a webserver with your raid1.cfg file.

# APPEND ramdisk_size=15000 initrd=wheezy64.gz locale=en_US keyboard-configuration/xkb-keymap=us 
#         console-keymaps-at/keymap=us netcfg/choose_interface=auto netcfg/dhcp_timeout=60 
#         netcfg/get_domain=FQDN.EXAMPLE.COM url=SERVERIP/raid1.cfg


d-i console-setup/layoutcode string us
d-i netcfg/disable_dhcp boolean false
d-i netcfg/dhcp_failed note
d-i netcfg/dhcp_options select Configure network manually
d-i netcfg/wireless_wep string
d-i     languagechooser/language-name-fb    select English
d-i     debian-installer/locale             select en_US

d-i apt-setup/non-free boolean true
d-i apt-setup/contrib boolean true

d-i netcfg/get_hostname seen true
d-i keyboard-configuration/xkb-keymap select es
d-i mirror/country string manual
d-i mirror/http/hostname string http.debian.net
d-i mirror/http/directory string /debian
#d-i mirror/http/proxy string http://USERNAME:PASSWORD@PROXYSERVER:3128/


#----------------------------------------------------------------------#
# Partitioning
# this only makes partman automatically partition without confirmation:
d-i     partman-md/device_remove_md     boolean true
d-i     partman-md/confirm      boolean true
d-i     partman-lvm/device_remove_lvm   boolean true
d-i     partman-lvm/confirm     boolean true
d-i     partman-partitionining/confirm_write_new_label  boolean true
d-i     partman/choose_partition        select  finish
d-i     partman/confirm boolean true
d-i     partman-md/confirm_nooverwrite  boolean true
d-i     partman-lvm/confirm_nooverwrite boolean true
d-i     partman/confirm_nooverwrite boolean true
d-i     mdadm/boot_degraded             boolean true

#----------------------------------------------------------------------#
# Boot Loader Installation
d-i     grub-installer/only_debian      boolean true
d-i     grub-installer/with_other_os    boolean true
# Install grub to multiple disks:
# oh look, it seems they changed the command to do this..


#----------------------------------------------------------------------#
# Partitioning
d-i partman-auto/method string raid
d-i partman-basicfilesystems/no_swap boolean yes
d-i partman-basicfilesystems/no_mount_point yes
d-i partman-auto/disk string /dev/sda /dev/sdb
d-i grub-pc/install_devices multiselect /dev/sda, /dev/sdb
d-i     grub-installer/bootdev  string  /dev/sda /dev/sdb

d-i partman-auto/expert_recipe      string multiraid ::                 \
    900    10000  -1     raid $primary{ } $lvmignore{ } method{ raid } .\
    900    10000  -1     raid $primary{ } $lvmignore{ } method{ raid } .\
    900    10000  200000 raid $primary{ } $lvmignore{ } method{ raid } .\
    1000   10000  200000 raid             $lvmignore{ } method{ raid } .\
    1000   30000  3000   raid             $lvmignore{ } method{ raid } .

# specify how the previously defined partitions will be
# used in the RAID setup. si vas a crear particiones logicas no uses sdx4, es la primaria que crea las particiones logicas
d-i partman-auto-raid/recipe string     \
    1 2 0 ext4 /      /dev/sda1#/dev/sdb1 . \
    1 2 0 ext4 /var   /dev/sda2#/dev/sdb2 . \
    1 2 0 ext4 /home  /dev/sda3#/dev/sdb3 . \
    1 2 0 ext4        /dev/sda5#/dev/sdb5 . \
    1 2 0 ext4 /boot  /dev/sda6#/dev/sdb6 .

#d-i passwd/root-password-crypted password $6$k0mJEdvy$q3fuLB4.D/HmJ4Y6Qu4d74Fshhb1xiLkVONpb3Mv.UbILnAJs0Afw.ls4l1ntPR7c5NuiJzlxoO02wtNi1F/V0
d-i passwd/root-login boolean false
d-i passwd/user-fullname string Ansible
d-i passwd/username string ansible
d-i passwd/user-password-crypted password $6$k0mJEdvy$q3fuLB4.D/HmJ4Y6Qu4d74Fshhb1xiLkVONpb3Mv.UbILnAJs0Afw.ls4l1ntPR7c5NuiJzlxoO02wtNi1F/V0
d-i passwd/user-default-groups string dialout cdrom floppy sudo audio video plugdev

d-i popularity-contest/participate boolean false
#tasksel tasksel/first multiselect none
tasksel tasksel/first multiselect standard, ssh-server

d-i pkgsel/include string ssh snmpd vim sudo rsync sysstat ntp ntpdate resolvconf puppet

d-i tzconfig/gmt boolean false
d-i time/zone string America/Argentina/Buenos_Aires
d-i clock-setup/utc boolean true

d-i grub-installer/with_other_os boolean true
d-i grub-installer/only_debian boolean true
d-i grub-installer/password string

#----------------------------------------------------------------------#
# Finish up the installation
d-i finish-install/keep-consoles        boolean true
d-i finish-install/reboot_in_progress note

# workaround for http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=666974
d-i preseed/late_command string chroot /target grub-install /dev/sdb
