# Preseed file for KVM virtual machines running Ubuntu Server
# tried to keep it pretty lean and pretty generic
# Frank Heimes
 
# General configuration
d-i debconf/priority string critical
d-i auto-install/enable boolean true

# use -proposed udebs
### d-i apt-setup/proposed boolean true
 
d-i pkgsel/update-policy select none
 
# Localization
d-i debian-installer/language string en
d-i debian-installer/country string US
d-i debian-installer/locale string en_US.UTF-8 
 
# HW clock
d-i clock-setup/utc boolean true
# Timezone
d-i time/zone string US/Eastern
 
#
# Mirror preseed file for the Debian Installer
#
d-i mirror/country string manual
d-i mirror/protocol string http
d-i mirror/http/hostname string ports.ubuntu.com
d-i mirror/http/directory string /

# Use a http proxy
### d-i mirror/http/proxy string http://myproxy.example.com:3128
# Use no proxy
d-i mirror/http/proxy string
 
# Ubuntu release to install
d-i mirror/suite string xenial
 
# user setup
d-i passwd/user-fullname string ubuntu
d-i passwd/username string ubuntu
# specify password in clear (don’t do that)
### d-i passwd/user-password password ubuntu
### d-i passwd/user-password-again password ubuntu
### d-i user-setup/allow-password-weak boolean true
# specify encrypted password (use 'mkpasswd -m sha-512' to generate)
d-i passwd/user-password-crypted password $6$qAvoG9qPd08PD1I$uVlTe7FISFrQ4Klcfs95YMUahYNWtOSRU7pQGgo6PpA.eyK/5xnvDk7963XzzJe5Wq8T6HsIX2MP0Sb8qmSM8.
# encrypt fs
d-i user-setup/encrypt-home boolean false
 
# Enable login as root
### d-i passwd/root-login boolean true
# Root password
### d-i passwd/root-password-crypted password $6$EUF2Ps/BoU5qy.C$cngxbtxDmCH8lXTMX6YqCtPjEfa3rBWL7l8btCBiESU.KCvKnzukZl9f.AYzOPZiotisgge7WMB/Bi/BKcj/x.
# enable shadow passwords
d-i passwd/shadow boolean true
 
# do not enable live installer, use normal d-i instead
d-i live-installer/enable boolean false
 
# qcow2 image as defined in xml
d-i partman-auto/disk string /dev/vda
d-i partman-auto/method string regular
 
# optional lines to clean-up old RAIDs and LVMs ....
d-i partman-md/device_remove_md boolean true
d-i partman-lvm/device_remove_lvm boolean true
d-i partman-lvm/device_remove_lvm_span boolean true
d-i partman-lvm/confirm boolean true
d-i partman-lvm/confirm_nooverwrite 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
 
# Use restricted software?
apt-mirror-setup        apt-setup/restricted    boolean true
# Use software from the "universe" component?
apt-mirror-setup        apt-setup/universe      boolean true
# Use software from the "multiverse" component?
apt-mirror-setup        apt-setup/multiverse    boolean true
# Use backported software?
apt-mirror-setup        apt-setup/backports     boolean false
# Use software from the "partner" repository?
apt-mirror-setup        apt-setup/partner       boolean false
# Enable source repositories in APT?
apt-setup-udeb  apt-setup/enable-source-repositories    boolean false
 
# Software selection
d-i tasksel/first multiselect standard system utilities, OpenSSH server, Basic Ubuntu server
 
# Should kexec-tools handle reboots?
kexec-tools	kexec-tools/load_kexec	boolean	false
# Should kdump-tools be enabled by default?
kdump-tools     kdump-tools/use_kdump   boolean false
 
# After installation, install some packages - use a single line only! (keep it minimalistic)
d-i preseed/late_command string in-target sed -i s/prohibit-password/yes/g /etc/ssh/sshd_config; apt-install screen vim
 
# Perform the automatic action after installation
d-i finish-install/reboot_in_progress note
# Perform a poweroff instead of a reboot (allows to change boot order)
d-i debian-installer/exit/poweroff boolean true

