Created
October 9, 2019 15:11
-
-
Save Gargravarr2112/d24d07ed996484d8c9b0ec9f6dfe533f to your computer and use it in GitHub Desktop.
Ubuntu preseed to install an 18.04 Desktop OS with disk encryption
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#### Contents of the preconfiguration file (for bionic) | |
### Localization | |
# Preseeding only locale sets language, country and locale. | |
d-i debian-installer/locale string en_GB | |
# Keyboard selection. | |
# Disable automatic (interactive) keymap detection. | |
d-i console-setup/ask_detect boolean false | |
d-i keyboard-configuration/xkb-keymap select gb | |
### 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 | |
d-i netcfg/get_hostname string <default-hostname> | |
# If non-free firmware is needed for the network or other hardware, you can | |
# configure the installer to always try to load it, without prompting. Or | |
# change to false to disable asking. | |
d-i hw-detect/load_firmware boolean true | |
### Mirror settings | |
# If you select ftp, the mirror/country string does not need to be set. | |
d-i mirror/country string manual | |
d-i mirror/http/hostname string <mirror-of-choice> | |
d-i mirror/http/directory string /ubuntu | |
d-i mirror/http/proxy string | |
# Suite to install. | |
#d-i mirror/suite string xenial | |
# Suite to use for loading installer components (optional). | |
#d-i mirror/udeb/suite string xenial | |
# Components to use for loading installer components (optional). | |
d-i mirror/udeb/components multiselect main, restricted | |
### Account setup | |
d-i passwd/root-login boolean true | |
d-i passwd/root-password-crypted password <crypted-password> | |
d-i passwd/make-user boolean false | |
### 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 <TZ-string> | |
# 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-server-of-choice> | |
### Partitioning | |
#Get around the prompt for UEFI-only | |
d-i partman-efi/non_efi_system boolean true | |
d-i partman/default_filesystem string ext4 | |
#If the machine may have mutliple disks, set the default root disk here | |
d-i partman-auto/disk string /dev/nvme0n1 | |
# In addition, you'll need to specify the method to use. | |
# The presently available methods are: | |
# - regular: use the usual partition types for your architecture | |
# - lvm: use LVM to partition the disk | |
# - crypto: use LVM within an encrypted partition | |
d-i partman-auto/method string crypto | |
d-i partman-crypto/passphrase password <disk-encryption-password> | |
d-i partman-crypto/passphrase-again password <disk-encryption-password> | |
# If one of the disks that are going to be automatically partitioned | |
# contains an old LVM configuration, the user will normally receive a | |
# warning. This can be preseeded away... | |
d-i partman-lvm/device_remove_lvm boolean true | |
# The same applies to pre-existing software RAID array: | |
d-i partman-md/device_remove_md boolean true | |
# And the same goes for the confirmation to write the lvm partitions. | |
d-i partman-lvm/confirm boolean true | |
d-i partman-lvm/confirm_nooverwrite boolean true | |
# For LVM partitioning, you can select how much of the volume group to use | |
# for logical volumes. | |
d-i partman-auto-lvm/guided_size string max | |
# You can choose one of the three predefined partitioning recipes: | |
# - atomic: all files in one partition | |
# - home: separate /home partition | |
# - multi: separate /home, /var, and /tmp partitions | |
d-i partman-auto/choose_recipe select atomic | |
# 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 | |
### Base system installation | |
### 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 | |
# Select which update services to use; define the mirrors to be used. | |
# Values shown below are the normal defaults. | |
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 | |
# Additional repositories, local[0-9] available | |
d-i apt-setup/local0/repository string <deb-string> | |
d-i apt-setup/local0/comment string <comment> | |
d-i apt-setup/local0/key string <GPG-signing-key-URL> | |
### Package selection | |
tasksel tasksel/first multiselect ubuntu-desktop | |
# Whether to upgrade packages after debootstrap. | |
# Allowed values: none, safe-upgrade, full-upgrade | |
d-i pkgsel/upgrade select full-upgrade | |
# Policy for applying updates. May be "none" (no automatic updates), | |
# "unattended-upgrades" (install security updates automatically), or | |
# "landscape" (manage system with Landscape). | |
d-i pkgsel/update-policy select unattended-upgrades | |
ubiquity ubiquity/success_command string <post-install-command> | |
# Some versions of the installer can report back on what software you have | |
# installed, and what software you use. The default is not to report back, | |
# but sending reports helps the project determine what software is most | |
# popular and include it on CDs. | |
popularity-contest popularity-contest/participate boolean false | |
# By default, the system's locate database will be updated after the | |
# installer has finished installing most packages. This may take a while, so | |
# if you don't want it, you can set this to "false" to turn it off. | |
d-i pkgsel/updatedb boolean true | |
### Boot loader installation | |
# This is fairly safe to set, it makes grub install automatically to the MBR | |
# if no other operating system is detected on the machine. | |
d-i grub-installer/only_debian boolean true | |
# This one makes grub-installer install to the MBR if it also finds some other | |
# OS, which is less safe as it might not be able to boot that other OS. | |
d-i grub-installer/with_other_os boolean true | |
### Finishing up the installation | |
# Avoid that last message about the install being complete. | |
d-i finish-install/reboot_in_progress note |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment