==================== Curtin Configuration ==================== Curtin exposes a number of configuration options for controlling Curtin behavior during installation. Configuration options --------------------- Curtin's top level config keys are as follows: - apt_mirrors (``apt_mirrors``) - apt_proxy (``apt_proxy``) - block-meta (``block``) - curthooks (``curthooks``) - debconf_selections (``debconf_selections``) - disable_overlayroot (``disable_overlayroot``) - grub (``grub``) - http_proxy (``http_proxy``) - install (``install``) - kernel (``kernel``) - kexec (``kexec``) - multipath (``multipath``) - network (``network``) - pollinate (``pollinate``) - power_state (``power_state``) - proxy (``proxy``) - reporting (``reporting``) - restore_dist_interfaces: (``restore_dist_interfaces``) - sources (``sources``) - stages (``stages``) - storage (``storage``) - swap (``swap``) - system_upgrade (``system_upgrade``) - write_files (``write_files``) apt_mirrors ~~~~~~~~~~~ Configure APT mirrors for ``ubuntu_archive`` and ``ubuntu_security`` **ubuntu_archive**: ** **ubuntu_security**: ** If the target OS includes /etc/apt/sources.list, Curtin will replace the default values for each key set with the supplied mirror URL. **Example**:: apt_mirrors: ubuntu_archive: http://local.archive/ubuntu ubuntu_security: http://local.archive/ubuntu apt_proxy ~~~~~~~~~ Curtin will configure an APT HTTP proxy in the target OS **apt_proxy**: ** **Example**:: apt_proxy: http://squid.mirror:3267/ block-meta ~~~~~~~~~~ Configure how Curtin selects and configures disks on the target system without providing a custom configuration (mode=simple). **devices**: ** The ``devices`` parameter is a list of block device paths that Curtin may select from with choosing where to install the OS. **boot-partition**: ** The ``boot-partition`` parameter controls how to configure the boot partition with the following parameters: **enabled**: ** Enabled will forcibly setup a partition on the target device for booting. **format**: *<['uefi', 'gpt', 'prep', 'mbr']>* Specify the partition format. Some formats, like ``uefi`` and ``prep`` are restricted by platform characteristics. **fstype**: ** Specify the filesystem format on the boot partition. **label**: ** Specify the filesystem label on the boot partition. **Example**:: block-meta: devices: - /dev/sda - /dev/sdb boot-partition: - enabled: True format: gpt fstype: ext4 label: my-boot-partition curthooks ~~~~~~~~~ Configure how Curtin determines what :ref:`curthooks` to run during the installation process. **mode**: *<['auto', 'builtin', 'target']>* The default mode is ``auto``. In ``auto`` mode, curtin will execute curthooks within the image if present. For images without curthooks inside, curtin will execute its built-in hooks. Currently the built-in curthooks support the following OS families: - Ubuntu - Centos When specifying ``builtin``, curtin will only run the curthooks present in Curtin ignoring any curthooks that may be present in the target operating system. When specifying ``target``, curtin will attempt run the curthooks in the target operating system. If the target does NOT contain any curthooks, then the built-in curthooks will be run instead. Any errors during execution of curthooks (built-in or target) will fail the installation. **Example**:: # ignore any target curthooks curthooks: mode: builtin # Only run target curthooks, fall back to built-in curthooks: mode: target debconf_selections ~~~~~~~~~~~~~~~~~~ Curtin will update the target with debconf set-selection values. Users will need to be familiar with the package debconf options. Users can probe a packages' debconf settings by using ``debconf-get-selections``. **selection_name**: ** ``debconf-set-selections`` is in the form:: **Example**:: debconf_selections: set1: | cloud-init cloud-init/datasources multiselect MAAS lxd lxd/bridge-name string lxdbr0 set2: lxd lxd/setup-bridge boolean true disable_overlayroot ~~~~~~~~~~~~~~~~~~~ Curtin disables overlayroot in the target by default. **disable_overlayroot**: ** **Example**:: disable_overlayroot: False grub ~~~~ Curtin configures grub as the target machine's boot loader. Users can control a few options to tailor how the system will boot after installation. **install_devices**: ** Specify a list of devices onto which grub will attempt to install. **replace_linux_default**: ** Controls whether grub-install will update the Linux Default target value during installation. **update_nvram**: ** Certain platforms, like ``uefi`` and ``prep`` systems utilize NVRAM to hold boot configuration settings which control the order in which devices are booted. Curtin by default will enable NVRAM updates to boot configuration settings. Users may disable NVRAM updates by setting the ``update_nvram`` value to ``False``. **probe_additional_os**: ** This setting controls grub's os-prober functionality and Curtin will disable this feature by default to prevent grub from searching for other operating systems and adding them to the grub menu. When False, curtin writes "GRUB_DISABLE_OS_PROBER=true" to target system in /etc/default/grub.d/50-curtin-settings.cfg. If True, curtin won't modify the grub configuration value in the target system. **terminal**: *<['unmodified', 'console', ...]>* Configure target system grub option GRUB_TERMINAL ``terminal`` value which is written to /etc/default/grub.d/50-curtin-settings.cfg. Curtin does not attempt to validate this string, grub2 has many values that it accepts and the list is platform dependent. If ``terminal`` is not provided, Curtin will set the value to 'console'. If the ``terminal`` value is 'unmodified' then Curtin will not set any value at all and will use Grub defaults. **reorder_uefi**: ** Curtin is typically used with MAAS where the systems are configured to boot from the network leaving MAAS in control. On UEFI systems, after installing a bootloader the systems BootOrder may be updated to boot from the new entry. This breaks MAAS control over the system as all subsequent reboots of the node will no longer boot over the network. Therefore, if ``reorder_uefi`` is True curtin will modify the UEFI BootOrder settings to place the currently booted entry (BootCurrent) to the first option after installing the new target OS into the UEFI boot menu. The result is that the system will boot from the same device that it booted to run curtin; for MAAS this will be a network device. On some UEFI systems the BootCurrent entry may not be present. This can cause a system to not boot to the same device that it was previously booting. If BootCurrent is not present, curtin will update the BootOrder such that all Network related entries are placed before the newly installed boot entry and all other entries are placed at the end. This enables the system to network boot first and on failure will boot the most recently installed entry. This setting is ignored if *update_nvram* is False. **reorder_uefi_force_fallback**: ** The fallback reodering mechanism is only active if BootCurrent is not present in the efibootmgr output. The fallback reordering method may be enabled even if BootCurrent is present if *reorder_uefi_force_fallback* is True. This setting is ignored if *update_nvram* or *reorder_uefi* are False. **remove_duplicate_entries**: <*boolean: default True>* When curtin updates UEFI NVRAM it will remove duplicate entries that are present in the UEFI menu. If you do not wish for curtin to remove duplicate entries setting *remove_duplicate_entries* to False. This setting is ignored if *update_nvram* is False. **Example**:: grub: install_devices: - /dev/sda1 replace_linux_default: False update_nvram: True terminal: serial remove_duplicate_entries: True **Default terminal value, GRUB_TERMINAL=console**:: grub: install_devices: - /dev/sda1 **Don't set GRUB_TERMINAL in target**:: grub: install_devices: - /dev/sda1 terminal: unmodified **Allow grub to probe for additional OSes**:: grub: install_devices: - /dev/sda1 probe_additional_os: True **Avoid writting any settings to etc/default/grub.d/50-curtin-settings.cfg**:: grub: install_devices: - /dev/sda1 probe_additional_os: True terminal: unmodified **Enable Fallback UEFI Reordering**:: grub: reorder_uefi: true reorder_uefi_force_fallback: true http_proxy ~~~~~~~~~~ Curtin will export ``http_proxy`` value into the installer environment. **Deprecated**: This setting is deprecated in favor of ``proxy`` below. **http_proxy**: ** **Example**:: http_proxy: http://squid.proxy:3728/ install ~~~~~~~ Configure Curtin's install options. **log_file**: ** Curtin logs install progress by default to /var/log/curtin/install.log **log_file_append**: ** By default, curtin install will truncate the install log file (if it already exists). Setting ``log_file_append`` to true will cause curtin to open the file in append mode instead. **error_tarfile**: ** If error_tarfile is not None and curtin encounters an error, this tarfile will be created. It includes logs, configuration and system info to aid triage and bug filing. When unset, error_tarfile defaults to /var/log/curtin/curtin-logs.tar. **post_files**: ** Curtin by default will post the ``log_file`` value to any configured reporter. **save_install_config**: ** Curtin will save the merged configuration data into the target OS at the path of ``save_install_config``. This defaults to /root/curtin-install-cfg.yaml **save_install_logs**: ** Curtin will copy the install log to a specific path in the target filesystem. This defaults to /root/install.log **target**: ** Control where curtin mounts the target device for installing the OS. If this value is unset, curtin picks a suitable path under a temporary directory. If a value is set, then curtin will utilize the ``target`` value instead. **unmount**: *disabled* If this key is set to the string 'disabled' then curtin will not unmount the target filesystem when install is complete. This skips unmounting in all cases of install success or failure. **resume_data**: ** If specified and the file exists, curtin will load the data to resume an installation that has already been initiated. The target directory will not be expected to be empty. If the file does not exist, curtin will create it and store the necessary data so that one can resume the installation and run further stages later. **extra_rsync_args**: *list of extra arguments* Additional arguments to pass to rsync when copying files to the target system. **Example**:: install: log_file: /tmp/install.log error_tarfile: /var/log/curtin/curtin-error-logs.tar post_files: - /tmp/install.log - /var/log/syslog save_install_config: /root/myconf.yaml save_install_log: /var/log/curtin-install.log target: /my_mount_point unmount: disabled kernel ~~~~~~ Configure how Curtin selects which kernel to install into the target image. If ``kernel`` is not configured, Curtin will use the default mapping below and determine which ``package`` value by looking up the current release and current kernel version running. **fallback-package**: ** Specify a kernel package name to be used if the default package is not available. **mapping**: ** Default mapping for Releases to package names is as follows:: precise: 3.2.0: 3.5.0: -lts-quantal 3.8.0: -lts-raring 3.11.0: -lts-saucy 3.13.0: -lts-trusty trusty: 3.13.0: 3.16.0: -lts-utopic 3.19.0: -lts-vivid 4.2.0: -lts-wily 4.4.0: -lts-xenial xenial: 4.3.0: 4.4.0: **package**: ** Specify the exact package to install in the target OS. **Example**:: kernel: fallback-package: linux-image-generic package: linux-image-generic-lts-xenial mapping: - xenial: - 4.4.0: -my-custom-kernel kexec ~~~~~ Curtin can use kexec to "reboot" into the target OS. **mode**: ** Enable rebooting with kexec. **Example**:: kexec: mode: "on" multipath ~~~~~~~~~ Curtin will detect and autoconfigure multipath by default to enable boot for systems with multipath. Curtin does not apply any advanced configuration or tuning, rather it uses distro defaults and provides enough configuration to enable booting. **mode**: *<['auto', ['disabled']>* Defaults to auto which will configure enough to enable booting on multipath devices. Disabled will prevent curtin from installing or configuring multipath. **overwrite_bindings**: ** If ``overwrite_bindings`` is True then Curtin will generate new bindings file for multipath, overriding any existing binding in the target image. **Example**:: multipath: mode: auto overwrite_bindings: True network ~~~~~~~ Configure networking (see Networking section for details). **network_option_1**: *