~qbalazs/installation-guide/lp1030336

« back to all changes in this revision

Viewing changes to eu/install-methods/install-tftp.xml

  • Committer: joeyh
  • Date: 2005-10-07 19:51:38 UTC
  • Revision ID: vcs-imports@canonical.com-20051007195138-c3d57b2617a79a4f
move manual to top-level directory, split out of debian-installer package

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
<!-- retain these comments for translator revision tracking -->
 
2
<!-- original version: 16879 untranslated -->
 
3
 
 
4
 <sect1 condition="supports-tftp" id="install-tftp">
 
5
 <title>Preparing Files for TFTP Net Booting</title>
 
6
<para>
 
7
 
 
8
If your machine is connected to a local area network, you may be able
 
9
to boot it over the network from another machine, using TFTP. If you
 
10
intend to boot the installation system from another machine, the
 
11
boot files will need to be placed in specific locations on that machine,
 
12
and the machine configured to support booting of your specific machine.
 
13
 
 
14
</para><para>
 
15
 
 
16
You need to setup a TFTP server, and for CATS machines, a BOOTP server
 
17
<phrase condition="supports-rarp">, or RARP server</phrase>
 
18
<phrase condition="supports-dhcp">, or DHCP server</phrase>.
 
19
 
 
20
</para><para>
 
21
 
 
22
<phrase condition="supports-rarp">The Reverse Address Resolution Protocol (RARP) is
 
23
one way to tell your client what IP address to use for itself. Another
 
24
way is to use the BOOTP protocol. </phrase>
 
25
 
 
26
<phrase condition="supports-bootp">BOOTP is an IP protocol that
 
27
informs a computer of its IP address and where on the network to obtain
 
28
a boot image. </phrase>
 
29
 
 
30
<phrase arch="m68k"> Yet another alternative exists on VMEbus
 
31
systems: the IP address can be manually configured in boot ROM. </phrase>
 
32
 
 
33
<phrase condition="supports-dhcp">The DHCP (Dynamic Host Configuration
 
34
Protocol) is a more flexible, backwards-compatible extension of BOOTP.
 
35
Some systems can only be configured via DHCP. </phrase>
 
36
 
 
37
</para><para arch="powerpc">
 
38
 
 
39
For PowerPC, if you have a NewWorld Power Macintosh machine, it is a
 
40
good idea to use DHCP instead of BOOTP.  Some of the latest machines
 
41
are unable to boot using BOOTP.
 
42
 
 
43
</para><para arch="alpha"> 
 
44
 
 
45
Unlike the Open Firmware found on Sparc and PowerPC machines, the SRM
 
46
console will <emphasis>not</emphasis> use RARP to obtain its IP
 
47
address, and therefore you must use BOOTP for net booting your Alpha.
 
48
You can also enter the IP configuration for network interfaces
 
49
directly in the SRM console.
 
50
 
 
51
<footnote>
 
52
<para>
 
53
 
 
54
Alpha systems can also be net-booted using the DECNet MOP (Maintenance
 
55
Operations Protocol), but this is not covered here.  Presumably, your
 
56
local OpenVMS operator will be happy to assist you should you have
 
57
some burning need to use MOP to boot Linux on your Alpha.
 
58
 
 
59
</para>
 
60
</footnote></para><para arch="hppa"> 
 
61
 
 
62
Some older HPPA machines (e.g. 715/75) use RBOOTD rather than BOOTP.
 
63
An RBOOTD package is available on the parisc-linux web site.
 
64
 
 
65
</para><para>
 
66
 
 
67
The Trivial File Transfer Protocol (TFTP) is used to serve the boot
 
68
image to the client.  Theoretically, any server, on any platform,
 
69
which implements these protocols, may be used.  In the examples in
 
70
this section, we shall provide commands for SunOS 4.x, SunOS 5.x
 
71
(a.k.a. Solaris), and GNU/Linux.
 
72
 
 
73
</para>
 
74
 
 
75
&tftp-rarp.xml;
 
76
&tftp-bootp.xml;
 
77
&tftp-dhcp.xml;
 
