Skip to content

Instantly share code, notes, and snippets.

@cutwater
Last active February 12, 2016 14:50
Show Gist options
  • Save cutwater/20075ef299c4ae330445 to your computer and use it in GitHub Desktop.
Save cutwater/20075ef299c4ae330445 to your computer and use it in GitHub Desktop.
Ubuntu automated installation
default virtserver
label virtserver
menu label Install ^Virtual Server
kernel /install/vmlinuz
append file=/cdrom/preseed/virtual-server.seed debian-installer/locale=en_US.UTF-8 keyboard-configuration/layoutcode=us vga=788 initrd=/install/initrd.gz quiet --
label install
menu label ^Install Ubuntu Server
kernel /install/vmlinuz
append file=/cdrom/preseed/ubuntu-server.seed vga=788 initrd=/install/initrd.gz quiet --
label cloud
menu label ^Multiple server install with MAAS
kernel /install/vmlinuz
append modules=maas-enlist-udeb vga=788 initrd=/install/initrd.gz quiet --
label check
menu label ^Check disc for defects
kernel /install/vmlinuz
append MENU=/bin/cdrom-checker-menu vga=788 initrd=/install/initrd.gz quiet --
label memtest
menu label Test ^memory
kernel /install/mt86plus
label hd
menu label ^Boot from first hard disk
localboot 0x80
### Localization
# Preseeding only locale sets language, country and locale.
d-i debian-installer/language string en
d-i debian-installer/country string US
d-i debian-installer/locale string en_US.UTF-8
### Keyboard selection.
# Disable automatic (interactive) keymap detection.
d-i console-setup/ask_detect boolean false
#d-i keyboard-configuration/modelcode string pc105
d-i keyboard-configuration/layoutcode string us
### Network configuration
# netcfg will choose an interface that has link if possible. This makes it
# skip displaying a list if there is more than one interface.
d-i netcfg/choose_interface select auto
# Any hostname and domain names assigned from dhcp take precedence over
# values set here. However, setting the values still prevents the questions
# from being shown, even if values come from dhcp.
d-i netcfg/get_hostname string ubuntu
d-i netcfg/get_domain string
### Mirror settings
# If you select ftp, the mirror/country string does not need to be set.
#d-i mirror/protocol string ftp
d-i mirror/country string manual
d-i mirror/http/hostname string us.archive.ubuntu.com
d-i mirror/http/directory string /ubuntu
d-i mirror/http/proxy string
# Suite to install.
d-i mirror/suite string trusty
### Clock and time zone setup
# Controls whether or not the hardware clock is set to UTC.
d-i clock-setup/utc boolean true
# You may set this to any valid setting for $TZ; see the contents of
# /usr/share/zoneinfo/ for valid values.
d-i time/zone string UTC
# Controls whether to use NTP to set the clock during the install
d-i clock-setup/ntp boolean true
# NTP server to use. The default is almost always fine here.
#d-i clock-setup/ntp-server string ntp.example.com
### Partitioning
## Partitioning example
d-i partman-auto/disk string /dev/sda
d-i partman-auto/method string regular
d-i partman-auto/basicfilesystems/choose_label string gpt
d-i partman-auto/basicfilesystems/default_label string gpt
d-i partman-partitioning/choose_label string gpt
d-i partman-partitioning/default_label string gpt
d-i partman/choose_label string gpt
d-i partman/default_label string gpt
d-i partman-auto/choose_recipe select custom
d-i partman-auto/expect_recipe string \
custom :: \
1 1 1 free \
$gptonly{ } \
$primary{ } \
$bios_boot{ } \
method{ biosgrub } \
. \
8192 10000 -1 ext4 \
$gptonly{ } \
$primary{ } \
method{ format } format{ } \
use_filesystem{ } \
filesystem{ ext4 } \
mountpoint{ / } \
.
# d-i partman/choose_partition select Finish partitioning and write changes to disk
#d-i partman/default_filesystem string ext4
# This makes partman automatically partition without confirmation, provided
# that you told it what to do using one of the methods above.
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
# Skip question about not having swap partition
d-i partman-basicfilesystems/no_swap boolean false
### Base system installation
# The kernel image (meta) package to be installed; "none" can be used if no
# kernel is to be installed.
#d-i base-installer/kernel/image string linux-generic
### Account setup
# Skip creation of a root account (normal user account will be able to
# use sudo). The default is false; preseed this to true if you want to set
# a root password.
d-i passwd/root-login boolean true
# Alternatively, to skip creation of a normal user account.
d-i passwd/make-user boolean false
# Root password, either in clear text
d-i passwd/root-password password r00tme
d-i passwd/root-password-again password r00tme
d-i user-setup/allow-password-weak boolean true
# Set to true if you want to encrypt the first user's home directory.
d-i user-setup/encrypt-home boolean false
### Apt setup
# You can choose to install restricted and universe software, or to install
# software from the backports repository.
d-i apt-setup/restricted boolean true
d-i apt-setup/universe boolean true
d-i apt-setup/backports boolean true
### Package selection
tasksel tasksel/first multiselect openssh-server
tasksel tasksel/force-tasks string server
d-i pkgsel/upgrade select safe-upgrade
d-i pkgsel/update-policy select none
### Boot loader installation
# Grub is the default boot loader (for x86). If you want lilo installed
# instead, uncomment this:
#d-i grub-installer/skip boolean true
# To also skip installing lilo, and install no bootloader, uncomment this
# too:
#d-i lilo-installer/skip boolean true
d-i grub-installer/only_debian boolean true
d-i grub-installer/with_other_os boolean true
d-i debian-installer/quiet boolean false
d-i debian-installer/splash boolean false
d-i grub-installer/timeout string 2
d-i finish-install/reboot_in_progress note
# Workaround for "Unmount partitions that are in use?" question
d-i preseed/early_command string umount /media || true
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment