3. Profile-based installation#
In addition to the interactive installation described in the Univention Corporate Server - Manual for users and administrators [1], a profile-based installation of UCS is also possible. With this method, the settings for the Debian Installer and Univention System Setup are specified in a preseed file.
The Debian Installer consists of a number of special-purpose components to perform each installation task. Each component performs its task, asking the user questions as necessary to do its job. The questions themselves are given priorities, and the priority of questions to be asked is set when the installer is started.
When a default installation is performed, only essential (priority=high)
questions will be asked. This results in a highly automated installation process
with little user interaction.
If there is a problem, the user will see an error screen, and the installer menu
may be shown in order to select some alternative action. Serious error
notifications are set to priority=critical so the user will always be
notified.
Power users may be more comfortable with a menu-driven interface, where each
step is controlled by the user rather than the installer performing each step
automatically in sequence. To use the installer in a manual, menu-driven way,
add the boot argument priority=medium.
If your hardware requires you to pass options to kernel modules as they are
installed, you will need to start the installer in “expert” mode. This can be
done by adding the boot argument priority=low.
Depending on the selected priority the installer will ask more or less
questions. The installer will either use internal default values or the values
from the profile. To perform the installation fully unattended all required
answers must be provided through the installation profile. Therefore
priority=critical should be specified under additional start
options for UCS systems using the profile from Example installation profile.
3.1. Structure of profile files#
An installation profile is a text file which can be edited with any editor. The
file must use the UTF-8 character encoding. Empty lines and lines starting with
a hash character (#) are ignored. All other lines should follow the four
column layout required by debconf, which is fully described in
Appendix B. Automating the installation using preseeding [2]:
# Comment
<owner> <question name> <question type> <value>
The owner of most questions will be d-i, which is the Debian Installer.
The question type depends on the questions and can be boolean, string
or select. Any questions not answered by the preseed file is asked
interactively and will prevent an unattended installation.
3.2. Example installation profile#
A template file is provided as
/usr/share/doc/univention-net-installer/examples/TEMPLATE.
Note
The file may be stored compressed with the .gz extension. Use
gunzip to extract a copy of that file.
It contains the minimum required settings to perform a fully automatic installation of a Managed Node with no additional software. It will use the German keyboard layout and language settings. It will re-partition the hard-disk without asking any questions and will use LVM to manage the disk space. No additional software will be installed.
1#
2# This file overwrites /proc/cmdline overwrites preseed.cfg in the InitRamFs!
3#
4
5#
6# The following options must be set through the PXE configuration
7#
8# Delay asking for locale and keyboard layout after preseeding via network
9#d-i auto-install/enable boolean true
10# Only ask for critical questions
11#d-i debconf/priority select critical
12# Disable graphical installer
13#d-i debian-installer/framebuffer boolean false
14
15# no live installer
16d-i live-installer/enable boolean false
17
18#
19# Use interfaces with link
20#
21d-i netcfg/dhcp_timeout string 60
22
23#
24# Use dummy hostname and domain
25#
26d-i netcfg/get_hostname string unassigned-hostname
27d-i netcfg/get_domain string unassigned-domain
28krb5-config krb5-config/default_realm string UNASSIGNED-REALM
29krb5-config krb5-config/kerberos_servers string localhost
30krb5-config krb5-config/admin_server string localhost
31
32#
33# Select German as default locale and for keyboard layout
34#
35d-i debian-installer/locale string de_DE.UTF-8
36d-i keyboard-configuration/xkb-keymap select de(nodeadkeys)
37#d-i keyboard-configuration/modelcode string pc105
38d-i ucr/xorg/keyboard/options/XkbModel string pc105
39#d-i keyboard-configuration/layoutcode string de
40d-i ucr/xorg/keyboard/options/XkbLayout string de
41#d-i keyboard-configuration/variantcode string nodeadkeys
42d-i ucr/xorg/keyboard/options/XkbVariant string nodeadkeys
43#d-i keyboard-configuration/optionscode string
44d-i ucr/xorg/keyboard/options/XkbOptions string
45#d-i debian-installer/keymap select de-latin1-nodeadkeys
46
47#
48# Configure local repository server
49#
50d-i debian-installer/allow_unauthenticated boolean true
51d-i mirror/country string manual
52d-i mirror/protocol select http
53d-i mirror/http/proxy string
54# The host name of the repository server is filled through the PXE configuration generated by UDM
55#d-i mirror/http/hostname string updates.software-univention.de
56d-i mirror/http/directory string /univention-repository/
57d-i mirror/codename string ucs507
58d-i mirror/suite string uc507
59d-i mirror/udeb/suite string ucs507
60
61#
62# Disable password for user 'root'
63#
64d-i passwd/root-login boolean true
65# Alternative: printf "secret" | mkpasswd -s -m sha-512
66d-i passwd/root-password-crypted string *
67d-i passwd/make-user boolean false
68
69#
70# Partition hard disk: Use "lvm" and one big "/" partition
71#
72# Choices: lvm crypto regular
73d-i partman-auto/method string lvm
74# Choices: atomic home multi
75d-i partman-auto/choose_recipe string atomic
76d-i partman-auto/init_automatically_partition select 60some_device_lvm
77d-i partman-auto/init_automatically_partition seen false
78d-i partman-auto-lvm/new_vg_name string vg_ucs
79d-i partman-lvm/device_remove_lvm boolean true
80d-i partman-md/device_remove_md boolean true
81d-i partman-lvm/confirm boolean true
82d-i partman-lvm/confirm_nooverwrite boolean true
83d-i partman-partitioning/confirm_write_new_label boolean true
84d-i partman/choose_partition select finish
85d-i partman/confirm boolean true
86d-i partman/confirm_nooverwrite boolean true
87
88# Pre-select the standard UCS kernel
89#d-i base-installer/kernel/image string linux-image-amd64
90d-i base-installer/includes string less univention-config
91d-i base-installer/debootstrap_script string /usr/share/debootstrap/scripts/sid
92
93#
94# Only minimal install
95#
96d-i apt-setup/use_mirror boolean false
97d-i apt-setup/no_mirror boolean true
98d-i apt-setup/services-select multiselect none
99d-i apt-setup/cdrom/set-first boolean false
100tasksel tasksel/first multiselect none
101d-i pkgsel/include string univention-system-setup-boot univention-management-console-web-server univention-management-console-module-setup linux-image-amd64 openssh-server univention-base-packages
102postfix postfix/main_mailer_type string No configuration
103openssh-server ssh/disable_cr_auth boolean false
104d-i ucf/changeprompt select keep_current
105d-i pkgsel/upgrade select none
106popularity-contest popularity-contest/participate boolean false
107
108#
109# Install GRUB in MBR by default on new systems
110#
111d-i grub-installer/only_debian boolean true
112d-i grub-installer/bootdev string default
113grub-pc grub-pc/install_devices multiselect
114grub-pc grub-pc/install_devices_empty boolean true
115
116#
117# After installation
118#
119d-i finish-install/reboot_in_progress note
120d-i cdrom-detect/eject boolean true
121
122#
123# Disable starting "Univention System Setup Boot"
124#
125d-i ucr/system/setup/boot/start string false
126
127#
128# Univention System Setup profile
129#
130#univention-system-setup-boot uss/root_password string
131univention-system-setup-boot uss/components string
132univention-system-setup-boot uss/packages_install string
133univention-system-setup-boot uss/packages_remove string
134# Choices: domaincontroller_master domaincontroller_backup domaincontroller_slave memberserver
135univention-system-setup-boot uss/server/role string memberserver
136#univention-system-setup-boot uss/ldap/base string dc=example,dc=com
Explain example
Line 8: These settings must be configured as PXE command line parameters in additional start options. They are listed here for reference only and cannot be changed through this file:
The parameter
auto-install/enableis used to switch the order of some installer modules: The network should be configured and thepreseed.cfgshould be loaded before the first questions about the locale settings are asked.The parameter
netcfg/choose_interface=autotells the installer to use the same interface which was used for the PXE boot.Also some of those early questions are asked at priority level
high. The priority level should be raised tocriticalto hide them.
The long parameter names can be abbreviated as
auto=true priority=critical interface=auto.Line 33: If the locale settings are not consistent, the installer will ask interactively for corrections. The keyboard related settings must be configured through Univention Configuration Registry - the questions starting with
keyboard-configuration/xkb-…will not work!Line 55: The location of the local repository is filled in through the PXE configuration. By default the value of the Univention Configuration Registry Variable
repository/online/serveris used. It can be over-written by specifying the value here in the profile file. For use with the public repository specifyupdates.software-univention.dehere.Line 66: By default no password is set, which will prevent logging in. It should be replaced by an encrypted password, which can be used by running a command like printf "secret" | mkpasswd -s -m sha-512
Line 70: By default all existing partitions will be wiped without asking any question! They will be replaced by a single file system for
/using LVM. See Appendix B. Automating the installation using preseeding [2] for more advanced partitioning schemas.Line 123: This section contains the UCS specific settings, which are normally configured through Univention System Setup. For an unattended installation the graphical installer is disabled. All other values starting with
uss/are copied to the installation profile. The variables are described in Overview of profile variables.
3.3. Overview of profile variables#
3.3.1. Profile variables - System properties#
The following profile variables can be used to specify basic properties of the computer such as the computer name, its role within the UCS domain and the name of the domain the computer should join.
Name |
Function |
|---|---|
|
The system role. You may choose from |
|
The computer name. The name must only contain the letters |
|
The name of the DNS domain in which the computer is joined. |
|
The name of the NetBIOS domain used by Samba. This variable should only by defined for the system role Primary Directory Node. |
|
Localization packages to be installed (locales). If more than one locale is specified, the locales are separated by blank spaces. |
|
The standard locale for the computer, e.g. |
|
The keyboard layout for the computer, specified in the form of an X11
key map entry, e.g. |
|
The time zone for the computer, e.g. |
|
The password for the |
3.3.2. Profile variables - LDAP settings and domain joins#
Automatically joining the computer into the domain is currently not supported for security reasons.
Name |
Function |
|---|---|
|
As standard, all computers apart from the Primary Directory Node attempt to join
the UCS domain in the course of the installation. If this parameter is
set to |
|
The base DN of the LDAP domain. In general, the base DN
|
3.3.3. Profile variables - Network configuration#
By default automatically installed systems use DHCP. The following profile variables can be used to specify the network configuration of the computer.
General information on the network configuration and the use of the name servers can be found in Chapter Network configuration of the Univention Corporate Server - Manual for users and administrators [1].
The settings for network cards must be performed completely. It is not possible
to leave individual settings blank. For example, if there is no IP address for
the device eth0 in the profile, in addition to the IP address, the
interfaces/eth0/netmask will also be requested.
Name |
Function |
|---|---|
|
If this parameter is set to If no DHCP offer is received, a random IP address from the link-local
network For manual configuration this parameter must be set to |
|
The IPv4 address of the physical network interface |
|
The network mask of the subnetwork from which the IPv4 address of
|
|
The IPv4 address of the gateway which the computer should use as standard. Alternatively, one can specify the computer name or the FQDN that can be resolved into the IP address. |
|
An IPv6 address of the physical network interface |
|
The prefix length of the IPv6 address of the physical network interface
|
|
The IPv6 address of the gateway which the computer should use as standard. It is not obligatory to enter a gateway for IPv6, but recommended. An IPv6 gateway configured here has preference over router advertisements, which might otherwise be able to change the route. |
|
If this setting is set to |
|
The IP address of the name server which should perform the name resolution. It is possible to specify up to three name servers. |
|
The IP address of the name server intended to serve as the forwarder for a locally installed DNS service. It is possible to specify up to three forwarders. |
|
The URL of a proxy server to be used when accessing the internet. The
specified URL is adopted in the Univention Configuration Registry variables |
3.3.4. Profile variables - Software selection#
The following profile variables refer to software packages which are to be installed on the computer.
Name |
Function |
|---|---|
|
This settings names packages which are additionally installed. If more than one package is specified, the packages are separated by blank spaces. |
|
This settings names packages which should be removed. If more than one package is specified, the packages are separated by blank spaces. |
3.3.5. Profile variables - SSL#
A SSL certification infrastructure is set up during installation of a Primary Directory Node. If no settings are configured, automatic names are given for the certificate.
Name |
Function |
|---|---|
|
The ISO country code of the certification body appearing in the certificate (root CA), specified with two capital letters. |
|
The region, county or province that appears in the certificate of the root CA. |
|
Place appearing in the certificate of the root CA. |
|
Name of the organization that appears in the certificate of the root CA. |
|
Name of the organizational unit or department of the organization that appears in the certificate of the root CA. |
|
Email address that appears in the certificate of the root CA. |