| 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.13 2010/10/05 21:54:55 nightmorph Exp $ --> |
3 | <!-- $Header: /var/cvsroot/gentoo/xml/htdocs/doc/en/gentoo-sparc-netboot-howto.xml,v 1.14 2012/07/08 23:09:11 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> |
| 16 | Guide for setting up a netboot server for use with the Gentoo/SPARC netboot |
16 | Guide for setting up a netboot server for use with the Gentoo/SPARC netboot |
| 17 | installation images. |
17 | installation 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>2</version> |
24 | <version>3</version> |
| 25 | <date>2010-10-05</date> |
25 | <date>2012-07-08</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> |
| 33 | This howto is currently very SPARC-centric and expecting that you will be |
33 | This howto is currently very SPARC-centric and expecting that you will be |
| 34 | setting up your netboot server on an existing Gentoo Linux machine. |
34 | setting up your netboot server on an existing Gentoo Linux machine. |
| 35 | </note> |
35 | </note> |
| 36 | |
36 | |
| 37 | <p> |
37 | <p> |
| 38 | This document will describe how to setup a network booting environment for a |
38 | This document will describe how to setup a network booting environment for a |
| 39 | Sun Microsystems SPARC or UltraSPARC based computer. The document assumes that |
39 | Sun Microsystems SPARC or UltraSPARC based computer. The document assumes that |
| 40 | you have an existing Gentoo Linux computer available to act as the netboot |
40 | you have an existing Gentoo Linux computer available to act as the netboot |
| … | |
… | |
| 186 | </li> |
186 | </li> |
| 187 | <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> |
| 188 | </ul> |
188 | </ul> |
| 189 | |
189 | |
| 190 | <p> |
190 | <p> |
| 191 | For more options, consult <c>man 8 rarpd</c>. |
191 | For more options, consult <c>man 8 rarpd</c>. |
| 192 | </p> |
192 | </p> |
| 193 | |
193 | |
| 194 | </body> |
194 | </body> |
| 195 | </section> |
195 | </section> |
| 196 | <section> |
196 | <section> |
| 197 | <title>The tftpd Daemon</title> |
197 | <title>The tftpd Daemon</title> |
| 198 | <body> |
198 | <body> |
| 199 | |
199 | |
| 200 | <p> |
200 | <p> |
| 201 | Here there are three options for a TFTP daemon, <c>net-ftp/atftp</c>, |
201 | Here there are two options for a TFTP daemon, <c>net-ftp/atftp</c> and |
| 202 | <c>net-ftp/netkit-tftp</c> and <c>net-ftp/tftp-hpa</c>. You only need to |
202 | <c>net-ftp/tftp-hpa</c>. You only need to install one of the TFTP daemons for |
| 203 | install one of the TFTP daemons for proper operation. |
203 | proper operation. |
| 204 | </p> |
204 | </p> |
| 205 | |
205 | |
| 206 | <p> |
206 | <p> |
| 207 | <b>Setting up common tftpd elements</b> |
207 | <b>Setting up common tftpd elements</b> |
| 208 | </p> |
208 | </p> |
| 209 | |
209 | |
| 210 | <p> |
210 | <p> |
| 211 | Each TFTP daemon will need a directory from which to serve files to tftp |
211 | Each TFTP daemon will need a directory from which to serve files to tftp |
| 212 | clients. The directory we will use for this howto will be |
212 | clients. The directory we will use for this howto will be |
| 213 | <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 |
| 214 | to the clients when requests are received. Additionally, we'll setup the system |
214 | to the clients when requests are received. Additionally, we'll setup the system |
| 215 | to run the TFTP daemon with the user and group <c>nobody</c>. |
215 | to run the TFTP daemon with the user and group <c>nobody</c>. |
| 216 | </p> |
216 | </p> |
| 217 | |
217 | |
| 218 | <p> |
218 | <p> |
| … | |
… | |
| 272 | |
272 | |
| 273 | <ul> |
273 | <ul> |
| 274 | <li> |
274 | <li> |
| 275 | <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 |
| 276 | 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. |
| 277 | Current value range from 0 (LOG_EMERG) to 7 (LOG_DEBUG) |
277 | Current value range from 0 (LOG_EMERG) to 7 (LOG_DEBUG) |
| 278 | </li> |
278 | </li> |
| 279 | <li> |
279 | <li> |
| 280 | <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 |
| 281 | started by inetd. |
281 | started by inetd. |
| 282 | </li> |
282 | </li> |
| 283 | </ul> |
283 | </ul> |
| 284 | |
284 | |
| 285 | <p> |
285 | <p> |
| 286 | For more options, consult <c>man 8 atftpd</c>. |
286 | For more options, consult <c>man 8 atftpd</c>. |
| 287 | </p> |
|
|
| 288 | |
|
|
| 289 | </body> |
|
|
| 290 | </section> |
|
|
| 291 | <section> |
|
|
| 292 | <title>The netkit-tftp Daemon</title> |
|
|
| 293 | <body> |
|
|
| 294 | |
|
|
| 295 | <p> |
|
|
| 296 | First, install the <c>netkit-tftp</c> package: |
|
|
| 297 | </p> |
|
|
| 298 | |
|
|
| 299 | <pre caption="Installing netkit-tftp"> |
|
|
| 300 | # <i>emerge netkit-tftp</i> |
|
|
| 301 | </pre> |
|
|
| 302 | |
|
|
| 303 | <p> |
|
|
| 304 | Second, install <c>sys-apps/xinetd</c> if it is not currently present. After |
|
|
| 305 | the <c>netkit-tftp</c> and <c>sys-apps/xinetd</c> packages have been |
|
|
| 306 | installed, <c>netkit-tftp</c> will need to be configured. <c>netkit-tftp</c> |
|
|
| 307 | needs to be run from <c>xinetd</c>, however it does not provide example scripts |
|
|
| 308 | of its own. A sample <c>xinetd</c> file is provided below: |
|
|
| 309 | </p> |
|
|
| 310 | |
|
|
| 311 | <pre caption="Sample /etc/xinetd.d/tftp file"> |
|
|
| 312 | service tftp |
|
|
| 313 | { |
|
|
| 314 | protocol = udp |
|
|
| 315 | port = 69 |
|
|
| 316 | socket_type = dgram |
|
|
| 317 | wait = yes |
|
|
| 318 | user = nobody |
|
|
| 319 | group = nobody |
|
|
| 320 | server = /usr/sbin/in.tftpd |
|
|
| 321 | server_args = /tftpboot |
|
|
| 322 | only_from = 10.0.1.0 |
|
|
| 323 | disable = no |
|
|
| 324 | } |
|
|
| 325 | </pre> |
|
|
| 326 | |
|
|
| 327 | <note> |
|
|
| 328 | This sample <c>xinetd</c> configuration file for tftp uses the line <c>disable = |
|
|
| 329 | no</c>, which enables the service by default. This is opposite of the default |
|
|
| 330 | way packages in Gentoo provide their respective <c>xinetd</c> configuration |
|
|
| 331 | files, which have <c>disable</c> set to <c>yes</c>. |
|
|
| 332 | </note> |
|
|
| 333 | |
|
|
| 334 | <p> |
|
|
| 335 | An explanation of the above options which can be changed: |
|
|
| 336 | </p> |
|
|
| 337 | |
|
|
| 338 | <ul> |
|
|
| 339 | <li><b>user</b>: the user in.tftpd requests are handled as</li> |
|
|
| 340 | <li><b>group</b>: the group in.tftpd requests are handled as</li> |
|
|
| 341 | <li> |
|
|
| 342 | <b>server_args</b>: the root directory for the TFTP daemon to serve files |
|
|
| 343 | from |
|
|
| 344 | </li> |
|
|
| 345 | <li> |
|
|
| 346 | <b>only_from</b>: tells xinetd which hosts to allow TFTP connections from |
|
|
| 347 | </li> |
|
|
| 348 | </ul> |
|
|
| 349 | |
|
|
| 350 | <p> |
|
|
| 351 | Additional information on <c>xinetd</c> configuration files can be found in |
|
|
| 352 | <c>man 5 xinetd.conf</c>. |
|
|
| 353 | </p> |
|
|
| 354 | |
|
|
| 355 | <p> |
|
|
| 356 | If <c>xinetd</c> is running, you can send it the HUP signal to have it re-read |
|
|
| 357 | its configuration files: |
|
|
| 358 | </p> |
|
|
| 359 | |
|
|
| 360 | <pre caption="Sending HUP signal to xinetd"> |
|
|
| 361 | # <i>/bin/killall -HUP xinetd</i> |
|
|
| 362 | </pre> |
|
|
| 363 | |
|
|
| 364 | <p> |
|
|
| 365 | If <c>xinetd</c> is not running, start it with the init.d command: |
|
|
| 366 | </p> |
|
|
| 367 | |
|
|
| 368 | <pre caption="Starting xinetd"> |
|
|
| 369 | # <i>/etc/init.d/xinetd start</i> |
|
|
| 370 | </pre> |
|
|
| 371 | |
|
|
| 372 | <p> |
|
|
| 373 | For more information, consult <c>man 8 in.tftpd</c>. |
|
|
| 374 | </p> |
287 | </p> |
| 375 | |
288 | |
| 376 | </body> |
289 | </body> |
| 377 | </section> |
290 | </section> |
| 378 | <section> |
291 | <section> |
| 379 | <title>The tftp-hpa Daemon</title> |
292 | <title>The tftp-hpa Daemon</title> |
| 380 | <body> |
293 | <body> |
| 381 | |
294 | |
| 382 | <p> |
295 | <p> |
| 383 | First, install the <c>tftp-hpa</c> package: |
296 | First, install the <c>tftp-hpa</c> package: |
| 384 | </p> |
297 | </p> |
| 385 | |
298 | |
| 386 | <pre caption="Installing tftp-hpa"> |
299 | <pre caption="Installing tftp-hpa"> |
| 387 | # <i>emerge tftp-hpa</i> |
300 | # <i>emerge tftp-hpa</i> |
| 388 | </pre> |
301 | </pre> |