/[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.12 Revision 1.13
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.12 2010/03/03 01:37:41 nightmorph Exp $ --> 3<!-- $Header: /var/cvsroot/gentoo/xml/htdocs/doc/en/gentoo-sparc-netboot-howto.xml,v 1.13 2010/10/05 21:54:55 nightmorph Exp $ -->
4 4
5<guide> 5<guide>
6<title>Gentoo Linux based Netboot HOWTO</title> 6<title>Gentoo Linux based Netboot HOWTO</title>
7 7
8<author title="SPARC Developer"> 8<author title="SPARC Developer">
9 <mail link="weeve"/> 9 <mail link="weeve"/>
10</author> 10</author>
11<author title="Editor"> 11<author title="Editor">
12 <mail link="nightmorph"/> 12 <mail link="nightmorph"/>
13</author> 13</author>
14 14
15<abstract> 15<abstract>
16Guide for setting up a netboot server for use with the Gentoo/SPARC netboot 16Guide for setting up a netboot server for use with the Gentoo/SPARC netboot
17installation images. 17installation images.
18</abstract> 18</abstract>
19 19
20<!-- The content of this document is licensed under the CC-BY-SA license --> 20<!-- The content of this document is licensed under the CC-BY-SA license -->
21<!-- See http://creativecommons.org/licenses/by-sa/2.5 --> 21<!-- See http://creativecommons.org/licenses/by-sa/2.5 -->
22<license/> 22<license/>
23 23
24<version>1.4</version> 24<version>2</version>
25<date>2010-03-02</date> 25<date>2010-10-05</date>
26 26
27<chapter> 27<chapter>
28<title>Introduction</title> 28<title>Introduction</title>
29<section> 29<section>
30<body> 30<body>
31 31
32<note> 32<note>
33This howto is currently very SPARC-centric and expecting that you will be 33This howto is currently very SPARC-centric and expecting that you will be
34setting up your netboot server on an existing Gentoo Linux machine. 34setting up your netboot server on an existing Gentoo Linux machine.
35</note> 35</note>
36 36
37<p> 37<p>
38This document will describe how to setup a network booting environment for a 38This document will describe how to setup a network booting environment for a
39Sun Microsystems SPARC or UltraSPARC based computer. The document assumes that 39Sun Microsystems SPARC or UltraSPARC based computer. The document assumes that
40you have an existing Gentoo Linux computer available to act as the netboot 40you have an existing Gentoo Linux computer available to act as the netboot
67Based on this overview, we will need to install software for a reverse ARP 67Based on this overview, we will need to install software for a reverse ARP
68daemon and a TFTP daemon. 68daemon and a TFTP daemon.
69</p> 69</p>
70 70
71</body> 71</body>
72</section> 72</section>
73</chapter> 73</chapter>
74 74
75<chapter> 75<chapter>
76<title>Software Installation And Configuration</title> 76<title>Software Installation And Configuration</title>
77<section> 77<section>
78<title>The Reverse ARP Daemon</title> 78<title>The Reverse ARP Daemon</title>
79<body> 79<body>
80 80
81<p> 81<p>
82Currently, there are two choices for a reverse ARP daemon. They are 82A reverse ARP daemon is already installed on your system; it's part of the
83<c>net-misc/iputils</c> (installed as part of the system profile) and 83<c>net-misc/iputils</c> package
84<c>net-misc/rarpd</c>.
85</p> 84</p>
86
87<note>
88Installing <c>net-misc/rarpd</c> will overwrite the <c>rarpd</c> and
89<c>rarpd</c> manpage from <c>net-misc/iputils</c>.
90</note>
91 85
92<p> 86<p>
93<b>Setting up common rarpd elements</b>: <path>/etc/ethers</path> 87<b>Setting up common rarpd elements</b>: <path>/etc/ethers</path>
94</p> 88</p>
95 89
96<p> 90<p>
97No matter which <c>rarpd</c> you choose to use, you will need to setup the 91You will need to setup the <path>/etc/ethers</path> file. This file indicates
98<path>/etc/ethers</path> file. This file indicates which hosts <c>rarpd</c> 92which hosts <c>rarpd</c> should respond to when a request is seen, and what
99should respond to when a request is seen, and what address to reply with. 93address to reply with.
100</p> 94</p>
101 95
102<p> 96<p>
103The format of <path>/etc/ethers</path> is the MAC address of the NIC the 97The format of <path>/etc/ethers</path> is the MAC address of the NIC the
104machine will be netbooting and its hostname. Whitespace delimits the MAC 98machine will be netbooting and its hostname. Whitespace delimits the MAC
105address from the hostname, and each entry should have its own line. The 99address from the hostname, and each entry should have its own line. The
106following example is for a host named sparc-netboot.gentoo.org: 100following example is for a host named sparc-netboot.gentoo.org:
107</p> 101</p>
108 102
109<pre caption="Example /etc/ethers"> 103<pre caption="Example /etc/ethers">
11008:00:20:77:1f:3e sparc-netboot.gentoo.org 10408:00:20:77:1f:3e sparc-netboot.gentoo.org
111</pre> 105</pre>
112 106
113<note> 107<note>
114If a given hexadecimal number in the MAC address starts or is 0, you can chose 108If a given hexadecimal number in the MAC address starts or is 0, you can chose
152 146
153<p> 147<p>
154If you use a nameserver, then the DNS server administrator will need to add a 148If you use a nameserver, then the DNS server administrator will need to add a
155record for the hostname, in our example sparc-netboot.gentoo.org, to point to 149record for the hostname, in our example sparc-netboot.gentoo.org, to point to
156the appropriate IP address. Please consult your DNS server administrator and/or 150the appropriate IP address. Please consult your DNS server administrator and/or
157the documentation for the DNS server's DNS software for how to add the entry. 151the documentation for the DNS server's DNS software for how to add the entry.
158</p> 152</p>
159 153
160<note> 154<note>
161If both <path>/etc/hosts</path> and the nameserver have an entry for the host 155If both <path>/etc/hosts</path> and the nameserver have an entry for the host
162to be netbooted, <path>/etc/hosts</path> will be used first (granted the order 156to be netbooted, <path>/etc/hosts</path> will be used first (granted the order
163of <path>/etc/nsswitch.conf</path> has not been changed from the default). 157of <path>/etc/nsswitch.conf</path> has not been changed from the default).
164</note> 158</note>
165 159
166<p> 160<p>
167<b>Setting up net-misc/iputils rarpd</b> 161<b>Setting up rarpd</b>
168</p> 162</p>
169 163
170<p> 164<p>
171First, we will need to determine the options to use for <c>rarpd</c>. While 165First, we will need to determine the options to use for <c>rarpd</c>. While
172there are more options than we'll cover here, these options should get you 166there are more options than we'll cover here, these options should get you
173started As there is currently no <path>init.d</path> script for the 167started As there is currently no <path>init.d</path> script for <c>rarpd</c>, an
174<c>net-misc/iputils</c> version of <c>rarpd</c>, an entry will need to be added 168entry will need to be added to <path>/etc/conf.d/local.start</path> if you want
175to <path>/etc/conf.d/local.start</path> if you want to enable <c>rarpd</c>
176services at boot time. A sample entry is as follows: 169to enable <c>rarpd</c> services at boot time. A sample entry is as follows:
177</p> 170</p>
178 171
179<pre caption="/etc/conf.d/local.start"> 172<pre caption="/etc/conf.d/local.start">
180/usr/sbin/rarpd -v -e eth0 173/usr/sbin/rarpd -v -e eth0
181</pre> 174</pre>
182 175
183<p> 176<p>
184An explanation of the above <c>rarpd</c> options (as taken from the man page): 177An explanation of the above <c>rarpd</c> options (as taken from the man page):
185</p> 178</p>
186 179
187<ul> 180<ul>
188 <li><c>-v</c> Be verbose</li> 181 <li><c>-v</c> Be verbose</li>
189 <li> 182 <li>
190 <c>-e</c> Do not check for the presence of a boot image, reply if MAC 183 <c>-e</c> Do not check for the presence of a boot image, reply if MAC
191 address resolves to a valid IP address using <path>/etc/ethers</path> 184 address resolves to a valid IP address using <path>/etc/ethers</path>
192 database and DNS 185 database and DNS
193 </li> 186 </li>
194 <li>eth0 represents the interface <c>rarpd</c> should bind to</li> 187 <li>eth0 represents the interface <c>rarpd</c> should bind to</li>
195</ul> 188</ul>
196 189
197<p> 190<p>
198For more options, consult <c>man 8 rarpd</c>. 191For more options, consult <c>man 8 rarpd</c>.
199</p> 192</p>
200 193
201<p>
202<b>Setting up net-misc/rarpd</b>
203</p>
204
205<p>
206Firstly, we'll need to install <c>rarpd</c> with the following command:
207</p>
208
209<pre caption="Installing rarpd">
210# <i>emerge net-misc/rarpd</i>
211</pre>
212
213<p>
214Next, options for <c>rarpd</c> will need to be set in
215<path>/etc/conf.d/rarpd</path>. For an equivalent configuration as the one used
216above for the <c>net-misc/iputils</c> <c>rarpd</c>, adjust
217<path>/etc/conf.d/rarpd</path> to look like the following
218</p>
219
220<pre caption="/etc/conf.d/rarpd">
221RARPD_OPTS="-v -i eth0"
222</pre>
223
224<p>
225An explanation of the above rarpd options (as taken from the man page);
226</p>
227
228<ul>
229 <li>
230 <c>-v</c> Be verbose. Show requests which the daemon is responding to
231 </li>
232 <li>
233 <c>-i</c> Bind to the named interface. By default <c>rarpd</c> binds to the
234 default interface for the local system type, if available
235 </li>
236</ul>
237
238<p>
239For more options, consult <c>man 8 rarpd</c> and <c>rarpd --help</c>.
240</p>
241
242</body> 194</body>
243</section> 195</section>
244<section> 196<section>
245<title>The tftpd Daemon</title> 197<title>The tftpd Daemon</title>
246<body> 198<body>
247 199
248<p> 200<p>
249Here there are three options for a TFTP daemon, <c>net-misc/atftp</c>, 201Here there are three options for a TFTP daemon, <c>net-ftp/atftp</c>,
250<c>net-misc/netkit-tftp</c> and <c>net-misc/tftp-hpa</c>. You only need to 202<c>net-ftp/netkit-tftp</c> and <c>net-ftp/tftp-hpa</c>. You only need to
251install one of the TFTP daemons for proper operation. 203install one of the TFTP daemons for proper operation.
252</p> 204</p>
253 205
254<p> 206<p>
255<b>Setting up common tftpd elements</b> 207<b>Setting up common tftpd elements</b>
256</p> 208</p>
257 209
258<p> 210<p>
259Each TFTP daemon will need a directory from which to serve files to tftp 211Each TFTP daemon will need a directory from which to serve files to tftp
260clients. The directory we will use for this howto will be 212clients. The directory we will use for this howto will be
261<path>/tftpboot</path>. This will appear as the root (<path>/</path>) directory 213<path>/tftpboot</path>. This will appear as the root (<path>/</path>) directory
262to the clients when requests are received. Additionally, we'll setup the system 214to the clients when requests are received. Additionally, we'll setup the system
263to run the TFTP daemon with the user and group <c>nobody</c>. 215to run the TFTP daemon with the user and group <c>nobody</c>.
264</p> 216</p>
265 217
277Then we will need to change the owner of <path>/tftpboot</path> so that it is 229Then we will need to change the owner of <path>/tftpboot</path> so that it is
278owned by user nobody and group <c>nobody</c>: 230owned by user nobody and group <c>nobody</c>:
279</p> 231</p>
280 232
281<pre caption="Changing ownership"> 233<pre caption="Changing ownership">
282# <i>chown nobody:nobody /tftpboot</i> 234# <i>chown nobody:nobody /tftpboot</i>
283</pre> 235</pre>
284 236
285</body> 237</body>
286</section> 238</section>
287<section> 239<section>
288<title>The atftp Daemon</title> 240<title>The atftp Daemon</title>
289<body> 241<body>
290 242
291<p> 243<p>
292First, install the <c>net-misc/atftp</c> package as follows; 244First, install the <c>atftp</c> package as follows;
293</p> 245</p>
294 246
295<pre caption="Installing atftp"> 247<pre caption="Installing atftp">
296# <i>emerge net-misc/atftp</i> 248# <i>emerge atftp</i>
297</pre> 249</pre>
298 250
299<p> 251<p>
300After the <c>net-misc/atftp</c> package has been installed, it will need to be 252After the <c>atftp</c> package has been installed, it will need to be
301configured. If tftpd services are desired at boot time, an entry to 253configured. If tftpd services are desired at boot time, an entry to
302<path>/etc/conf.d/local.start</path> will need to be added as <c>atftp</c> has 254<path>/etc/conf.d/local.start</path> will need to be added as <c>atftp</c> has
303no <path>init.d</path>, <c>inetd</c> or <c>xinetd</c> scripts of its own. If you 255no <path>init.d</path>, <c>inetd</c> or <c>xinetd</c> scripts of its own. If you
304want to use <c>inetd</c> or <c>xinetd</c> for controlling the tftpd service, 256want to use <c>inetd</c> or <c>xinetd</c> for controlling the tftpd service,
305please see their respective man pages. 257please see their respective man pages.
306</p> 258</p>
307 259
308<p> 260<p>
309Below is an example entry for <c>atftpd</c> in 261Below is an example entry for <c>atftpd</c> in
310<path>/etc/conf.d/local.start</path>. 262<path>/etc/conf.d/local.start</path>.
311</p> 263</p>
312 264
313<pre caption="/etc/conf.d/local.start"> 265<pre caption="/etc/conf.d/local.start">
314/usr/sbin/in.tftpd -v --daemon /tftpboot 266/usr/sbin/in.tftpd -v --daemon /tftpboot
315</pre> 267</pre>
316 268
317<p> 269<p>
318An explanation of the above <c>rarpd</c> options (as taken from the man page); 270An explanation of the above options (as taken from the man page);
319</p> 271</p>
320 272
321<ul> 273<ul>
322 <li> 274 <li>
323 <c>-v</c> Increase or set the logging level. No args will increase by one 275 <c>-v</c> Increase or set the logging level. No args will increase by one
324 the current value. Default is LOG_NOTICE, see syslog(3) for log level. 276 the current value. Default is LOG_NOTICE, see syslog(3) for log level.
325 Current value range from 0 (LOG_EMERG) to 7 (LOG_DEBUG) 277 Current value range from 0 (LOG_EMERG) to 7 (LOG_DEBUG)
326 </li> 278 </li>
327 <li> 279 <li>
328 <c>--daemon</c> Run as a daemon. Do not use this option if atftpd is 280 <c>--daemon</c> Run as a daemon. Do not use this option if atftpd is
329 started by inetd. 281 started by inetd.
330 </li> 282 </li>
331</ul> 283</ul>
332 284
333<p> 285<p>
334For more options, consult <c>man 8 atftpd</c>. 286For more options, consult <c>man 8 atftpd</c>.
335</p> 287</p>
336 288
337</body> 289</body>
338</section> 290</section>
339<section> 291<section>
340<title>The netkit-tftp Daemon</title> 292<title>The netkit-tftp Daemon</title>
341<body> 293<body>
342 294
343<p> 295<p>
344First, install the <c>net-misc/netkit-tftp</c> package: 296First, install the <c>netkit-tftp</c> package:
345</p> 297</p>
346 298
347<pre caption="Installing netkit-tftp"> 299<pre caption="Installing netkit-tftp">
348# <i>emerge net-misc/netkit-tftp</i> 300# <i>emerge netkit-tftp</i>
349</pre> 301</pre>
350 302
351<p> 303<p>
352Second, install <c>sys-apps/xinetd</c> if it is not currently present. After 304Second, install <c>sys-apps/xinetd</c> if it is not currently present. After
353the <c>net-misc/netkit-tftp</c> and <c>sys-apps/xinetd</c> packages have been 305the <c>netkit-tftp</c> and <c>sys-apps/xinetd</c> packages have been
354installed, <c>netkit-tftp</c> will need to be configured. <c>netkit-tftp</c> 306installed, <c>netkit-tftp</c> will need to be configured. <c>netkit-tftp</c>
355needs to be run from <c>xinetd</c>, however it does not provide example scripts 307needs to be run from <c>xinetd</c>, however it does not provide example scripts
356of its own. A sample <c>xinetd</c> file is provided below: 308of its own. A sample <c>xinetd</c> file is provided below:
357</p> 309</p>
358 310
359<pre caption="Sample /etc/xinetd.d/tftp file"> 311<pre caption="Sample /etc/xinetd.d/tftp file">
360service tftp 312service tftp
361{ 313{
362 protocol = udp 314 protocol = udp
363 port = 69 315 port = 69
364 socket_type = dgram 316 socket_type = dgram
365 wait = yes 317 wait = yes
366 user = nobody 318 user = nobody
367 group = nobody 319 group = nobody
368 server = /usr/sbin/in.tftpd 320 server = /usr/sbin/in.tftpd
420<p> 372<p>
421For more information, consult <c>man 8 in.tftpd</c>. 373For more information, consult <c>man 8 in.tftpd</c>.
422</p> 374</p>
423 375
424</body> 376</body>
425</section> 377</section>
426<section> 378<section>
427<title>The tftp-hpa Daemon</title> 379<title>The tftp-hpa Daemon</title>
428<body> 380<body>
429 381
430<p> 382<p>
431First, install the <c>tftp-hpa</c> package: 383First, install the <c>tftp-hpa</c> package:
432</p> 384</p>
433 385
434<pre caption="Installing tftp-hpa"> 386<pre caption="Installing tftp-hpa">
435# <i>emerge net-misc/tftp-hpa</i> 387# <i>emerge tftp-hpa</i>
436</pre> 388</pre>
437 389
438<p> 390<p>
439<c>tftp-hpa</c> comes with an <path>init.d</path> and the accompanying 391<c>tftp-hpa</c> comes with an <path>init.d</path> and the accompanying
440<path>conf.d</path> configuration file. Check to make sure that INTFTPD_PATH 392<path>conf.d</path> configuration file. Check to make sure that INTFTPD_PATH
441and INTFTP_OPTS in <path>/etc/conf.d/in.tftpd</path> match those below: 393and INTFTP_OPTS in <path>/etc/conf.d/in.tftpd</path> match those below:
442</p> 394</p>
443 395
444<pre caption="/etc/conf.d/in.tftpd"> 396<pre caption="/etc/conf.d/in.tftpd">
445INTFTPD_PATH="/tftpboot" 397INTFTPD_PATH="/tftpboot"
446INTFTPD_OPTS="-s -v -l ${INTFTPD_PATH}" 398INTFTPD_OPTS="-s -v -l ${INTFTPD_PATH}"
447</pre> 399</pre>
448 400
449<p> 401<p>
450The TFTP daemon can then be started via the <path>init.d</path> script: 402The TFTP daemon can then be started via the <path>init.d</path> script:

Legend:
Removed from v.1.12  
changed lines
  Added in v.1.13

  ViewVC Help
Powered by ViewVC 1.1.20