78
 
 
79
  <sect2 id="tftpd">
 
80
  <title>Enabling the TFTP Server</title>
 
81
<para>
 
82
 
 
83
To get the TFTP server ready to go, you should first make sure that
 
84
<command>tftpd</command> is enabled.  This is usually enabled by having
 
85
something like the following line in <filename>/etc/inetd.conf</filename>:
 
86
 
 
87
<informalexample><screen>
 
88
 
 
89
tftp dgram udp wait nobody /usr/sbin/tcpd in.tftpd /tftpboot
 
90
 
 
91
</screen></informalexample>
 
92
 
 
93
Debian packages will in general set this up correctly by default when they
 
94
are installed.
 
95
 
 
96
</para><para>
 
97
 
 
98
Look in that file and remember the directory which is used as the
 
99
argument of <command>in.tftpd</command>; you'll need that below.  The
 
100
<userinput>-l</userinput> argument enables some versions of
 
101
<command>in.tftpd</command> to log all requests to the system logs;
 
102
this is useful for diagnosing boot errors.  If you've had to change
 
103
<filename>/etc/inetd.conf</filename>, you'll have to notify the
 
104
running <command>inetd</command> process that the file has changed.
 
105
On a Debian machine, run <userinput>/etc/init.d/inetd
 
106
reload</userinput>; on other machines,
 
107
find out the process ID for <command>inetd</command>, and run
 
108
<userinput>kill -HUP <replaceable>inetd-pid</replaceable></userinput>.
 
109
 
 
110
</para><note arch="i386"><para>
 
111
 
 
112
To use the Pre-boot Execution Environment (PXE) method of TFTP
 
113
booting, you will need a TFTP server with <userinput>tsize</userinput>
 
114
support.  On a &debian; server, the <classname>atftpd</classname> and
 
115
<classname>tftpd-hpa</classname> packages qualify.
 
116
 
 
117
</para></note><para arch="mips">
 
118
 
 
119
If your TFTP server is a GNU/Linux box running Linux 2.4.X you'll need
 
120
to set the following on your server:
 
121
 
 
122
<informalexample><screen>
 
123
 
 
124
echo 1 > /proc/sys/net/ipv4/ip_no_pmtu_disc
 
125
 
 
126
</screen></informalexample>
 
127
 
 
128
to turn off Path MTU discovery, otherwise the Indy's PROM can't
 
129
download the kernel. Furthermore, make sure TFTP packets are sent from
 
130
a source port no greater than 32767, or the download will stall after
 
131
the first packet.  Again, it's Linux 2.4.X tripping this bug in the
 
132
PROM, and you can avoid it by setting
 
133
 
 
134
<informalexample><screen>
 
135
 
 
136
echo "2048 32767" > /proc/sys/net/ipv4/ip_local_port_range
 
137
 
 
138
</screen></informalexample>
 
139
 
 
140
to adjust the range of source ports the Linux TFTP server uses.
 
141
 
 
142
</para>
 
143
  </sect2>
 
144
 
 
145
  <sect2 id="tftp-images">
 
146
  <title>Move TFTP Images Into Place</title>
 
147
<para>
 
148
 
 
149
Next, place the TFTP boot image you need, as found in 
 
150
<xref linkend="where-files"/>, in the <command>tftpd</command> 
 
151
boot image directory.  Generally, this directory will be
 
152
<filename>/tftpboot</filename>.  You'll have to make a link from that
 
153
file to the file which <command>tftpd</command> will use for booting a
 
154
particular client.  Unfortunately, the file name is determined by the
 
155
TFTP client, and there are no strong standards.
 
156
 
 
157
</para><para arch="powerpc">
 
158
 
 
159
On NewWorld Power Macintosh machines, you will need to set up the
 
160
<command>yaboot</command> boot loader as the TFTP boot image.
 
161
<command>Yaboot</command> will then retrieve the kernel and RAMdisk
 
162
images via TFTP itself.  For net booting, use the
 
163
<filename>yaboot-netboot.conf</filename>.  Just rename this to
 
