Preseed file
From Newroco Tech Docs
Revision as of 11:54, 11 September 2019 by Emilian.mitocariu (talk | contribs)
#### Contents of the preconfiguration file (for stretch) d-i auto-install/enable boolean true d-i debconf/priority string critical ### Localization # Preseeding only locale sets language, country and locale. d-i debian-installer/locale string en_US.UTF-8 d-i localechooser/supported-locales multiselect en_US.UTF-8, en_UK.UTF-8 # Keyboard selection. # Disable automatic (interactive) keymap detection. d-i console-setup/ask_detect boolean false d-i keyboard-configuration/xkb-keymap select 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 # To pick a particular interface instead: #d-i netcfg/choose_interface select ens3 # If you prefer to configure the network manually, uncomment this line and # the static network configuration below. d-i netcfg/disable_autoconfig boolean true # Static network configuration. # # IPv4 example d-i netcfg/get_ipaddress string 10.0.10.222 d-i netcfg/get_netmask string 255.255.0.0 d-i netcfg/get_gateway string 10.0.100.40 d-i netcfg/get_nameservers string 10.0.10.70 d-i netcfg/confirm_static boolean true # 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 vm-name d-i netcfg/get_domain string goo.thehumanjourney.net # If you want to force a hostname, regardless of what either the DHCP # server returns or what the reverse DNS entry for the IP is, uncomment # and adjust the following line. d-i netcfg/hostname string vm-name # Disable that annoying WEP key dialog. d-i netcfg/wireless_wep string # The wacky dhcp hostname that some ISPs use as a password of sorts. #d-i netcfg/dhcp_hostname string radish ### 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/protocol string http #d-i mirror/http/hostname string ports.ubuntu.com d-i mirror/http/mirror select gb.archive.ubuntu.com 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 testing ### Account setup # Skip creation of a root account (normal user account will be able to # use sudo). d-i passwd/root-login boolean false # To create a normal user account. d-i passwd/user-fullname string username d-i passwd/username string username # Normal user's password, either in clear text d-i passwd/user-password password password d-i passwd/user-password-again password password d-i user-setup/allow-password-weak boolean true d-i user-setup/encrypt-home 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 Etc/UTC d-i clock-setup/ntp boolean true d-i clock-setup/ntp-server string ntp.ubuntu.com ### Partitioning ## Partitioning example # If the system has free space you can choose to only partition that space. # This is only honoured if partman-auto/method (below) is not set. #d-i partman-auto/init_automatically_partition select biggest_free d-i preseed/early_command string umount /media || true d-i live-installer/enable boolean false # Alternatively, you may specify a disk to partition. If the system has only # one disk the installer will default to using that, but otherwise the device # name must be given in traditional, non-devfs format (so e.g. /dev/sda # and not e.g. /dev/discs/disc0/disc). # For example, to use the first SCSI/SATA hard disk: d-i partman-auto/disk string /dev/vda # 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 lvm # 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 # 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 #d-i partman/default_filesystem string ext4 # The full recipe format is documented in the file partman-auto-recipe.txt # included in the 'debian-installer' package or available from D-I source # repository. This also documents how to specify settings such as file # system labels, volume group names and which physical devices to include # in a volume group. # partitioning # Physical partitions: # LVM, with the following logical volumes # - Swap: value given in script # - Root partition: all remaining, ext4. d-i partman-auto/expert_recipe string \ boot-root :: \ 2048 2048 2048 linux-swap \ lv_name{ swap } \ method{ swap } format{ } \ $lvmok{ } \ . \ 1024 1024 -1 ext4 \ lv_name{ root } \ method{ lvm } format{ } \ use_filesystem{ } filesystem{ ext4 } \ mountpoint{ / } \ $lvmok{ } \ . \ # For additional information see the file partman-auto-raid-recipe.txt # included in the 'debian-installer' package or available from D-I source # repository. # This makes partman automatically partition without confirmation. 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 d-i base-installer/install-recommends boolean true d-i base-installer/kernel/image string linux-generic ### Apt setup ### Package selection tasksel tasksel/first multiselect ubuntu-server # Individual additional packages to install d-i pkgsel/include string openssh-server vim # Whether to upgrade packages after debootstrap. # Allowed values: none, safe-upgrade, full-upgrade d-i pkgsel/upgrade select full-upgrade ### 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 # During installations from serial console, the regular virtual consoles # (VT1-VT6) are normally disabled in /etc/inittab. Uncomment the next # line to prevent this. #d-i finish-install/keep-consoles boolean true # Avoid that last message about the install being complete. d-i finish-install/reboot_in_progress note # This will power off the machine instead of just halting it. d-i debian-installer/exit/poweroff boolean true ### Preseeding other packages # Depending on what software you choose to install, or if things go wrong # during the installation process, it's possible that other questions may # be asked. You can preseed those too, of course. To get a list of every # possible question that could be asked during an install, do an # installation, and then run these commands: # debconf-get-selections --installer > file # debconf-get-selections >> file #### Advanced options ### Running custom commands during the installation # d-i preseeding is inherently not secure. Nothing in the installer checks # for attempts at buffer overflows or other exploits of the values of a # preconfiguration file like this one. Only use preconfiguration files from # trusted locations! To drive that home, and because it's generally useful, # here's a way to run any shell command you'd like inside the installer, # automatically. # This first command is run as early as possible, just after # preseeding is read. #d-i preseed/early_command string anna-install some-udeb # This command is run immediately before the partitioner starts. It may be # useful to apply dynamic partitioner preseeding that depends on the state # of the disks (which may not be visible when preseed/early_command runs). #d-i partman/early_command \ # string debconf-set partman-auto/disk "$(list-devices disk | head -n1)" # This command is run just before the install finishes, but when there is # still a usable /target directory. You can chroot to /target and use it # directly, or use the apt-install and in-target commands to easily install # packages and run commands in the target system. #d-i preseed/late_command string apt-install zsh; in-target chsh -s /bin/zsh