Skip to content

Instantly share code, notes, and snippets.

@ppouliot
Last active July 11, 2018 14:37
Show Gist options
  • Save ppouliot/78f25537a987fffa5579fe64a3caa036 to your computer and use it in GitHub Desktop.
Save ppouliot/78f25537a987fffa5579fe64a3caa036 to your computer and use it in GitHub Desktop.
# Preseed for ubuntu-16.04-amd64
# Dell R630
# Peter Pouliot <[email protected]>
#
d-i debian-installer/locale select en_US.UTF-8
d-i localechooser/supported-locales multiselect en_US.UTF-8
d-i localechooser/countrylist/North_America select US
d-i debian-installer/splash boolean false
d-i console-setup/ask_detect boolean false
d-i keyboard-configuration/layout select English (US)
d-i keyboard-configuration/variant select English (US)
# Setup Local Mirror
d-i mirror/http/hostname string archive.ubuntu.com
d-i mirror/http/directory string /ubuntu
# Partitioning
# Disk Partitioning
# Use LVM, and wipe out anything that already exists
d-i partman/choose_partition select finish
d-i partman/confirm boolean true
d-i partman/confirm_nooverwrite boolean true
d-i partman/default_filesystem string ext4
d-i partman-auto/method string lvm
d-i partman-auto-lvm/guided_size string max
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-auto-lvm/new_vg_name multiselect vg_system vg_drbd
d-i partman-md/device_remove_md boolean true
d-i partman-md/confirm boolean true
d-i partman-partitioning/confirm_write_new_label boolean true
d-i partman-auto/expert_recipe string \
drdb_cluster :: \
2048 50 -1 ext2 \
$primary{} \
$bootable{} \
method{ format } \
format{"/dev/sda"} \
use_filesystem{ } \
filesystem{ ext2 } \
mountpoint{ /boot } \
. \
2048 100 -1 lvm \
$defaultignore{ } \
$primary{ } \
method{ lvm } \
device{ /dev/sdb } \
vg_name{ vg_system } \
. \
10480 800 -1 ext4 \
$lvmok{ } \
lv_name{ lv_root } \
in_vg{ vg_system } \
method{ format } \
format{ } \
use_filesystem{ } \
filesystem{ ext4 } \
mountpoint{ / } \
. \
2048 512 200% linux-swap \
$lvmok{ } \
lv_name{ lv_swap } \
in_vg{ vg_system } \
method{ swap } \
format{ } \
. \
2048 1000 -1 lvm \
$defaultignore{ } \
$primary{ } \
method{ lvm } \
device{ /dev/sdc } \
vg_name{ vg_drbd } \
. \
20480 1000 20480 ext3 \
$lvmok{ } \
lv_name{ lv_etc_libvirt_qemu } \
in_vg{ vg_drbd } \
method{ format } \
format{ } \
. \
20480 1000 20480 ext3 \
$lvmok{ } \
lv_name{ lv_etc_libvirt_qemu } \
in_vg{ vg_drbd } \
method{ format } \
format{ } \
. \
# Time Setup
d-i clock-setup/utc boolean true
tzsetup-udeb tzsetup/country/US select US/Eastern
d-i clock-setup/ntp boolean true
d-i clock-setup/ntp-server string time.nist.gov
# Kernel
d-i base-installer/kernel/image string linux-image-amd64
# User Setup
#d-i passwd/root-login boolean true
d-i passwd/root-login boolean false
#d-i passwd/root-password password r00tme
#d-i passwd/root-password-again password r00tme
d-i passwd/user-uid string
d-i passwd/make-user boolean true
d-i passwd/user-fullname string ubuntu
d-i passwd/username string ubuntu
d-i passwd/user-password password ubuntu
d-i passwd/user-password-again password ubuntu
d-i user-setup/allow-password-weak boolean true
d-i user-setup/encrypt-home boolean false
d-i passwd/user-default-groups string adm cdrom dialout lpadmin plugdev sambashare
d-i apt-setup/services-select multiselect security
#d-i apt-setup/security_host string security.ubuntu.com
#d-i apt-setup/security_path string /ubuntu
# PuppetLabs Repo
d-i apt-setup/local0/repository string http://apt.puppet.com/ bionic main
d-i apt-setup/local0/key string http://apt.puppet.com/pubkey.gpg
d-i debian-installer/allow_unauthenticated string false
# Packages
d-i pkgsel/include string vim screen git net-tools openssh-server software-properties-common
d-i pkgsel/upgrade select safe-upgrade
d-i pkgsel/language-packs multiselect
# Update Policy
d-i pkgsel/update-policy select unattend-upgrades
#d-i pkgsel/update-policy select none
d-i pkgsel/updatedb boolean true
# Bootloader Configuration
d-i grub-installer/skip boolean false
d-i grub-installer/bootdev string /dev/sdb
d-i lilo-installer/skip boolean false
d-i grub-installer/only_debian boolean true
d-i grub-installer/with_other_os boolean true
d-i finish-install/keep-consoles boolean false
d-i finish-install/reboot_in_progress note
d-i cdrom-detect/eject boolean true
d-i debian-installer/exit/halt boolean false
d-i debian-installer/exit/poweroff boolean false
byobu byobu/launch-by-default boolean true
# Example
d-i preseed/late_command string chroot /target \
sh -c "/usr/bin/wget http://i.pxe.to/bin/postinstall -O /tmp/postinstall && /bin/sh -x /tmp/postinstall"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment