autoinstall 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 or /auto_upgrade.conf is found on bsd.rd's built-in RAM disk, autoinstall behaves as if the machine is netbooted, but uses the local response file. In case both files exist, /auto_install.conf takes precedence.

autoinstall uses HTTP to fetch one of the files install.conf, MAC_address -install.conf or hostname -install.conf for install answers, or one of upgrade.conf, MAC_address -upgrade.conf or hostname -upgrade.conf for upgrade answers. The URL used to fetch the file is constructed from dhcpd.conf(5) statements extracted from the dhclient(8) lease file. One of the statements server-name , option tftp-server-name , or next-server (in that order of priority) specify the server . One of the statements filename or option bootfile-name (in that order of priority) specify the filename . The statement option host-name specifies the hostname which is also used as the default hostname during installation.

If filename is auto_install , then the URLs tried are, in order:

http:// server / MAC_address -install.conf http:// server / hostname -install.conf http:// server /install.conf

where MAC_address is a string of six hex octets separated by colons representing the MAC address of the interface being used to fetch the files.

If filename is auto_upgrade , the URLs tried are, in order:

http:// server / MAC_address -upgrade.conf http:// server / hostname -upgrade.conf http:// server /upgrade.conf

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 and auto_upgrade 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 or auto_upgrade .

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

question 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) keys).

If autoinstall 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: