/[gentoo]/xml/htdocs/doc/en/gentoo-sparc-netboot-howto.xml
Gentoo

Diff of /xml/htdocs/doc/en/gentoo-sparc-netboot-howto.xml

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

Revision 1.7 Revision 1.8
1<?xml version='1.0' encoding="UTF-8"?> 1<?xml version='1.0' encoding="UTF-8"?>
2<!DOCTYPE guide SYSTEM "/dtd/guide.dtd"> 2<!DOCTYPE guide SYSTEM "/dtd/guide.dtd">
3<!-- $Header: /var/cvsroot/gentoo/xml/htdocs/doc/en/gentoo-sparc-netboot-howto.xml,v 1.7 2005/08/18 13:59:23 neysx Exp $ --> 3<!-- $Header: /var/cvsroot/gentoo/xml/htdocs/doc/en/gentoo-sparc-netboot-howto.xml,v 1.8 2005/08/18 14:27:28 neysx Exp $ -->
4 4
5<guide link="/doc/en/gentoo-sparc-netboot-howto.xml"> 5<guide link="/doc/en/gentoo-sparc-netboot-howto.xml">
6
6<title>Gentoo Linux based Netboot HOWTO</title> 7<title>Gentoo Linux based Netboot HOWTO</title>
8
7<author title="SPARC Developer"> 9<author title="SPARC Developer">
8 <mail link="weeve@gentoo.org">Jason Wever</mail> 10 <mail link="weeve@gentoo.org">Jason Wever</mail>
9</author> 11</author>
12
10<abstract> 13<abstract>
11Guide for setting up a netboot server for use with the Gentoo/SPARC netboot installation images. 14Guide for setting up a netboot server for use with the Gentoo/SPARC netboot
15installation images.
12</abstract> 16</abstract>
17
13<!-- The content of this document is licensed under the CC-BY-SA license --> 18<!-- The content of this document is licensed under the CC-BY-SA license -->
14<!-- See http://creativecommons.org/licenses/by-sa/2.5 --> 19<!-- See http://creativecommons.org/licenses/by-sa/2.5 -->
15<license/> 20<license/>
16 21
17<version>1.2</version> 22<version>1.2</version>
18<date>2005-08-18</date> 23<date>2005-08-18</date>
19 24
20<chapter> 25<chapter>
21<title>Introduction</title> 26<title>Introduction</title>
22<section> 27<section>
23<body> 28<body>
24 29
25<note> 30<note>
26This howto is currently very SPARC-centric and expecting that you will be 31This howto is currently very SPARC-centric and expecting that you will be
27setting up your netboot server on an existing Gentoo Linux machine. 32setting up your netboot server on an existing Gentoo Linux machine.
28</note> 33</note>
29 34
30<p> 35<p>
31This document will describe how to setup a network booting environment for a 36This document will describe how to setup a network booting environment for a
32Sun Microsystems SPARC or UltraSPARC based computer. The document assumes that 37Sun Microsystems SPARC or UltraSPARC based computer. The document assumes that
33you have an existing Gentoo Linux computer available to act as the netboot 38you have an existing Gentoo Linux computer available to act as the netboot
34server. 39server.
35</p> 40</p>
36 41
37<p> 42<p>
38Both the netboot server and netboot client will need to be on the same 43Both the netboot server and netboot client will need to be on the same network
39network subnet, as the ARP protocol is typically not forwarded across 44subnet, as the ARP protocol is typically not forwarded across different network
40different network subnets. 45subnets.
41</p> 46</p>
42 47
43<p> 48<p>
44A generic overview of what happens during the netboot process is as follows; 49A generic overview of what happens during the netboot process is as follows;
45</p> 50</p>
46 51
47<ol> 52<ol>
48 <li> 53 <li>
49 Client machine sends out a reverse ARP (RARP) request to get an IP address. 54 Client machine sends out a reverse ARP (RARP) request to get an IP address
50 </li>
51 <li> 55 </li>
52 A server machine returns a response to the client with the IP address. 56 <li>A server machine returns a response to the client with the IP address</li>
53 </li> 57 <li>
54 <li>
55 The client then attempts to download a boot image from the RARP server 58 The client then attempts to download a boot image from the RARP server
56 using the tftp protocol. 59 using the tftp protocol
57 </li>
58 <li> 60 </li>
59 Once the image is downloaded, the netboot client then boots the image. 61 <li>Once the image is downloaded, the netboot client then boots the image</li>
60 </li>
61</ol> 62</ol>
62 63
63<p> 64<p>
64Based on this overview, we will need to install software for a reverse ARP 65Based on this overview, we will need to install software for a reverse ARP
65daemon and a tftp daemon. 66daemon and a tftp daemon.
66</p> 67</p>
67 68
68</body> 69</body>
69</section> 70</section>
70</chapter> 71</chapter>
71 72
72<chapter> 73<chapter>
73<title>Software Installation And Configuration</title> 74<title>Software Installation And Configuration</title>
74<section> 75<section>
75<title>The Reverse ARP Daemon</title> 76<title>The Reverse ARP Daemon</title>
76<body> 77<body>
77 78
78
79<p> 79<p>
80Currently, there are two choices for a reverse ARP daemon. They are 80Currently, there are two choices for a reverse ARP daemon. They are
81net-misc/iputils (installed as part of the system profile) and net-misc/rarpd. 81net-misc/iputils (installed as part of the system profile) and net-misc/rarpd.
82</p> 82</p>
83 83
84<note> 84<note>
85Installing net-misc/rarpd will overwrite the rarpd and rarpd manpage from 85Installing net-misc/rarpd will overwrite the rarpd and rarpd manpage from
86net-misc/iputils 86net-misc/iputils
87</note> 87</note>
88 88
89<p> 89<p>
90<b>Setting up common rarpd elements</b>: <path>/etc/ethers</path> 90<b>Setting up common rarpd elements</b>: <path>/etc/ethers</path>
91</p> 91</p>
92 92
93<p> 93<p>
94No matter which rarpd you choose to use, you will need to setup the 94No matter which rarpd you choose to use, you will need to setup the
95<path>/etc/ethers</path> file. This file indicates which hosts rarpd should 95<path>/etc/ethers</path> file. This file indicates which hosts rarpd should
96respond to when a request is seen, and what address to reply with. 96respond to when a request is seen, and what address to reply with.
97</p> 97</p>
98 98
99<p> 99<p>
100The format of <path>/etc/ethers</path> is MAC address of the NIC the machine 100The format of <path>/etc/ethers</path> is MAC address of the NIC the machine
101will be netbooting from and the hostname. Whitespace delimits the MAC address 101will be netbooting from and the hostname. Whitespace delimits the MAC address
102from the hostname, and each entry should have its own line. The following 102from the hostname, and each entry should have its own line. The following
103example is for a host named sparc-netboot.gentoo.org: 103example is for a host named sparc-netboot.gentoo.org:
104</p> 104</p>
105 105
106<pre caption="Example /etc/ethers"> 106<pre caption="Example /etc/ethers">
10708:00:20:77:1f:3e sparc-netboot.gentoo.org 10708:00:20:77:1f:3e sparc-netboot.gentoo.org
108</pre> 108</pre>
109 109
110<note> 110<note>
111If a given hexidecimal number in the MAC address starts or is 0, you can 111If a given hexadecimal number in the MAC address starts or is 0, you can chose
112chose to omit the first 0 (i.e. 08:00:20:77:1f:3e becomes 8:0:20:77:1f:3e). 112to omit the first 0 (i.e. 08:00:20:77:1f:3e becomes 8:0:20:77:1f:3e).
113</note> 113</note>
114 114
115<p> 115<p>
116If you desire to add additional hosts to <path>/etc/ethers</path>, you do not need to 116If you desire to add additional hosts to <path>/etc/ethers</path>, you do not
117restart the rarpd services as the file is checked each time a request is 117need to restart the rarpd services as the file is checked each time a request
118received. 118is received.
119</p> 119</p>
120 120
121<p> 121<p>
122<b>Resolving hostnames</b>: <path>/etc/hosts</path> 122<b>Resolving hostnames</b>: <path>/etc/hosts</path>
123</p> 123</p>
124 124
125<p> 125<p>
126Since each entry in <path>/etc/ethers</path> has a hostname, the netboot server needs to 126Since each entry in <path>/etc/ethers</path> has a hostname, the netboot server
127be able to resolve the hostname into its IP address. This can be done two 127needs to be able to resolve the hostname into its IP address. This can be done
128ways, <path>/etc/hosts</path> or the nameserver the netboot server uses. 128two ways, <path>/etc/hosts</path> or the nameserver the netboot server uses.
129</p>
130
131<p> 129</p>
130
131<p>
132An <path>/etc/hosts</path> entry for resolving a hostname will look very similar to the one 132An <path>/etc/hosts</path> entry for resolving a hostname will look very
133that probably exists from when you installed Gentoo on the netboot server. 133similar to the one that probably exists from when you installed Gentoo on the
134For our example host, sparc-netboot.gentoo.org, we'll assume that it has an IP 134netboot server. For our example host, sparc-netboot.gentoo.org, we'll assume
135address of 10.0.1.15. So the <path>/etc/hosts</path> entry would look like; 135that it has an IP address of 10.0.1.15. So the <path>/etc/hosts</path> entry
136would look like;
136</p> 137</p>
137 138
138<pre caption="/etc/hosts"> 139<pre caption="/etc/hosts">
13910.0.1.15 sparc-netboot.gentoo.org 14010.0.1.15 sparc-netboot.gentoo.org
140</pre> 141</pre>
141 142
142 143
143<note> 144<note>
144Depending on the environment, you may need to consult your network 145Depending on the environment, you may need to consult your network
145administrator to get an appropriate IP address or addresses to netboot 146administrator to get an appropriate IP address or addresses to netboot the host
146the host with. 147with.
147</note> 148</note>
148 149
149<p> 150<p>
150If you use a nameserver, then the DNS server administrator will need to add a 151If you use a nameserver, then the DNS server administrator will need to add a
151record for the hostname, in our example sparc-netboot.gentoo.org, to point to 152record for the hostname, in our example sparc-netboot.gentoo.org, to point to
152the appropriate IP address. 153the appropriate IP address. Please consult your DNS server administrator and/or
153Please consult your DNS server administrator and/or the documentation for the
154DNS server's DNS software for how to add the entry. 154the documentation for the DNS server's DNS software for how to add the entry.
155</p> 155</p>
156 156
157<note> 157<note>
158If both <path>/etc/hosts</path> and the nameserver have an entry for the host to be 158If both <path>/etc/hosts</path> and the nameserver have an entry for the host
159netbooted, <path>/etc/hosts</path> will be used first (granted the order of 159to be netbooted, <path>/etc/hosts</path> will be used first (granted the order
160<path>/etc/nsswitch.conf</path> has not been changed from the default). 160of <path>/etc/nsswitch.conf</path> has not been changed from the default).
161</note> 161</note>
162 162
163<p> 163<p>
164<b>Setting up net-misc/iputils rarpd</b> 164<b>Setting up net-misc/iputils rarpd</b>
165</p> 165</p>
166 166
167<p>
167<p>First, we will need to determine the options to use for rarpd. While there 168First, we will need to determine the options to use for rarpd. While there are
168are more options than we'll cover here, these options should get you started 169more options than we'll cover here, these options should get you started As
169As there is currently no init.d script for net-misc/iputils version of rarpd, 170there is currently no init.d script for net-misc/iputils version of rarpd, an
170an entry will need to be added to <path>/etc/conf.d/local.start</path> if you want to enable 171entry will need to be added to <path>/etc/conf.d/local.start</path> if you want
171rarpd servies at boot time. A sample entry is as follows; 172to enable rarpd servies at boot time. A sample entry is as follows;
172</p> 173</p>
173 174
174<pre caption="/etc/conf.d/local.start"> 175<pre caption="/etc/conf.d/local.start">
175/usr/sbin/rarpd -v -e eth0 176/usr/sbin/rarpd -v -e eth0
176</pre> 177</pre>
177 178
178<p> 179<p>
179An explination of the above rarpd options (as taken from the man page): 180An explanation of the above rarpd options (as taken from the man page):
180</p> 181</p>
181 182
182<ul> 183<ul>
183 <li>-v Be verbose</li> 184 <li>-v Be verbose</li>
184 <li> 185 <li>
185 -e Do not check for the presence of a boot image, reply if MAC address 186 -e Do not check for the presence of a boot image, reply if MAC address
186 resolves to a valid IP address using /etc/ethers database and DNS 187 resolves to a valid IP address using /etc/ethers database and DNS
187 </li> 188 </li>
188 <li>
189 eth0 represents the interface rarpd should bind to 189 <li>eth0 represents the interface rarpd should bind to</li>
190 </li>
191</ul> 190</ul>
192 191
193<p> 192<p>
194For more options, consult the section 8 man page on rarpd 193For more options, consult the section 8 man page on rarpd.
195</p> 194</p>
196 195
197<p> 196<p>
198<b>Setting up net-misc/rarpd</b> 197<b>Setting up net-misc/rarpd</b>
199</p> 198</p>
200 199
201<p> 200<p>
202Firstly, we'll need to install rarpd with the following command: 201Firstly, we'll need to install rarpd with the following command:
203</p> 202</p>
204 203
205<pre caption="Installing rarpd"> 204<pre caption="Installing rarpd">
206# <i>emerge net-misc/rarpd</i> 205# <i>emerge net-misc/rarpd</i>
207</pre> 206</pre>
208 207
209<p> 208<p>
210Next, options for rarpd will need to be set in <path>/etc/conf.d/rarpd</path>. For an 209Next, options for rarpd will need to be set in <path>/etc/conf.d/rarpd</path>.
211equivalent configuration as the one used above for net-misc/iputils rarpd, 210For an equivalent configuration as the one used above for net-misc/iputils
212adjust <path>/etc/conf.d/rarpd</path> to look like the following 211rarpd, adjust <path>/etc/conf.d/rarpd</path> to look like the following
213</p> 212</p>
214 213
215<pre caption="/etc/conf.d/rarpd"> 214<pre caption="/etc/conf.d/rarpd">
216RARPD_OPTS="-v -i eth0" 215RARPD_OPTS="-v -i eth0"
217</pre> 216</pre>
218 217
219<p> 218<p>
220An explination of the above rarpd options (as taken from the man page); 219An explanation of the above rarpd options (as taken from the man page);
221</p> 220</p>
222 221
223<ul> 222<ul>
224 <li> 223 <li>
225 -v Be verbose. Show requests which the daemon is responding to. 224 <c>-v</c> Be verbose. Show requests which the daemon is responding to
226 </li>
227 <li> 225 </li>
226 <li>
228 -i Bind to the named interface. By default rarpd binds to the default 227 <c>-i</c> Bind to the named interface. By default rarpd binds to the
229 interface for the local system type, if available. 228 default interface for the local system type, if available
230 </li> 229 </li>
231</ul> 230</ul>
232 231
233<p> 232<p>
234For more options, consult the section 8 man page on rarpd and rarpd --help. 233For more options, consult the section 8 man page on rarpd and rarpd --help.
235</p> 234</p>
236 235
237</body> 236</body>
238</section> 237</section>
239<section> 238<section>
240<title>The tftpd Daemon</title> 239<title>The tftpd Daemon</title>
241<body> 240<body>
242 241
243<p> 242<p>
244Here there are three options for a tftp daemon, net-misc/atftp, 243Here there are three options for a tftp daemon, net-misc/atftp,
245net-misc/netkit-tftp and net-misc/tftp-hpa. You only need to install one of 244net-misc/netkit-tftp and net-misc/tftp-hpa. You only need to install one of the
246the tftp daemons for proper operation. 245tftp daemons for proper operation.
247</p> 246</p>
248 247
249<p> 248<p>
250<b>Setting up common tftpd elements</b> 249<b>Setting up common tftpd elements</b>
251</p> 250</p>
252 251
253<p> 252<p>
254Each tftp daemon will need a directory from which to serve files to tftp 253Each tftp daemon will need a directory from which to serve files to tftp
255clients. The directory we will use for this howto will be /tftpboot. This 254clients. The directory we will use for this howto will be /tftpboot. This will
256will appear as the root (<path>/</path>) directory to the clients when requests are 255appear as the root (<path>/</path>) directory to the clients when requests are
257received. Additionally, we'll setup the system to run the tftp daemon with the 256received. Additionally, we'll setup the system to run the tftp daemon with the
258user and group nobody. 257user and group nobody.
259</p> 258</p>
260 259
261<p> 260<p>
262If the directory you have chosen does not currently exist, it will need to be 261If the directory you have chosen does not currently exist, it will need to be
263created with the mkdir command. The command for the example /tftpboot is; 262created with the mkdir command. The command for the example /tftpboot is;
264</p> 263</p>
265 264
266<pre caption="Creating /tftpboot"> 265<pre caption="Creating /tftpboot">
267# <i>/bin/mkdir /tftpboot</i> 266# <i>/bin/mkdir /tftpboot</i>
268</pre> 267</pre>
269 268
270<p> 269<p>
271Then we will need to change the owner of <path>/tftpboot</path> so that it is owned by user 270Then we will need to change the owner of <path>/tftpboot</path> so that it is
272nobody and group nobody; 271owned by user nobody and group nobody;
273</p> 272</p>
274 273
275<pre caption="Changing ownership"> 274<pre caption="Changing ownership">
276# <i>chown nobody:nobody /tftpboot</i> 275# <i>chown nobody:nobody /tftpboot</i>
277</pre> 276</pre>
278 277
279</body> 278</body>
280</section> 279</section>
281<section> 280<section>
282<title>The atftp Daemon</title> 281<title>The atftp Daemon</title>
283<body> 282<body>
284 283
285<p> 284<p>
286First, install the net-misc/atftp package as follows; 285First, install the net-misc/atftp package as follows;
287</p> 286</p>
288 287
289<pre caption="Installing atftp"> 288<pre caption="Installing atftp">
290# <i>emerge net-misc/atftp</i> 289# <i>emerge net-misc/atftp</i>
291</pre> 290</pre>
292 291
293<p> 292<p>
294After the net-misc/atftp package has been installed, it will need to be 293After the net-misc/atftp package has been installed, it will need to be
295configured. If tftpd services are desired at boot time, an entry to 294configured. If tftpd services are desired at boot time, an entry to
296<path>/etc/conf.d/local.start</path> will need to be added as atftp has no init.d, inetd or 295<path>/etc/conf.d/local.start</path> will need to be added as atftp has no
297xinetd scripts of its own. If you want to use inetd or xinetd for controlling 296init.d, inetd or xinetd scripts of its own. If you want to use inetd or xinetd
298the tftpd service, please see their respective man pages. 297for controlling the tftpd service, please see their respective man pages.
299</p> 298</p>
300 299
301<p> 300<p>
302Below is an example entry for atftpd in <path>/etc/conf.d/local.start</path>; 301Below is an example entry for atftpd in <path>/etc/conf.d/local.start</path>;
303</p> 302</p>
304 303
305<pre caption="/etc/conf.d/local.start"> 304<pre caption="/etc/conf.d/local.start">
306/usr/sbin/in.tftpd -v --daemon /tftpboot 305/usr/sbin/in.tftpd -v --daemon /tftpboot
307</pre> 306</pre>
308 307
309<p> 308<p>
310An explination of the above rarpd options (as taken from the man page); 309An explanation of the above rarpd options (as taken from the man page);
311</p> 310</p>
312 311
313<ul> 312<ul>
314 <li> 313 <li>
315 -v Increase or set the logging level. No args will increase by one the 314 <c>-v</c> Increase or set the logging level. No args will increase by one
316 current value. Default is LOG_NOTICE, see syslog(3) for log level. Current 315 the current value. Default is LOG_NOTICE, see syslog(3) for log level.
317 value range from 0 (LOG_EMERG) to 7 (LOG_DEBUG) 316 Current value range from 0 (LOG_EMERG) to 7 (LOG_DEBUG)
318 </li>
319 <li> 317 </li>
318 <li>
320 --daemon Run as a daemon. Do not use this option if atftpd is started by 319 <c>--daemon</c> Run as a daemon. Do not use this option if atftpd is
321 inetd. 320 started by inetd.
322 </li> 321 </li>
323</ul> 322</ul>
324 323
325<p> 324<p>
326For more options, consult the section 8 man page on atftpd 325For more options, consult the section 8 man page on atftpd.
327</p> 326</p>
328 327
329</body> 328</body>
330</section> 329</section>
331<section> 330<section>
332<title>The netkit-tftp Daemon</title> 331<title>The netkit-tftp Daemon</title>
333<body> 332<body>
334 333
335<p> 334<p>
336First, install the net-misc/netkit-tftp package as follows; 335First, install the net-misc/netkit-tftp package as follows;
337</p> 336</p>
338 337
339<pre caption="Installing netkit-tftp"> 338<pre caption="Installing netkit-tftp">
340# <i>emerge net-misc/netkit-tftp</i> 339# <i>emerge net-misc/netkit-tftp</i>
341</pre> 340</pre>
342 341
343<p> 342<p>
344Secondly, install sys-apps/xinetd if it is not currently present; 343Secondly, install sys-apps/xinetd if it is not currently present; After the
345After the net-misc/netkit-tftp and sys-apps/xinetd packages have been 344net-misc/netkit-tftp and sys-apps/xinetd packages have been installed,
346installed, netkit-tftp will need to be configured. netkit-tftp needs to be 345netkit-tftp will need to be configured. netkit-tftp needs to be run from
347run from xinetd, however it does not provide example scripts of its own. A 346xinetd, however it does not provide example scripts of its own. A sample xinetd
348sample xinetd file is provided below; 347file is provided below;
349</p> 348</p>
350 349
351<pre caption="Sample /etc/xinetd.d/tftp file"> 350<pre caption="Sample /etc/xinetd.d/tftp file">
352service tftp 351service tftp
353{ 352{
354 protocol = udp 353 protocol = udp
355 port = 69 354 port = 69
356 socket_type = dgram 355 socket_type = dgram
357 wait = yes 356 wait = yes
358 user = nobody 357 user = nobody
359 group = nobody 358 group = nobody
360 server = /usr/sbin/in.tftpd 359 server = /usr/sbin/in.tftpd
361 server_args = /tftpboot 360 server_args = /tftpboot
362 only_from = 10.0.1.0 361 only_from = 10.0.1.0
363 disable = no 362 disable = no
364} 363}
365</pre> 364</pre>
366 365
367<note> 366<note>
368This sample xinetd configuration file for tftp uses the line "disable = no", 367This sample xinetd configuration file for tftp uses the line "disable = no",
369which enables the service by default. This is opposite of the default way 368which enables the service by default. This is opposite of the default way
370packages in Gentoo provide their respective xinetd configuration files, which 369packages in Gentoo provide their respective xinetd configuration files, which
371have disable set to yes. 370have disable set to yes.
372</note> 371</note>
373 372
374<p> 373<p>
375An explination of the above options which can be changed; 374An explanation of the above options which can be changed;
376user user in.tftpd requests are handled as 375user user in.tftpd requests are handled as
377group group in.tftpd requests are handled as 376group group in.tftpd requests are handled as
378server_args root directory for tftp daemon to serve files from 377server_args root directory for tftp daemon to serve files from
379only_from tells xinetd what hosts to allow tftp connections from 378only_from tells xinetd what hosts to allow tftp connections from
380</p> 379</p>
381 380
382<p> 381<p>
383Additional information on xinetd configuration files can be found in the 382Additional information on xinetd configuration files can be found in the
384section 5 manpage on xinetd.conf 383section 5 manpage on xinetd.conf
385</p> 384</p>
386 385
387<p> 386<p>
388If xinetd is running, you can send it the HUP signal to have it re-read its 387If xinetd is running, you can send it the HUP signal to have it re-read its
389configuration files; 388configuration files;
390</p> 389</p>
398</p> 397</p>
399 398
400<pre caption="Starting xinetd"> 399<pre caption="Starting xinetd">
401# <i>/etc/init.d/xinetd start</i> 400# <i>/etc/init.d/xinetd start</i>
402</pre> 401</pre>
403 402
404<p> 403<p>
405For more information, consult the section 8 man page on in.tftpd 404For more information, consult the section 8 man page on in.tftpd
406</p> 405</p>
407 406
408</body> 407</body>
409</section> 408</section>
410<section> 409<section>
411<title>The tftp-hpa Daemon</title> 410<title>The tftp-hpa Daemon</title>
412<body> 411<body>
412
413<p> 413<p>
414First, install the tftp-hpa package using the following command; 414First, install the tftp-hpa package using the following command;
415</p> 415</p>
416 416
417<pre caption="Installing tftp-hpa"> 417<pre caption="Installing tftp-hpa">
418# <i>emerge net-misc/tftp-hpa</i> 418# <i>emerge net-misc/tftp-hpa</i>
419</pre> 419</pre>
420 420
421<p> 421<p>
422tftp-hpa comes with an init.d and the accompanying conf.d configuration file. 422tftp-hpa comes with an init.d and the accompanying conf.d configuration file.
423Check to make sure that INIITFTPD_PATH and INITFTP_OPTS in <path>/etc/conf.d/in.tftpd</path> 423Check to make sure that INIITFTPD_PATH and INITFTP_OPTS in
424match those below; 424<path>/etc/conf.d/in.tftpd</path> match those below;
425</p> 425</p>
426 426
427<pre caption="/etc/conf.d/in.tftpd"> 427<pre caption="/etc/conf.d/in.tftpd">
428INTFTPD_PATH="/tftpboot" 428INTFTPD_PATH="/tftpboot"
429INTFTPD_OPTS="-s -v -l ${INTFTPD_PATH}" 429INTFTPD_OPTS="-s -v -l ${INTFTPD_PATH}"
430</pre> 430</pre>
431 431
432<p> 432<p>
433The tftp daemon can then be started via the init.d script; 433The tftp daemon can then be started via the init.d script;
434</p> 434</p>
435 435
436<pre caption="Starting in.tftpd"> 436<pre caption="Starting in.tftpd">
437# <i>/etc/init.d/in.tftpd start</i> 437# <i>/etc/init.d/in.tftpd start</i>
438</pre> 438</pre>
439 439
440<p> 440<p>
441For more options, consult the section 8 man page on tftpd. 441For more options, consult the section 8 man page on tftpd.
442</p> 442</p>
443 443
444</body> 444</body>
445</section> 445</section>
446</chapter> 446</chapter>
447 447
448<chapter> 448<chapter>
449<title>Preparing a tftpboot image for use by a client</title> 449<title>Preparing a tftpboot image for use by a client</title>
450<section> 450<section>
451<body> 451<body>
452 452
453<p> 453<p>
454Make sure you have an image you want to use for netbooting. For a sparc or 454Make sure you have an image you want to use for netbooting. For a sparc or
455sparc64 netboot image, please check your local Gentoo distfiles mirror under 455sparc64 netboot image, please check your local Gentoo distfiles mirror under
456<path>experimental/sparc/tftpboot</path> for the appropriate image. We'll assume you are 456<path>experimental/sparc/tftpboot</path> for the appropriate image. We'll
457planning to boot a sparc64 host using the 457assume you are planning to boot a sparc64 host using the
458<path>gentoo-sparc64-1.4_rc4-20040102.tftpboot</path> image. 458<path>gentoo-sparc64-1.4_rc4-20040102.tftpboot</path> image.
459</p> 459</p>
460 460
461<p> 461<p>
462Once you have an image, copy the image into <path>/tftpboot</path>; 462Once you have an image, copy the image into <path>/tftpboot</path>;
463</p> 463</p>
464 464
465<pre caption="Copying the image"> 465<pre caption="Copying the image">
466# <i>cp gentoo-sparc64-1.4_rc4-20040102.tftpboot /tftpboot</i> 466# <i>cp gentoo-sparc64-1.4_rc4-20040102.tftpboot /tftpboot</i>
467</pre> 467</pre>
468 468
469<p> 469<p>
470Now, when the netboot client makes a tftp request, it looks for a file that is 470Now, when the netboot client makes a tftp request, it looks for a file that is
471the hexidecimal number of its current IP address, and on some platforms an 471the hexadecimal number of its current IP address, and on some platforms an
472<path>.ARCH</path> suffix. The hexidecimal number should use <e>capital</e> characters. 472<path>.ARCH</path> suffix. The hexadecimal number should use <e>capital</e>
473</p> 473characters.
474
475<p> 474</p>
475
476<p>
476A guide on how to convert decimal to hexidecimal is available at 477A guide on how to convert decimal to hexadecimal is available at
477<uri>http://www.permadi.com/tutorial/numDecToHex/</uri> 478<uri>http://www.permadi.com/tutorial/numDecToHex/</uri>
478</p> 479</p>
479 480
480<p> 481<p>
481And for the lazy/impatient, you can find a decimal to hexidecimal conversion 482And for the lazy/impatient, you can find a decimal to hexadecimal conversion
482tool at <uri>http://dan.drydog.com/hextemp.html</uri> 483tool at <uri>http://dan.drydog.com/hextemp.html</uri>
483</p> 484</p>
484 485
485<note> 486<note>
486For each octet in the IP address (the 10 in 10.0.1.15 for instance), you 487For each octet in the IP address (the 10 in 10.0.1.15 for instance), you will
487will need to convert it to hexidecimal, rather than converting the IP address asa singular number. 488need to convert it to hexadecimal, rather than converting the IP address asa
489singular number.
488</note> 490</note>
489 491
492<p>
490<p>So for our example IP address, 10.0.1.15, let's look at its hexidecimal 493So for our example IP address, 10.0.1.15, let's look at its hexadecimal
491equivalent; 494equivalent;
492</p> 495</p>
493 496
494<pre caption="Example IP address"> 497<pre caption="Example IP address">
495decimal 10 0 1 15 498decimal 10 0 1 15
496hexidecimal 0A 00 01 0F 499hexadecimal 0A 00 01 0F
497</pre> 500</pre>
498 501
499<p> 502<p>
500So for the example sparc64 netboot client, it would look for a file named 503So for the example sparc64 netboot client, it would look for a file named
5010A00010F when it tftpboots. 5040A00010F when it tftpboots.
502</p> 505</p>
503 506
504<p> 507<p>
505On sparc however, the file would be 0A00010F.SUN4M, 0A00010F.SUN4C or 508On sparc however, the file would be 0A00010F.SUN4M, 0A00010F.SUN4C or
5060A00010F.SUN4D depending on what type of sparc system. 5090A00010F.SUN4D depending on what type of sparc system.
507</p> 510</p>
508 511
509<p> 512<p>
510Additionally, if you are really really lazy (like me), you can netboot the host 513Additionally, if you are really really lazy (like me), you can netboot the host
511to get the filename the client is looking for from the netboot server logs. 514to get the filename the client is looking for from the netboot server logs.
512</p> 515</p>
513 516
514<p> 517<p>
515Make sure that both the rarpd and tftpd daemon you've chosen are currently 518Make sure that both the rarpd and tftpd daemon you've chosen are currently
516running, then boot the host as described below in "Netbooting the client". 519running, then boot the host as described below in "Netbooting the client".
517</p> 520</p>
518 521
519<p> 522<p>
520The client will appear to hang after the boot net command is issued. 523The client will appear to hang after the boot net command is issued. Then on
521Then on the netboot server, check the system logs for an entry for in.tftpd. 524the netboot server, check the system logs for an entry for in.tftpd.
522</p> 525</p>
523 526
524<p> 527<p>
525An example entry from a netboot server running sysklogd and tftp-hpa looks 528An example entry from a netboot server running sysklogd and tftp-hpa looks
526like; 529like;
527</p> 530</p>
528 531
529<pre caption="Log entry for netboot server"> 532<pre caption="Log entry for netboot server">
530Jan 3 22:48:59 stargazer in.tftpd[8368]: RRQ from 10.0.1.15 filename 0A00010F 533Jan 3 22:48:59 stargazer in.tftpd[8368]: RRQ from 10.0.1.15 filename 0A00010F
531</pre> 534</pre>
532 535
533<p> 536<p>
534The filename is shown above after "filename" in the log entry, which in this 537The filename is shown above after "filename" in the log entry, which in this
535case is 0A00010F. 538case is 0A00010F.
536</p> 539</p>
537 540
538<p> 541<p>
539As a way to keep track of what netboot image you are using, and to allow 542As a way to keep track of what netboot image you are using, and to allow
540multiple machines to use the same netboot image, you can use a soft link to 543multiple machines to use the same netboot image, you can use a soft link to
541create the file with the hexidecimal value. To create this using our sample 544create the file with the hexadecimal value. To create this using our sample
542sparc64 host and the <path>gentoo-sparc64-1.4_rc4-20040102.tftpboot</path>, use the 545sparc64 host and the <path>gentoo-sparc64-1.4_rc4-20040102.tftpboot</path>, use
543following command; 546the following command;
544</p> 547</p>
545 548
546<pre caption="Linking the image files"> 549<pre caption="Linking the image files">
547# <i>/bin/ln -s /tftpboot/gentoo-sparc64-1.4_rc4-20040102.tftpboot \ 550# <i>/bin/ln -s /tftpboot/gentoo-sparc64-1.4_rc4-20040102.tftpboot \
548/tftpboot/0A00010F</i> 551/tftpboot/0A00010F</i>
549</pre> 552</pre>
550 553
551<p> 554<p>
552Now everything should be set for netbooting! 555Now everything should be set for netbooting!
553</p> 556</p>
554 557
555</body> 558</body>
556</section> 559</section>
557</chapter> 560</chapter>
558 561
559<chapter> 562<chapter>
560<title>Netbooting the client</title> 563<title>Netbooting the client</title>
561 564
562<section> 565<section>
567</p> 570</p>
568 571
569<pre caption="Booting OBP"> 572<pre caption="Booting OBP">
570ok <i>boot net</i> 573ok <i>boot net</i>
571</pre> 574</pre>
572 575
573<p> 576<p>
574Other methods for certain machines are: 577Other methods for certain machines are:
575</p> 578</p>
576 579
577<pre caption="Booting OBP, alternative"> 580<pre caption="Booting OBP, alternative">
578ok <i>boot net-tpe</i> 581ok <i>boot net-tpe</i>
579</pre> 582</pre>
580 583
581<note> 584<note>
582If your system doesn't present you with an OBP at boot time, you will 585If your system doesn't present you with an OBP at boot time, you will either
583either need to press the Stop and A key, or send a break signal via serial 586need to press the Stop and A key, or send a break signal via serial console
584console before the system boots an OS. If your system cannot find an OS, 587before the system boots an OS. If your system cannot find an OS, it should
585it should either try to boot via the network interface (which is what we want), 588either try to boot via the network interface (which is what we want), or leave
586or leave you at an OBP prompt. 589you at an OBP prompt.
587</note> 590</note>
588 591
589<p> 592<p>
590This will initiate the networking booting process. A constantly changing 593This will initiate the networking booting process. A constantly changing string
591string of hexidecimal digits should appear. When the image has finished 594of hexadecimal digits should appear. When the image has finished loading, the
592loading, the kernel will take over and start the OS booting process. In the 595kernel will take over and start the OS booting process. In the case of our
593case of our sparc64 install image, you will be left at a shell prompt from 596sparc64 install image, you will be left at a shell prompt from which you can
594which you can begin the install process. 597begin the install process.
595</p> 598</p>
596 599
597</body> 600</body>
598</section> 601</section>
599</chapter> 602</chapter>
600 603
601<chapter> 604<chapter>
602<title>Troubleshooting</title> 605<title>Troubleshooting</title>
603<section> 606<section>
604<body> 607<body>
605 608
606<p> 609<p>
607<b>Building the prerequisite software</b> 610<b>Building the prerequisite software</b>
608</p> 611</p>
609 612
610<p> 613<p>
611If the netboot server is a Gentoo/LINUX system and experiences problems 614If the netboot server is a Gentoo/LINUX system and experiences problems
612installing the rarpd and tftpd packages, please search <uri>http://forums.gentoo.org</uri> 615installing the rarpd and tftpd packages, please search
613and <uri>http://bugs.gentoo.org</uri> to see if this problem has been 616<uri>http://forums.gentoo.org</uri> and <uri>http://bugs.gentoo.org</uri> to
614encountered by anyone else. If it has not, or the solutions found do not work, 617see if this problem has been encountered by anyone else. If it has not, or the
615then please open a new bug at <uri>http://bugs.gentoo.org</uri> 618solutions found do not work, then please open a new bug at
619<uri>http://bugs.gentoo.org</uri>
616</p> 620</p>
617 621
618<p> 622<p>
619<b>I've issued the boot net command but it appears to hang.</b> 623<b>I've issued the boot net command but it appears to hang.</b>
620</p> 624</p>
621 625
622<p> 626<p>
623This is presumably because the file your system is trying to load from the 627This is presumably because the file your system is trying to load from the
624tftpboot server is not available. On a SPARC system, you would probably see 628tftpboot server is not available. On a SPARC system, you would probably see the
625the following; 629following;
626</p> 630</p>
627 631
628<pre caption="Booting appears to hang"> 632<pre caption="Booting appears to hang">
629Rebooting with command: boot 633Rebooting with command: boot
630Boot device: net File and args: 634Boot device: net File and args:
631</pre> 635</pre>
632 636
633<p> 637<p>
634Double check that the file the client needs does exist in <path>/tftpboot</path>. You can 638Double check that the file the client needs does exist in
635confirm the filename it is requesting by looking in the system logs. Also, 639<path>/tftpboot</path>. You can confirm the filename it is requesting by
636once this file exists, the client will try to load it. Sometimes, when 640looking in the system logs. Also, once this file exists, the client will try to
637the file is missing originally, it will freeze downloading the file once it 641load it. Sometimes, when the file is missing originally, it will freeze
638appears. To resolve this, just get back to an OBP prompt, and issue the 642downloading the file once it appears. To resolve this, just get back to an OBP
639"boot net" command again. The host should then start downloading the tftpboot 643prompt, and issue the "boot net" command again. The host should then start
640image and boot the OS. 644downloading the tftpboot image and boot the OS.
641</p>
642
643<p> 645</p>
646
647<p>
644<b>I'm trying to netboot, but all I see are "Timeout waiting for 648<b>I'm trying to netboot, but all I see are "Timeout waiting for ARP/RARP
645ARP/RARP packet" messages. 649packet" messages.</b>
646</b>
647</p> 650</p>
648 651
649<p> 652<p>
650This could be due to a few different problems; 653This could be due to a few different problems;
651</p> 654</p>
652 655
653<ol> 656<ol>
654 <li> 657 <li>
655 Make sure the entry in <path>/etc/ethers</path> exists for the client in question. If 658 Make sure the entry in <path>/etc/ethers</path> exists for the client in
656 the MAC address is incorrect and/or the netboot server cannot resolve the 659 question. If the MAC address is incorrect and/or the netboot server cannot
657 hostname for the client, it cannot respond with the needed information. 660 resolve the hostname for the client, it cannot respond with the needed
661 information.
658 </li> 662 </li>
659 <li> 663 <li>
660 Verify that the network hub or switch the netboot server and client are 664 Verify that the network hub or switch the netboot server and client are
661 connected to allow RARP traffic to flow freely. If the client's request 665 connected to allow RARP traffic to flow freely. If the client's request
662 cannot reach the server, or vice versa, the host will be unable to continue. 666 cannot reach the server, or vice versa, the host will be unable to
663 </li> 667 continue.
664 <li> 668 </li>
669 <li>
665 No one is responding to the RARPD request because no services are listening. 670 No one is responding to the RARPD request because no services are
666 Verify that the rarpd service is up and running. 671 listening. Verify that the rarpd service is up and running.
667 </li>
668 <li> 672 </li>
673 <li>
669 The client does not think its NIC has a link to the network hub/switch 674 The client does not think its NIC has a link to the network hub/switch it
670 it is plugged into. Check to see if the NIC and the port on the network 675 is plugged into. Check to see if the NIC and the port on the network hub or
671 hub or switch has a link light. If the link light is on, check 676 switch has a link light. If the link light is on, check to see what the
672 to see what the setting of tpe-link-test? is in OBP with the command; 677 setting of tpe-link-test? is in OBP with the command; <c>printenv
673 <c>printenv tpe-link-test?</c>. You should receive something like 678 tpe-link-test?</c>. You should receive something like <path>tpe-link-test?
674 <path>tpe-link-test? false true</path>. 679 false true</path>. The first column represents the parameter name, the
675 The first column represents the parameter name, the second column shows the 680 second column shows the current value for the the parameter, and the third
676 current value for the the parameter, and the third column shows the default 681 column shows the default value for the parameter. In the example above, we
677 value for the parameter. In the example above, we can see that the current 682 can see that the current value is false, which means that the client is not
678 value is false, which means that the client is not checking to see if the 683 checking to see if the client and network hub or switch can establish a
679 client and network hub or switch can establish a link before issuing its 684 link before issuing its RARP request. Often times this can cause the
680 RARP request. Often times this can cause the problem. 685 problem.
681 </li> 686 </li>
682</ol> 687</ol>
683 688
684<p> 689<p>
685To change the value of tpe-link-test? from an OBP prompt, issue the 690To change the value of tpe-link-test? from an OBP prompt, issue the following
686following command; 691command;
687</p> 692</p>
688 693
689<pre caption="Changing tpe-link-test value"> 694<pre caption="Changing tpe-link-test value">
690ok <i>setenv tpe-link-test? true</i> 695ok <i>setenv tpe-link-test? true</i>
691tpe-link-test? = true 696tpe-link-test? = true
692</pre> 697</pre>
693 698
694<p> 699<p>
695This shows the value of tpe-link-test? is now true. Try netbooting the client 700This shows the value of tpe-link-test? is now true. Try netbooting the client
696again. 701again.
697</p> 702</p>
698 703
699</body> 704</body>
700</section> 705</section>
701</chapter> 706</chapter>
702 707
703</guide> 708</guide>
704

Legend:
Removed from v.1.7  
changed lines
  Added in v.1.8

  ViewVC Help
Powered by ViewVC 1.1.20