Deleted Added
full compact
diskless.8 (69059) diskless.8 (70466)
1.\" $NetBSD: diskless.8,v 1.11 1997/06/16 07:50:35 mrg Exp $
2.\"
3.\" Copyright (c) 1994 Gordon W. Ross, Theo de Raadt
4.\" All rights reserved.
5.\"
6.\" Redistribution and use in source and binary forms, with or without
7.\" modification, are permitted provided that the following conditions
8.\" are met:
9.\" 1. Redistributions of source code must retain the above copyright
10.\" notice, this list of conditions and the following disclaimer.
11.\" 2. Redistributions in binary form must reproduce the above copyright
12.\" notice, this list of conditions and the following disclaimer in the
13.\" documentation and/or other materials provided with the distribution.
14.\" 3. The name of the author may not be used to endorse or promote products
15.\" derived from this software without specific prior written permission.
16.\"
17.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
18.\" IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
19.\" OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
20.\" IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
21.\" INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
22.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
23.\" DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
24.\" THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
25.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
26.\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
27.\"
1.\" $NetBSD: diskless.8,v 1.11 1997/06/16 07:50:35 mrg Exp $
2.\"
3.\" Copyright (c) 1994 Gordon W. Ross, Theo de Raadt
4.\" All rights reserved.
5.\"
6.\" Redistribution and use in source and binary forms, with or without
7.\" modification, are permitted provided that the following conditions
8.\" are met:
9.\" 1. Redistributions of source code must retain the above copyright
10.\" notice, this list of conditions and the following disclaimer.
11.\" 2. Redistributions in binary form must reproduce the above copyright
12.\" notice, this list of conditions and the following disclaimer in the
13.\" documentation and/or other materials provided with the distribution.
14.\" 3. The name of the author may not be used to endorse or promote products
15.\" derived from this software without specific prior written permission.
16.\"
17.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
18.\" IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
19.\" OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
20.\" IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
21.\" INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
22.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
23.\" DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
24.\" THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
25.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
26.\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
27.\"
28.\" $FreeBSD: head/share/man/man8/diskless.8 69059 2000-11-22 18:00:50Z phantom $
28.\" $FreeBSD: head/share/man/man8/diskless.8 70466 2000-12-29 09:18:45Z ru $
29.\"
30.Dd October 2, 1994
31.Dt DISKLESS 8
32.Os
33.Sh NAME
34.Nm diskless
35.Nd booting a system over the network
36.Sh DESCRIPTION
37The ability to boot a machine over the network is useful for
38.Em diskless
39or
40.Em dataless
41machines, or as a temporary measure while repairing or
42re-installing filesystems on a local disk.
43This file provides a general description of the interactions between
44a client and its server when a client is booting over the network.
45The general description is followed by specific instructions for
46configuring a server for diskless Sun clients.
47.Sh OPERATION
48When booting a system over the network, there are three
49phases of interaction between client and server:
50.Pp
29.\"
30.Dd October 2, 1994
31.Dt DISKLESS 8
32.Os
33.Sh NAME
34.Nm diskless
35.Nd booting a system over the network
36.Sh DESCRIPTION
37The ability to boot a machine over the network is useful for
38.Em diskless
39or
40.Em dataless
41machines, or as a temporary measure while repairing or
42re-installing filesystems on a local disk.
43This file provides a general description of the interactions between
44a client and its server when a client is booting over the network.
45The general description is followed by specific instructions for
46configuring a server for diskless Sun clients.
47.Sh OPERATION
48When booting a system over the network, there are three
49phases of interaction between client and server:
50.Pp
51.Bl -tag -width 1.2 -compact
52.It 1.
51.Bl -enum -compact
52.It
53The PROM (or stage-1 bootstrap) loads a boot program.
53The PROM (or stage-1 bootstrap) loads a boot program.
54.It 2.
54.It
55The boot program loads a kernel.
55The boot program loads a kernel.
56.It 3.
56.It
57The kernel does NFS mounts for root.
58.El
59.Pp
60Each of these phases are described in further detail below.
61.Pp
62In phase 1, the PROM loads a boot program. PROM designs
63vary widely, so this phase is inherently machine-specific.
64Sun machines use
65.Tn RARP
66to determine the client's
67.Tn IP
68address and then use
69.Tn TFTP
70to download a boot program from whoever sent the
71.Tn RARP
72reply. HP 300-series machines use the
73.Tn HP Remote Maintenance Protocol
74to download a boot program.
75Typical personal computers may load a
76network boot program either from diskette or
77using a special PROM on the network card.
78.Pp
79In phase 2, the boot program loads a kernel. Operation in
80this phase depends on the design of the boot program.
81(The design described here is the one used by Sun and NetBSD/hp300.)
82The boot program:
83.Pp
57The kernel does NFS mounts for root.
58.El
59.Pp
60Each of these phases are described in further detail below.
61.Pp
62In phase 1, the PROM loads a boot program. PROM designs
63vary widely, so this phase is inherently machine-specific.
64Sun machines use
65.Tn RARP
66to determine the client's
67.Tn IP
68address and then use
69.Tn TFTP
70to download a boot program from whoever sent the
71.Tn RARP
72reply. HP 300-series machines use the
73.Tn HP Remote Maintenance Protocol
74to download a boot program.
75Typical personal computers may load a
76network boot program either from diskette or
77using a special PROM on the network card.
78.Pp
79In phase 2, the boot program loads a kernel. Operation in
80this phase depends on the design of the boot program.
81(The design described here is the one used by Sun and NetBSD/hp300.)
82The boot program:
83.Pp
84.Bl -tag -width 2.2 -compact
84.Bl -tag -width \&2.2 -compact
85.It 2.1
86gets the client IP address using
87.Tn RARP .
88.It 2.2
89gets the client name and server
90.Tn IP
91address by broadcasting an
92.Tn RPC / BOOTPARAMS / WHOAMI
93request with the client IP address.
94.It 2.3
95gets the server path for this client's
96root using an
97.Tn RPC / BOOTPARAMS / GETFILE
98request with the client name.
99.It 2.4
100gets the root file handle by calling
101.Xr mountd 8
102with the server path for the client root.
103.It 2.5
104gets the kernel file handle by calling
105.Tn NFS
106lookup on the root file handle.
107.It 2.6
108loads the kernel using
109.Tn NFS
110read calls on the kernel file handle.
111.It 2.7
112transfers control to the kernel entry point.
113.El
114.Pp
115In phase 3, the kernel does NFS mounts for root.
116The kernel repeats much of the work done by the boot program
117because there is no standard way for the boot program to pass
118the information it gathered on to the kernel.
119The procedure used by the kernel is as follows:
120.Pp
85.It 2.1
86gets the client IP address using
87.Tn RARP .
88.It 2.2
89gets the client name and server
90.Tn IP
91address by broadcasting an
92.Tn RPC / BOOTPARAMS / WHOAMI
93request with the client IP address.
94.It 2.3
95gets the server path for this client's
96root using an
97.Tn RPC / BOOTPARAMS / GETFILE
98request with the client name.
99.It 2.4
100gets the root file handle by calling
101.Xr mountd 8
102with the server path for the client root.
103.It 2.5
104gets the kernel file handle by calling
105.Tn NFS
106lookup on the root file handle.
107.It 2.6
108loads the kernel using
109.Tn NFS
110read calls on the kernel file handle.
111.It 2.7
112transfers control to the kernel entry point.
113.El
114.Pp
115In phase 3, the kernel does NFS mounts for root.
116The kernel repeats much of the work done by the boot program
117because there is no standard way for the boot program to pass
118the information it gathered on to the kernel.
119The procedure used by the kernel is as follows:
120.Pp
121.Bl -tag -width 2.2 -compact
121.Bl -tag -width \&2.2 -compact
122.It 3.1
123The kernel finds a boot server using the same procedure
124as described in steps 2.1 and 2.2 above.
125.It 3.2
126The kernel gets the
127.Tn NFS
128file handle for root using the same procedure
129as described in steps 2.3 through 2.5 above.
130.It 3.3
131The kernel calls the
132.Tn NFS
133getattr function to get the last-modified time of the root
134directory, and uses it to check the system clock.
135.El
136.Sh CONFIGURATION
137Before a client can boot over the network,
138its server must be configured correctly.
139This example will demonstrate how a Sun client
140might be configured -- other clients should be similar.
141.Pp
142Assuming the client's hostname is to be
143"myclient",
144.Pp
122.It 3.1
123The kernel finds a boot server using the same procedure
124as described in steps 2.1 and 2.2 above.
125.It 3.2
126The kernel gets the
127.Tn NFS
128file handle for root using the same procedure
129as described in steps 2.3 through 2.5 above.
130.It 3.3
131The kernel calls the
132.Tn NFS
133getattr function to get the last-modified time of the root
134directory, and uses it to check the system clock.
135.El
136.Sh CONFIGURATION
137Before a client can boot over the network,
138its server must be configured correctly.
139This example will demonstrate how a Sun client
140might be configured -- other clients should be similar.
141.Pp
142Assuming the client's hostname is to be
143"myclient",
144.Pp
145.Bl -tag -width 2.1 -compact
146.It 1.
145.Bl -enum
146.It
147Add an entry to
148.Pa /etc/ethers
149corresponding to the client's ethernet address:
150.Bd -literal -offset indent -compact
1518:0:20:7:c5:c7 myclient
152.Ed
153This will be used by
154.Xr rarpd 8 .
147Add an entry to
148.Pa /etc/ethers
149corresponding to the client's ethernet address:
150.Bd -literal -offset indent -compact
1518:0:20:7:c5:c7 myclient
152.Ed
153This will be used by
154.Xr rarpd 8 .
155.Pp
156.It 2.
155.It
157Assign an IP address for myclient in your
158.Pa /etc/hosts
159or DNS database:
160.Bd -literal -offset indent -compact
161192.197.96.12 myclient
162.Ed
156Assign an IP address for myclient in your
157.Pa /etc/hosts
158or DNS database:
159.Bd -literal -offset indent -compact
160192.197.96.12 myclient
161.Ed
163.Pp
164.It 3.
162.It
165If booting a Sun machine, ensure that
166.Pa /etc/inetd.conf
167is configured to run
168.Xr tftpd 8
169in the directory
170.Pa /tftpboot .
171.Pp
172If booting an HP 300-series machine, ensure that
173.Pa /etc/rbootd.conf
174is configured properly to transfer the boot program to the client.
175An entry might look like this:
176.Bd -literal -offset indent -compact
17708:00:09:01:23:E6 SYS_UBOOT # myclient
178.Ed
179.Pp
180See the
181.Xr rbootd 8
182manual page for more information.
163If booting a Sun machine, ensure that
164.Pa /etc/inetd.conf
165is configured to run
166.Xr tftpd 8
167in the directory
168.Pa /tftpboot .
169.Pp
170If booting an HP 300-series machine, ensure that
171.Pa /etc/rbootd.conf
172is configured properly to transfer the boot program to the client.
173An entry might look like this:
174.Bd -literal -offset indent -compact
17508:00:09:01:23:E6 SYS_UBOOT # myclient
176.Ed
177.Pp
178See the
179.Xr rbootd 8
180manual page for more information.
183.Pp
184.It 4.
181.It
185If booting a SPARC machine, install a copy of the appropriate diskless boot
186loader (such as
187.Pa /usr/mdec/boot )
188in the
189.Pa /tftpboot
190directory.
191Make a link such that the boot program is
192accessible by a file name composed of the client's IP address
193in HEX, a dot, and the architecture name (all upper case).
194For example:
195.Bd -literal -offset indent -compact
196# cd /tftpboot
197# ln -s boot C0C5600C.SUN4
198.Ed
199.Pp
200For a Sun3 machine, the name would be just C0C5600C
201(the sun3 PROM does not append the architecture name). The name
202used is architecture dependent, it simply has to match what the
203booting client's PROM wishes to it to be.
204If the client's PROM fails to fetch the expected file,
205.Xr tcpdump 1
206can be used to discover which filename the client is trying to read.
207.Pp
208If booting an HP 300-series machine, ensure that the network boot program
209.Pa SYS_UBOOT
210(which may be called
211.Pa uboot.lif
212before installation)
213is installed in the directory
214.Pa /usr/mdec/rbootd .
182If booting a SPARC machine, install a copy of the appropriate diskless boot
183loader (such as
184.Pa /usr/mdec/boot )
185in the
186.Pa /tftpboot
187directory.
188Make a link such that the boot program is
189accessible by a file name composed of the client's IP address
190in HEX, a dot, and the architecture name (all upper case).
191For example:
192.Bd -literal -offset indent -compact
193# cd /tftpboot
194# ln -s boot C0C5600C.SUN4
195.Ed
196.Pp
197For a Sun3 machine, the name would be just C0C5600C
198(the sun3 PROM does not append the architecture name). The name
199used is architecture dependent, it simply has to match what the
200booting client's PROM wishes to it to be.
201If the client's PROM fails to fetch the expected file,
202.Xr tcpdump 1
203can be used to discover which filename the client is trying to read.
204.Pp
205If booting an HP 300-series machine, ensure that the network boot program
206.Pa SYS_UBOOT
207(which may be called
208.Pa uboot.lif
209before installation)
210is installed in the directory
211.Pa /usr/mdec/rbootd .
215
216.It 5.
212.It
217Add myclient to the bootparams database
218.Pa /etc/bootparams :
219.Bd -literal -offset indent -compact
220myclient root=server:/export/myclient/root
221.Ed
222.Pp
223Note: For the swap file to be mountable, you have to make sure that mountd is
224started with the
225.Fl r
226flag.
213Add myclient to the bootparams database
214.Pa /etc/bootparams :
215.Bd -literal -offset indent -compact
216myclient root=server:/export/myclient/root
217.Ed
218.Pp
219Note: For the swap file to be mountable, you have to make sure that mountd is
220started with the
221.Fl r
222flag.
227
228.It 6.
223.It
229Build the swap file for myclient:
230.Bd -literal -offset indent -compact
231# mkdir /export/myclient
232# cd /export/myclient
233# dd if=/dev/zero of=swap bs=16k count=1024
234.Ed
235This creates a 16 Megabyte swap file.
224Build the swap file for myclient:
225.Bd -literal -offset indent -compact
226# mkdir /export/myclient
227# cd /export/myclient
228# dd if=/dev/zero of=swap bs=16k count=1024
229.Ed
230This creates a 16 Megabyte swap file.
236.Pp
237.It 7.
231.It
238Populate myclient's
239.Pa /
240filesystem on the server. How this is done depends on the
241client architecture and the version of the NetBSD distribution.
242It can be as simple as copying and modifying the server's root
243filesystem, or perhaps you need to get those files out of the
244standard binary distribution.
245.Pp
246Note that, unlike SunOS, you need to create a mount point for the
247client's swap:
248.Bd -literal -offset indent -compact
249# mkdir /export/myclient/root/swap
250.Ed
232Populate myclient's
233.Pa /
234filesystem on the server. How this is done depends on the
235client architecture and the version of the NetBSD distribution.
236It can be as simple as copying and modifying the server's root
237filesystem, or perhaps you need to get those files out of the
238standard binary distribution.
239.Pp
240Note that, unlike SunOS, you need to create a mount point for the
241client's swap:
242.Bd -literal -offset indent -compact
243# mkdir /export/myclient/root/swap
244.Ed
251.Pp
252.It 8.
245.It
253Export the required filesystems in
254.Pa /etc/exports :
255.Bd -literal -offset indent -compact
256/usr -ro myclient
257# for SunOS:
258# /export/myclient -rw=myclient,root=myclient
259# for NetBSD:
260/export/myclient -maproot=root -alldirs myclient
261.Ed
262.Pp
263If the server and client are of the same architecture, then the client
264can share the server's
265.Pa /usr
266filesystem (as is done above).
267If not, you must build a properly fleshed out
268.Pa /usr
269partition for the client in some other place.
270.Pp
271If your server was a sparc, and your client a sun3,
272you might create and fill
273.Pa /export/usr.sun3
274and then use the following
275.Pa /etc/exports
276lines:
277.Bd -literal -offset indent -compact
278/export/usr.sun3 -ro myclient
279/export/myclient -rw=myclient,root=myclient
280.Ed
246Export the required filesystems in
247.Pa /etc/exports :
248.Bd -literal -offset indent -compact
249/usr -ro myclient
250# for SunOS:
251# /export/myclient -rw=myclient,root=myclient
252# for NetBSD:
253/export/myclient -maproot=root -alldirs myclient
254.Ed
255.Pp
256If the server and client are of the same architecture, then the client
257can share the server's
258.Pa /usr
259filesystem (as is done above).
260If not, you must build a properly fleshed out
261.Pa /usr
262partition for the client in some other place.
263.Pp
264If your server was a sparc, and your client a sun3,
265you might create and fill
266.Pa /export/usr.sun3
267and then use the following
268.Pa /etc/exports
269lines:
270.Bd -literal -offset indent -compact
271/export/usr.sun3 -ro myclient
272/export/myclient -rw=myclient,root=myclient
273.Ed
281.Pp
282.It 9.
274.It
283Copy and customize at least the following files in
284.Pa /export/myclient/root :
285.Bd -literal -offset indent -compact
286# cd /export/myclient/root/etc
287# cp fstab.nfs fstab
288# cp /etc/hosts hosts
289# echo myclient > myname
290# echo 192.197.96.12 > hostname.le0
291.Ed
292.Pp
293Note that "le0" above should be replaced with the name of
294the network interface that the client will use for booting.
275Copy and customize at least the following files in
276.Pa /export/myclient/root :
277.Bd -literal -offset indent -compact
278# cd /export/myclient/root/etc
279# cp fstab.nfs fstab
280# cp /etc/hosts hosts
281# echo myclient > myname
282# echo 192.197.96.12 > hostname.le0
283.Ed
284.Pp
285Note that "le0" above should be replaced with the name of
286the network interface that the client will use for booting.
295.Pp
296.It 10.
287.It
297Correct the critical mount points and the swap file in the client's
298.Pa /etc/fstab
299(which will be
300.Pa /export/myclient/root/etc/fstab )
301ie.
302.Bd -literal -offset indent -compact
303myserver:/export/myclient/root / nfs rw 0 0
304myserver:/usr /usr nfs rw 0 0
305myserver:/export/myclient/swap none swap sw,nfsmntpt=/swap
306.Ed
307.Pp
308Note, you must specify the swap file in
309.Pa /etc/fstab
310or it will not be used!
311.El
312.Sh FILES
313.Bl -tag -width /usr/mdec/rbootd -compact
314.It Pa /etc/ethers
315Ethernet addresses of known clients
316.It Pa /etc/bootparams
317client root pathname
318.It Pa /etc/exports
319exported NFS mount points
320.It Pa /etc/rbootd.conf
321configuration file for HP Remote Boot Daemon
322.It Pa /tftpboot
323location of boot programs loaded by the Sun PROM
324.It Pa /usr/mdec/rbootd
325location of boot programs loaded by the HP Boot ROM
326.El
327.Sh SEE ALSO
328.Xr bootparams 5 ,
329.Xr ethers 5 ,
330.Xr exports 5 ,
331.Xr bootparamd 8 ,
332.Xr mountd 8 ,
333.Xr nfsd 8 ,
334.Xr rarpd 8 ,
335.Xr rbootd 8 ,
336.Xr reboot 8 ,
337.Xr tftpd 8
288Correct the critical mount points and the swap file in the client's
289.Pa /etc/fstab
290(which will be
291.Pa /export/myclient/root/etc/fstab )
292ie.
293.Bd -literal -offset indent -compact
294myserver:/export/myclient/root / nfs rw 0 0
295myserver:/usr /usr nfs rw 0 0
296myserver:/export/myclient/swap none swap sw,nfsmntpt=/swap
297.Ed
298.Pp
299Note, you must specify the swap file in
300.Pa /etc/fstab
301or it will not be used!
302.El
303.Sh FILES
304.Bl -tag -width /usr/mdec/rbootd -compact
305.It Pa /etc/ethers
306Ethernet addresses of known clients
307.It Pa /etc/bootparams
308client root pathname
309.It Pa /etc/exports
310exported NFS mount points
311.It Pa /etc/rbootd.conf
312configuration file for HP Remote Boot Daemon
313.It Pa /tftpboot
314location of boot programs loaded by the Sun PROM
315.It Pa /usr/mdec/rbootd
316location of boot programs loaded by the HP Boot ROM
317.El
318.Sh SEE ALSO
319.Xr bootparams 5 ,
320.Xr ethers 5 ,
321.Xr exports 5 ,
322.Xr bootparamd 8 ,
323.Xr mountd 8 ,
324.Xr nfsd 8 ,
325.Xr rarpd 8 ,
326.Xr rbootd 8 ,
327.Xr reboot 8 ,
328.Xr tftpd 8