AUTOINSTALL(8)

NAME
autoinstall - unattended OpenBSD installation and upgrade

DESCRIPTION
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.

  AUTOINSTALL METHODS
The first method is to choose '(A)utoinstall' at the install prompt. If there is only one network interface, the installer will fetch 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.

The second method is to netboot the machine. In this situation autoinstall feature will be invoked if the user does not intervene within a short time. It will behave as if the user selected '(A)utoinstall', but will always fetch the response file via the netboot interface.

  FETCHING THE RESPONSE FILE
autoinstall will use HTTP to fetch one of the files ‘install.conf’ or ‘<MAC address>-install.conf’ for install answers, and one of ‘upgrade.conf’ or ‘<MAC address>-upgrade.conf’ for upgrade answers. The URL used to fetch the file is constructed from information provided in the DHCP options ‘next-server’ and ‘filename’. If ‘filename’ is ‘auto_install’ then the URLs tried are, in order:

    http://<next-server>/<MAC address>-install.conf
    http://<next-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://<next-server>/<MAC address>-upgrade.conf
    http://next-server/upgrade.conf

On architectures where ‘filename’ 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 option in the dhcpd.conf file to be auto_install or auto_upgrade.

Note that in these cases, the HTTP server and TFTP server must be on the same machine.

  RESPONSE FILE FORMAT
The format of a response file is:

    question = answer

‘question’ is an installer question (up to 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.

FILES
/etc/dhcpd.conf
    dhcpd(8) configuration file
install.conf
    response file for unattended installation
upgrade.conf
    response file for unattended upgrade

EXAMPLES
A typical install.conf file will look something like this:

    System hostname = server1
    Password for root = $2a$14$Z4xRMg8vDpgYH...GVot3ySoj8yby
    Change the default console to com0 = yes
    Which speed should com0 use = 19200
    Setup a user = puffy
    Password for user = *************
    Public ssh key for user = ssh-rsa AAAAB3...RVtZJL puffy@ai
    What timezone are you in = Europe/Stockholm
    Location of sets = http
    Server = ftp.eu.openbsd.org

The same file could be used for upgrades by creating a symbolic link called upgrade.conf that points to install.conf. The upgrade process will only use the answers it needs.

And an example dhcpd.conf(5) host entry:

    host foo {
      hardware ethernet 00:50:60:49:8b:84;
      fixed-address 192.168.2.180;
      filename "auto_install";
      option host-name "foo";
    }

SEE ALSO
dhcpd.conf(5), diskless(8)