aboutsummaryrefslogtreecommitdiffstats
path: root/preseed-cfg
diff options
context:
space:
mode:
authorGuilhem Moulin <guilhem@libreoffice.org>2016-10-19 02:26:15 +0200
committerGuilhem Moulin <guilhem@libreoffice.org>2016-10-19 02:32:40 +0200
commit094fced31e934225865dc6f0bab2039cf4a908e4 (patch)
tree19b5ae0d228a98fd12a7a6e15291447ac7f08acf /preseed-cfg
parent740fab39e4c3379a358fa9e56d36c6e2305863a1 (diff)
Add script to install new virtual machines.
Diffstat (limited to 'preseed-cfg')
-rw-r--r--preseed-cfg115
1 files changed, 115 insertions, 0 deletions
diff --git a/preseed-cfg b/preseed-cfg
new file mode 100644
index 0000000..0076e63
--- /dev/null
+++ b/preseed-cfg
@@ -0,0 +1,115 @@
+cat <<- EOF
+ # Network
+ d-i netcfg/choose_interface select auto
+ d-i netcfg/get_hostname string ${VM_NAME-debian}
+ d-i netcfg/get_domain string documentfoundation.org
+
+ # Localization
+ d-i debian-installer/locale string en_US.UTF-8
+ d-i keyboard-configuration/xkb-keymap string
+
+ # Clock and time zone setup
+ d-i clock-setup/utc boolean true
+ d-i clock-setup/ntp boolean true
+ d-i clock-setup/ntp-server string 0.de.pool.ntp.org
+ d-i time/zone string Europe/Berlin
+
+ # Partitioning, see
+ # https://anonscm.debian.org/cgit/d-i/debian-installer.git/tree/doc/devel/partman-auto-recipe.txt
+ d-i partman-auto/method string regular
+ d-i partman-partitioning/default_label string gpt
+ d-i partman-partitioning/confirm_write_new_label boolean true
+ d-i partman-auto/expert_recipe string root :: \\
+ 1 1 1 free \\
+ \$iflabel{ gpt } \$primary{ } \\
+ method{ biosgrub } \$bios_boot{ } \\
+ . \\
+ 500 10000 -1 ext4 \\
+ \$primary{ } \\
+ method{ format } format{ } \\
+ use_filesystem{ } filesystem{ ext4 } \\
+ mountpoint{ / } \\
+ . \\
+ 4096 1 4096 linux-swap \\
+ \$primary{ } \\
+ method{ swap } format{ } \\
+ .
+ d-i partman/choose_partition select finish
+ d-i partman/confirm boolean true
+ d-i partman/confirm_nooverwrite boolean true
+
+ # Debian archive mirror
+ d-i mirror/country string manual
+ d-i mirror/http/hostname string ftp.de.debian.org
+ d-i mirror/http/directory string /debian
+ d-i mirror/http/proxy string
+ popularity-contest popularity-contest/participate boolean false
+
+ # Use the latest kernel
+ bootstrap-base base-installer/kernel/image select
+
+ # The subset of 'standard' tasksel that's interesting, see output of
+ # 'tasksel --task-packages standard'
+ tasksel tasksel/first string
+ d-i pkgsel/include string dbus git etckeeper \\
+ haveged salt-minion openssh-server \\
+ bash bash-completion \\
+ haveged qemu-guest-agent \\
+ bind9-host curl \\
+ screen tmux \\
+ emacs-nox vim-nox
+ d-i pkgsel/upgrade select safe-upgrade
+
+ d-i preseed/early_command string anna-install tdf-postinst-udeb
+ d-i preseed/late_command string in-target update-alternatives --set editor /usr/bin/vim.nox
+
+ # Install GRUB to the master boot record
+ grub-installer grub-installer/bootdev string default
+ grub-installer grub-installer/only_debian boolean true
+
+ # Avoid that last message about the install being complete
+ finish-install finish-install/reboot_in_progress note
+
+ # Poweroff the machine when finished (dont' reboot into the
+ # installed system)
+ d-i debian-installer/exit/poweroff boolean true
+
+ # Hostname or ipv4 of the Salt master
+ d-i tdf-postinst/salt_master string floyd.documentfoundation.org
+
+ # Fingerprint of the master public key to validate the identity of
+ # the Salt master before the initial key exchange
+ d-i tdf-postinst/salt_master_fingerprint string 33:49:0d:84:98:5a:9d:93:89:a9:d1:c8:47:36:e8:83
+EOF
+
+if [ ${VM_NAME+x} ] && [ "${VM_NAME#vm}" != "$VM_NAME" ] &&
+ [ "${VM_NAME#vm}" -gt 129 -a "${VM_NAME#vm}" -lt 256 ]; then
+ cat <<- EOF
+ d-i netcfg/disable_autoconfig boolean true
+ d-i netcfg/get_ipaddress string 89.238.68.${VM_NAME#vm}
+ d-i netcfg/get_netmask string 255.255.255.128
+ d-i netcfg/get_gateway string 89.238.68.129
+ d-i netcfg/get_nameservers string 217.11.48.200 217.11.49.200
+ d-i netcfg/confirm_static boolean true
+ EOF
+fi
+
+# Account setup
+echo 'user-setup-udeb passwd/shadow boolean true'
+if [ "$USER_NAME" = root ]; then
+ cat <<-EOF
+ user-setup-udeb passwd/root-login boolean true
+ user-setup-udeb passwd/root-password-crypted password $PASSWORD_CRYPTED
+ user-setup-udeb passwd/make-user boolean false
+ EOF
+else
+ cat <<-EOF
+ user-setup-udeb passwd/root-login boolean false
+ user-setup-udeb passwd/make-user boolean true
+ user-setup-udeb passwd/user-fullname string
+ user-setup-udeb passwd/username string $USER_NAME
+ user-setup-udeb passwd/user-password-crypted password $PASSWORD_CRYPTED
+ EOF
+fi
+
+# vim: set filetype=sh :