allows unattended installation or upgrade of OpenBSD
by automatically responding to installer questions with answers from a response file. autoinstall
uses DHCP to discover the location of the response file and HTTP to fetch the file. If that fails, the installer asks for the location which can either be a URL or a local path.
To start unattended installation or upgrade choose '(A)utoinstall' at the install prompt. If there is only one network interface, the installer fetches the response file via that interface. If there is more than one network interface, a selection is presented and the installer fetches the response file via the selected interface.
If the machine is netbooted, the autoinstall
feature is invoked if the user does not intervene within a short time. It behaves as if the user selected '(A)utoinstall', but always fetches the response file via the netboot interface.
If either /auto_install.conf
is found during boot, autoinstall
behaves as if the machine is netbooted, but uses the local response file. In case both files exist, /auto_install.conf
uses HTTP to fetch one of the files install.conf
for install answers, or one of upgrade.conf
for upgrade answers. The URL used to fetch the file is constructed from information provided in the dhcpd.conf(5)
. If filename
, then the URLs tried are, in order:
is a string of six hex octets separated by colons representing the MAC address of the interface being used to fetch the files, and hostname
is the hostname assigned to the system by DHCP.
, the URLs tried are, in order:
On architectures where the filename
statement is used to provide the name of the file to netboot it is necessary to create symbolic links called auto_install
that point to the expected boot program and to change the value of the filename
statement in the dhcpd.conf(5)
file to be auto_install
To use a subdirectory as response file location on the HTTP server, the same directory structure containing the symbolic links has to exist in the tftproot directory. The value of filename
has to be the full path to these symbolic links, and the HTTP and TFTP servers must be on the same machine.
The response file is a line-oriented ASCII text file. The format of each line is:
question = answer
is an installer question (not including the question mark) or a non-ambiguous part of it, consisting of whitespace separated words. answer
is the answer to the question. Passwords may be in plaintext, encrypted with encrypt(1)
, or set to ‘
’ (13 '*'s) to disable password logins, only permitting alternative access methods (for example, ssh(1)
does not find an answer in the response file, the default answer as provided by the installer is used.
The response file may contain answers to the following questions, which are only available during unattended installation to provide additional installer features:
Public ssh key for root account = ssh key
ssh key is stored in /root/.ssh/authorized_keys.
Public ssh key for user puffy = ssh key
ssh key is stored in ~puffy/.ssh/authorized_keys.
URL to autopartitioning template for disklabel = url
A template file for disklabel(8) autopartitioning is fetched from url allowing a custom partition layout for the root disk.