164
<filename>yaboot.conf</filename> in the TFTP directory.
 
165
 
 
166
</para><para arch="not-powerpc">
 
167
 
 
168
Often, the file that the TFTP client will look for is
 
169
<replaceable>client-ip-in-hexclient-architecture</replaceable>.  To
 
170
compute <replaceable>client-ip-in-hex</replaceable>, take each byte of
 
171
the client IP address and translate it into hexadecimal notation.  If
 
172
you have a machine handy with the <command>bc</command> program, you
 
173
can use the program.  First issue the <userinput>obase=16</userinput>
 
174
command to set the output to hex, then enter the individual components
 
175
of the client IP one at a time.  As for
 
176
<replaceable>client-architecture</replaceable>, try out some values.
 
177
 
 
178
</para><para arch="i386">
 
179
 
 
180
For PXE booting, you can use the boot loader included with
 
181
<classname>syslinux</classname>: <filename>pxelinux.0</filename>. The boot
 
182
loader should be copied into the <filename>/tftpboot</filename>
 
183
folder. Then create a subdirectory within
 
184
<filename>/tftpboot</filename> named
 
185
<filename>/tftpboot/pxelinux.cfg</filename>, and within that directory
 
186
create a text file <filename>default</filename>. Here is an example of
 
187
a <filename>default</filename> file's contents:
 
188
 
 
189
<informalexample><screen>
 
190
 
 
191
default lanlinux
 
192
prompt 1
 
193
 
 
194
label lanlinux
 
195
  kernel vmlinuz
 
196
  append initrd=initrd.gz devfs=mount root=/dev/ram
 
197
 
 
198
</screen></informalexample>
 
199
 
 
200
<userinput>devfs=mount</userinput> is important, because without it
 
201
there may be problems mounting the initrd.gz file system once the
 
202
kernel is booted.
 
203
 
 
204
</para><para arch="i386">
 
205
 
 
206
Finally, copy the <filename>vmlinuz</filename> and
 
207
<filename>initrd.gz</filename> files (for the netboot installation method)
 
208
from the Debian ftp archive into the <filename>/tftpboot</filename> folder,
 
209
where the bootloader will be looking for them.
 
210
 
 
211
</para>
 
212
 
 
213
 
 
214
   <sect3 arch="mipsel">
 
215
   <title>DECstation TFTP Images</title>
 
216
<para>
 
217
 
 
218
For DECstations, there are tftpimage files for each subarchitecture,
 
219
which contain both kernel and installer in one file. The naming
 
220
convention is tftpimage-<replaceable>subarchitecture</replaceable> or
 
221
tftpimage-<replaceable>subarchitecture</replaceable>.gz.  If the
 
222
tftpimage is gzipped (the name ends with .gz), you need to unpack it
 
223
first with <userinput>gunzip
 
224
tftpimage-<replaceable>subarchitecture</replaceable>.gz</userinput>,
 
225
as DECstations cannot boot compressed files by TFTP. Copy the
 
226
tftpimage file you would like to use to
 
227
<userinput>/tftpboot/tftpboot.img</userinput> if you work with the
 
228
example BOOTP/DHCP setups described above.
 
229
 
 
230
</para><para>
 
231
 
 
232
The DECstation firmware boots by TFTP with the command <userinput>boot
 
233
<replaceable>#</replaceable>/tftp</userinput>, where
 
234
<replaceable>#</replaceable> is the number of the TurboChannel device
 
235
from which to boot. On most DECstations this is "3".  If the
 
236
BOOTP/DHCP server does not supply the filename or you need to pass
 
237
additional parameters, they can optionally be appended with the
 
238
following syntax:
 
239
 
 
240
</para><para>
 
241
 
 
242
<userinput>boot #/tftp/filename param1=value1 param2=value2 ...</userinput>
 
243
 
 
244
</para><para>
 
245
 
 
246
Several DECstation firmware revisions show a problem with regard to
 
247
net booting: the transfer starts, but after some time it stops with
 
248
an <computeroutput>a.out err</computeroutput>. This can have several reasons:
 
