Skip to content

Instantly share code, notes, and snippets.

@ThinGuy
Created October 12, 2017 22:31
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ThinGuy/cc19cfef7529f0ef373c52ecf40db0a1 to your computer and use it in GitHub Desktop.
Save ThinGuy/cc19cfef7529f0ef373c52ecf40db0a1 to your computer and use it in GitHub Desktop.
OrangeBox Preseed File
# Preseed file for Canonical OrangeBox
# Part of OBInstaller Automation Scripts
# by Craig Bender <craig.bender@canonical.com>
# Locale
d-i debian-installer/locale string en_US.UTF-8
# No splash
d-i debian-installer/splash boolean false
# Early Commands
#d-i preseed/early_command string
# Keyboard layout
d-i console-setup/ask_detect boolean false
d-i console-setup/layoutcode string us
d-i console-setup/variantcode string
d-i keyboard-configuration/xkb-keymap select us
# Network configuration
d-i netcfg/choose_interface select auto
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/get_nameservers string 8.8.8.8
d-i netcfg/get_ipaddress string 192.168.88.2
d-i netcfg/get_netmask string 255.255.255.0
d-i netcfg/get_gateway string 192.168.88.1
d-i netcfg/confirm_static boolean true
d-i hw-detect/load_firmware boolean true
# Hostname is set as a install arg
d-i netcfg/get_domain string maass
# Local clock (set to UTC and use ntp)
d-i clock-setup/utc boolean true
d-i time/zone string Etc/UTC
d-i clock-setup/ntp boolean true
d-i clock-setup/ntp-server string
# Partitioning
#Set smaller of two non-USB disks to be the root volume
d-i partman/early_command string debconf-set partman-auto/disk "$(fdisk -l $(readlink -e $(ls /dev/disk/by-id/*|grep -oE '^.*/[^usb].*[^-part0-9]$')|grep 'sd')|awk '/Disk \//{print $5,$2}'|sort -u|grep -m1 -oP '(?<=[0-9]\ )[^:]+')";
d-i partman-iscsi/mainmenu string finish
d-i partman-auto/method string regular
d-i partman-lvm/device_remove_lvm boolean true
d-i partman-lvm/confirm boolean true
d-i partman-md/device_remove_md boolean true
d-i partman/confirm_write_new_label boolean true
d-i partman/choose_partition select Finish partitioning and write changes to disk
d-i partman/confirm boolean true
d-i partman/confirm_nooverwrite boolean true
d-i partman/default_filesystem string ext4
# use a server kernel unless overridden by the 'kernelimage' Metavar
d-i base-installer/kernel/image string linux-generic-hwe-16.04-edge
# User Setup
d-i passwd/root-login boolean false
d-i passwd/make-user boolean true
d-i passwd/user-fullname string Ubuntu user
d-i passwd/username string ubuntu
d-i passwd/user-password password canonical
d-i passwd/user-password-again password canonical
d-i passwd/user-uid string 1000
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 debian-tor lpadmin plugdev sambashare libvirtd lxd
# APT Setup
d-i apt-setup/restricted boolean true
d-i apt-setup/backports boolean true
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
### Add LXD Repo to APT Sources
#LXD PPA
d-i apt-setup/local0/repository string http://ppa.launchpad.net/ubuntu-lxc/lxd-stable/ubuntu xenial main
d-i apt-setup/local0/source boolean true
d-i apt-setup/local0/key string http://keyserver.ubuntu.com:11371/pks/lookup?search=0x93763ac528c8c52568951be0d5495f657635b973&op=get
### Add MaaS Repo to APT Sources
#MaaS PPA
d-i apt-setup/local1/repository string http://ppa.launchpad.net/maas/next/ubuntu xenial main
d-i apt-setup/local1/source boolean true
d-i apt-setup/local1/key string http://keyserver.ubuntu.com:11371/pks/lookup?search=0x3AB6DCF1F234E78DAA9C104204E7FDC5684D4A1C&op=get
### Add Juju Repo to APT Sources
#Juju PPA
d-i apt-setup/local2/repository string http://ppa.launchpad.net/juju/devel/ubuntu xenial main
d-i apt-setup/local2/source boolean true
d-i apt-setup/local2/key string http://keyserver.ubuntu.com:11371/pks/lookup?search=0xA2EB2DEC0BD7519B7B38BE38376A290EC8068B11&op=get
### Add Landscape Repo to APT Sources
#Landscape PPA
d-i apt-setup/local3/repository string http://ppa.launchpad.net/landscape/17.03/ubuntu xenial main
d-i apt-setup/local3/source boolean true
d-i apt-setup/local3/key string http://keyserver.ubuntu.com:11371/pks/lookup?search=0x6e85a86e4652b4e6&op=get
# By default the installer requires that repositories be authenticated
# using a known gpg key. This setting can be used to disable that
# authentication. Warning: Insecure, not recommended.
d-i debian-installer/allow_unauthenticated string true
# Packages
d-i pkgsel/language-packs multiselect en
d-i pkgsel/update-policy select unattended-upgrades
# Install minimum packages that are essential for server bootstrapping
d-i pkgsel/include string amtterm apache2 apt-mirror bsdmainutils bridge-utils build-essential byobu bzr ccze charm-tools chromium-browser coreutils criu dmidecode expect figlet gawk git gitweb iftop ipcalc jq juju landscape-client libglib2.0-bin libvirt-bin libspice-server1 libvirt-bin libvirt-clients libvirt-daemon libvirt-daemon-system libvirt-doc openssh-client openssh-server python-libvirt ssh-import-id libqcow-utils libqcow1 libspice-client-glib-2.0-8 libspice-client-gtk-3.0-5 libvirt-glib-1.0-0 libvirt-ocaml libvirt-sandbox-1.0-5 libvirt-sanlock lxqt-openssh-askpass spice-client-glib-usb-acl-helper spice-client-gtk spice-html5 spice-vdagent spice-webdavd ssh-agent-filter ssh-askpass ssh-askpass-fullscreen ssh-askpass-gnome ssh-audit ssh-contact ssh-contact-client ssh-contact-service ssh-cron ssh-krb5 virt-goodies virt-manager virt-sandbox virt-top virt-viewer virt-what lxd lxd-client maas multitail nfs-common nfs-kernel-server nload nmap openssh-server pastebinit picocom ppa-purge python-glanceclient python-keystone python-neutronclient python-novaclient python-openstackclient qemu-block-extra qemu-efi qemu-kvm qemu-system qemu-system-common qemu-utils remmina ruby simplestreams snapd software-properties-common sysstat sshpass tgt toilet traceroute tree ttf-ubuntu-font-family ubuntu-cloudimage-keyring ubuntu-restricted-addons unzip vim virtinst virt-manager vlan wget wmctrl wsmancli x11vnc xdotool zfsutils-linux
d-i pkgsel/upgrade select full-upgrade
d-i pkgsel/updatedb boolean true
# Bootloader
d-i grub-installer/skip boolean false
d-i lilo-installer/skip boolean false
d-i grub-installer/only_debian boolean false
d-i grub-installer/with_other_os boolean false
grub-pc grub-pc/install_devices string /dev/sda
d-i finish-install/keep-consoles boolean true
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
# Late Commands
d-i preseed/late_command string \
in-target echo 'ubuntu ALL=(ALL) NOPASSWD: ALL' > /target/etc/sudoers.d/ubuntu; \
in-target mkdir -p /target/srv/obinstall;cp -a /cdrom/scripts/. /target/srv/obinstall; \
in-target /cdrom/post.sh;
# End of Preseed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment