summaryrefslogtreecommitdiff
path: root/share/man/man8/autoinstall.8
blob: 8bc8122240945542d03d07afd4e409dbd79e356a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
.\"     $OpenBSD: autoinstall.8,v 1.5 2013/12/30 19:22:08 jmc Exp $
.\"
.\" Copyright (c) 2013 Robert Peichaer <rpe@openbsd.org>
.\"
.\" Permission to use, copy, modify, and distribute this software for any
.\" purpose with or without fee is hereby granted, provided that the above
.\" copyright notice and this permission notice appear in all copies.
.\"
.\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
.\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
.\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
.\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
.\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
.\"
.Dd $Mdocdate: December 30 2013 $
.Dt AUTOINSTALL 8
.Os
.Sh NAME
.Nm autoinstall
.Nd unattended OpenBSD installation and upgrade
.Sh DESCRIPTION
.Nm
allows unattended installation or upgrade of netbooted
.Ox
machines by automatically answering installer questions read from
a response file.
The information whether to install or upgrade and where to get the
response file from is obtained via DHCP.
The response file is downloaded from an HTTP server.
.Pp
The DHCP parameter
.Ql filename
controls the
.Nm
mode and has to contain either
.Ql auto_install
or
.Ql auto_upgrade .
On architectures where this parameter is used for netbooting, create
a symbolic link from the boot program to auto_install and/or
auto_upgrade.
The DHCP parameter
.Ql next-server
contains the IP address of the HTTP server.
Optionally, the DHCP parameter
.Ql host-name
is used to configure the hostname.
.Pp
Valid response file names are
.Ql install.conf ,
.Ql MAC-install.conf ,
.Ql upgrade.conf
and
.Ql MAC-upgrade.conf .
The MAC address of the netboot interface, in lowercase hex notation, can be
used to provide machine-specific response files, which have precedence.
The response files are fetched from the
.Ql DocumentRoot
of the HTTP server.
.Pp
The format of a response file is:
.Bd -literal -offset indent
question = answer
.Ed
.Pp
.Ql question
is an installer question (up to the question mark) or a non-ambiguous
part of it, consisting of whitespace separated words.
.Ql answer
is the answer to the question.
.Pp
If
.Nm
does not find an answer in the response file, the default answer as
provided by the installer is used.
.Sh FILES
.Bl -tag -width "/etc/dhcpd.confXXX" -compact
.It Pa /etc/dhcpd.conf
dhcpd(8) configuration file
.It Pa install.conf
response file for unattended installation
.It Pa upgrade.conf
response file for unattended upgrade
.El
.Sh EXAMPLES
A typical install.conf file will look something like this:
.Bd -literal -offset indent
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 = $2a$12$YXFAjVNUOZ9Pk...2uEW1QDTJDnW
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
.Ed
.Pp
It can be also used for upgrades by creating a symbolic link to
upgrade.conf.
.Pp
And an example
.Xr dhcpd.conf 5
host entry:
.Bd -literal -offset indent
host foo {
  hardware ethernet 00:50:60:49:8b:84;
  fixed-address 192.168.2.180;
  filename "auto_install";
  option host-name "foo";
}
.Ed
.Sh SEE ALSO
.Xr dhcpd.conf 5 ,
.Xr diskless 8