249
 
 
250
<orderedlist>
 
251
<listitem><para>
 
252
 
 
253
The firmware does not respond to ARP requests during a TFTP
 
254
transfer. This leads to an ARP timeout and the transfer stops.  The
 
255
solution is to add the MAC address of the Ethernet card in the
 
256
DECstation statically to the ARP table of the TFTP server.  This is
 
257
done by running <userinput>arp -s
 
258
<replaceable>IP-address</replaceable>
 
259
<replaceable>MAC-address</replaceable></userinput> as root on the
 
260
machine acting as TFTP server. The MAC-address of the DECstation can
 
261
be read out by entering <command>cnfg</command> at the DECstation
 
262
firmware prompt.
 
263
 
 
264
</para></listitem>
 
265
<listitem><para>
 
266
 
 
267
The firmware has a size limit on the files that can be booted
 
268
by TFTP.
 
269
 
 
270
</para></listitem>
 
271
</orderedlist>
 
272
 
 
273
There are also firmware revisions that cannot boot via TFTP at all. An
 
274
overview about the different firmware revisions can be found at the
 
275
NetBSD web pages:
 
276
<ulink url="http://www.netbsd.org/Ports/pmax/board-list.html#proms"></ulink>.
 
277
 
 
278
</para>
 
279
   </sect3>
 
280
 
 
281
   <sect3 arch="alpha">
 
282
   <title>Alpha TFTP Booting</title>
 
283
<para>
 
284
On Alpha, you must specify the filename (as a relative path to the
 
285
boot image directory) using the <userinput>-file</userinput> argument
 
286
to the SRM <userinput>boot</userinput> command, or by setting the
 
287
<userinput>BOOT_FILE</userinput> environment variable.  Alternatively,
 
288
the filename can be given via BOOTP (in ISC <command>dhcpd</command>,
 
289
use the <userinput>filename</userinput> directive).  Unlike Open
 
290
Firmware, there is <emphasis>no default filename</emphasis> on SRM, so
 
291
you <emphasis>must</emphasis> specify a filename by either one of
 
292
these methods.
 
293
 
 
294
</para>
 
295
   </sect3>
 
296
 
 
297
   <sect3 arch="sparc">
 
298
   <title>SPARC TFTP Booting</title>
 
299
<para>
 
300
 
 
301
SPARC architectures for instance use the subarchitecture names, such
 
302
as ``SUN4M'' or ``SUN4C''; in some cases, the architecture is left
 
303
blank, so the file the client looks for is just
 
304
<filename>client-ip-in-hex</filename>.  Thus, if your system
 
305
subarchitecture is a SUN4C, and its IP is 192.168.1.3, the filename
 
306
would be <filename>C0A80103.SUN4C</filename>.
 
307
 
 
308
</para><para>
 
309
 
 
310
You can also force some sparc systems to look for a specific file name
 
311
by adding it to the end of the OpenPROM boot command, such as
 
312
<userinput>boot net my-sparc.image</userinput>. This must still reside
 
313
in the directory that the TFTP server looks in.
 
314
 
 
315
</para>
 
316
   </sect3>
 
317
 
 
318
   <sect3 arch="m68k">
 
319
   <title>BVM/Motorola TFTP Booting</title>
 
320
<para>
 
321
 
 
322
For BVM and Motorola VMEbus systems copy the files
 
323
&bvme6000-tftp-files; to <filename>/tftpboot/</filename>.
 
324
 
 
325
</para><para>
 
326
 
 
327
Next, configure your boot ROMs or BOOTP server to initially load the
 
328
<filename>tftplilo.bvme</filename> or
 
329
<filename>tftplilo.mvme</filename> files from the TFTP server.  Refer
 
330
to the <filename>tftplilo.txt</filename> file for your subarchitecture
 
331
for additional system-specific configuration information.
 
332
 
 
333
</para>
 
334
   </sect3>
 
335
 
 
336
   <sect3 arch="mips">
 
337
   <title>SGI Indys TFTP Booting</title>
 
338
<para>
 
