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
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
|
help: >
pxeboot.write extension.
This write extension will serve your generated system over NFS to
the target system.
In all modes `location` is the mac address of the interface that
the target will PXE boot from. This is used so that the target will
load the configuration file appropriate to it.
# `PXEBOOT_MODE`
It has 4 modes, which can be specified with PXEBOOT_MODE, or inferred
from which parameters are passed:
## spawn-vlan
Specify PXEBOOT_DEPLOYER_INTERFACE and PXEBOOT_VLAN to configure
the target to pxeboot on a vlan and spawn a dhcp, nfs and tftp
server. This is potentially the fastest, since it doesn't need to
copy data to other servers.
This will create a vlan interface for the interface specified in
PXEBOOT_DEPLOYER_INTERFACE and spawn a dhcp server which serves
pxelinux.0, a configuration file and a kernel image from itself.
The configuration file informs the target to boot with a kernel
command-line that uses an NFS root served from the deployment host.
## spawn-novlan
Specify PXEBOOT_DEPLOYER_INTERFACE without PXEBOOT_VLAN to configure
like `spawn-vlan`, but without creating the vlan interface.
This assumes that you have exclusive access to the interface, such
as if you're plugged in to the device directly, or your interface
is vlanned by your infrastructure team.
This is required if you are serving from a VM and bridging it to the
correct network via macvtap. For this to work, you need to macvtap
bridge to a pre-vlanned interface on your host machine.
## existing-dhcp
Specify PXEBOOT_DEPLOYER_INTERFACE and PXEBOOT_CONFIG_TFTP_ADDRESS
to put config on an existing tftp server, already configured by the
dhcp server.
This spawns a tftp server and configures the local nfs server, but
doesn't spawn a dhcp server. This is useful if you have already got a
dhcp server that serves PXE images.
PXEBOOT_CONFIG_TFTP_ADDRESS is a URL in the form `sftp://$HOST/$PATH`.
The configuration file is copied to `$PATH/pxelinux.cfg/` on the
target identified by `$HOST`.
## existing-server
Specify at least PXEBOOT_CONFIG_TFTP_ADDRESS and
PXEBOOT_ROOTFS_RSYNC_ADDRESS to specify existing servers to copy
config, kernels and the rootfs to.
Configuration is copied to the target as `existing-dhcp`.
Specify PXEBOOT_KERNEL_TFTP_ADDRESS if the tftp server that the
kernel must be downloaded from is different to that of the pxelinux
configuration file.
PXEBOOT_ROOTFS_RSYNC_ADDRESS is a rsync URL describing where to copy
nfsroots to where they will be exported by the NFS server.
Specify PXEBOOT_ROOTFS_NFSROOT if the nfsroot appears as a different
address from the target's perspective.
# IPMI commands
After the PXE boot has been set up, the target needs to be rebooted
in PXE mode.
If the target is IPMI enabled, you can set `IPMI_USER`, `IPMI_HOST`
and `IPMI_PASSWORD` to make it reboot the target into netboot mode
automatically.
If they are not specified, then instructions will be displayed, and
`pxeboot.write` will wait for you to finish.
If there are command-line automation tools for rebooting the target
in netboot mode, then appropriate commands can be defined in the
following variables.
## PXEBOOT_PXE_REBOOT_COMMAND
This command will be used to reboot the target device with its boot
device set to PXE boot.
## PXEBOOT_REBOOT_COMMAND
This command will be used to reboot the target device in its default
boot mode.
## PXEBOOT_WAIT_INSTALL_COMMAND
If it is possible for the target to notify you that it has finished
installing, you can put a command in here to wait for the event.
# Misc
## KERNEL_ARGS
Additional kernel command line options. Note that the following
options
root=/dev/nfs ip=dhcp nfsroot=$NFSROOT`
are implicitly added by the extension.
## DTB_PATH
Location in the deployed root filesystem of the Flattened Device
Tree blob (FDT) to use.
## PXE_INSTALLER
If set to `no`, `False` or any other YAML value for false, the
remotely installed rootfs, kernel, bootloader config file and
device tree blob if specified, will not be removed after the
deployment finishes. This variable is only meanful on the
`existing-server` mode.
## PXEBOOT_TARGET_INTERFACE
Name of the interface of the target to pxeboot from. Some targets
with more than one interface try to get the rootfs from a different
interface than the interface from where the pxeboot server is
reachable. Using this variable, the kernel arguments will be filled
to include the device.
Note that the name of this interface is the kernel's default name,
usually called ethX, and is non-determinisic.
|