339
 
 
340
On SGI Indys you can rely on the <command>bootpd</command> to supply
 
341
the name of the TFTP file. It is given either as the
 
342
<userinput>bf=</userinput> in <filename>/etc/bootptab</filename> or as
 
343
the <userinput>filename=</userinput> option in
 
344
<filename>/etc/dhcpd.conf</filename>.
 
345
 
 
346
</para>
 
347
   </sect3>
 
348
  </sect2>
 
349
 
 
350
  <sect2 id="tftp-low-memory">
 
351
  <title>TFTP Installation for Low-Memory Systems</title>
 
352
<para>
 
353
 
 
354
On some systems, the standard installation RAMdisk, combined with the
 
355
memory requirements of the TFTP boot image, cannot fit in memory.  In
 
356
this case, you can still install using TFTP, you'll just have to go
 
357
through the additional step of NFS mounting your root directory over
 
358
the network as well.  This type of setup is also appropriate for
 
359
diskless or dataless clients.
 
360
 
 
361
</para><para>
 
362
 
 
363
First, follow all the steps above in <xref linkend="install-tftp"/>.
 
364
 
 
365
<orderedlist>
 
366
<listitem><para>
 
367
 
 
368
Copy the Linux kernel image on your TFTP server using the
 
369
<userinput>a.out</userinput> image for the architecture you are
 
370
booting.
 
371
 
 
372
</para></listitem>
 
373
<listitem><para>
 
374
 
 
375
Untar the root archive on your NFS server (can be the same system as
 
376
your TFTP server): 
 
377
 
 
378
<informalexample><screen>
 
379
 
 
380
# cd /tftpboot
 
381
# tar xvzf root.tar.gz
 
382
 
 
383
</screen></informalexample>
 
384
 
 
385
Be sure to use the GNU <command>tar</command> (other tar programs, like the
 
386
SunOS one, badly handle devices as plain files).
 
387
 
 
388
</para></listitem>
 
389
<listitem><para>
 
390
 
 
391
Export your <filename>/tftpboot/debian-sparc-root</filename> directory
 
392
with root access to your client.  E.g., add the following line to
 
393
<filename>/etc/exports</filename> (GNU/Linux syntax, should be similar
 
394
for SunOS):
 
395
 
 
396
<informalexample><screen>
 
397
 
 
398
/tftpboot/debian-sparc-root client(rw,no_root_squash)
 
399
 
 
400
</screen></informalexample>
 
401
 
 
402
NOTE: "client" is the host name or IP address recognized by the server for
 
403
the system you are booting.
 
404
 
 
405
</para></listitem>
 
406
<listitem><para>
 
407
 
 
408
Create a symbolic link from your client IP address in dotted notation
 
409
to <filename>debian-sparc-root</filename> in the
 
410
<filename>/tftpboot</filename> directory.  For example, if the client
 
411
IP address is 192.168.1.3, do
 
412
 
 
413
<informalexample><screen>
 
414
 
 
415
# ln -s debian-sparc-root 192.168.1.3
 
416
 
 
417
</screen></informalexample>
 
418
 
 
419
</para></listitem>
 
420
</orderedlist>
 
421
 
 
422
</para>
 
423
 
 
424
  </sect2>
 
425
 
 
426
  <sect2 condition="supports-nfsroot">
 
427
  <title>Installing with TFTP and NFS Root</title>
 
428
<para>
 
429
 
 
430
Installing with TFTP and NFS Root is similar to 
 
431
<xref linkend="tftp-low-memory"/> because you don't want to 
 
432
load the RAMdisk anymore but boot from the newly created NFS-root file
 
433
system.  You then need to replace the symlink to the tftpboot image by
 
434
a symlink to the kernel image (for example,
 
435
<filename>linux-a.out</filename>).
 
436
 
 
437
</para><para>
 
438
 
 
439
RARP/TFTP requires all daemons to be running on the same server (the
 
440
workstation is sending a TFTP request back to the server that replied
 
441
to its previous RARP request).
 
442
 
 
443
</para>
 
444
 
 
445
  </sect2>
 
446
 </sect1>