NetBSD/usr.sbin/ndbootd/ndbootd.8

154 lines
4.7 KiB
Groff
Raw Normal View History

.\" <<Id: ndbootd.8,v 1.2 2001/05/15 14:42:25 fredette Exp >>
.\"
.\" Copyright (c) 2001 Matthew Fredette. All rights reserved.
.\"
.\" Redistribution and use in source and binary forms, with or without
.\" modification, are permitted provided that the following conditions
.\" are met:
.\" 1. Redistributions of source code must retain the above copyright
.\" notice, this list of conditions and the following disclaimer.
.\" 2. Redistributions in binary form must reproduce the above copyright
.\" notice, this list of conditions and the following disclaimer in the
.\" documentation and/or other materials provided with the distribution.
.\" 3. All advertising materials mentioning features or use of this software
.\" must display the following acknowledgement:
.\" This product includes software developed by Matthew Fredette.
.\" 4. The name of Matthew Fredette may not be used to endorse or promote
.\" products derived from this software without specific prior written
.\" permission.
.\"
.\" THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR IMPLIED
.\" WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF
.\" MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
.\"
.Dd May 9, 2001
.Dt NDBOOTD 8
.Os
.Sh NAME
.Nm ndbootd
.Nd
.Tn Sun
Network Disk (ND) Protocol server
.Sh SYNOPSIS
.Nm
.Op Fl s Ar boot2
.Op Fl i Ar interface
.Op Fl w Ar windowsize
.Op Fl d
.Ar boot1
.Sh DESCRIPTION
.Nm
is a server which supports the
Sun Network Disk (ND) Protocol.
This protocol was designed by Sun before they designed
.Tn NFS .
ND simply
makes the raw blocks of a disk available to network clients. Contrast
this with the true namespace and file abstractions that
.Tn NFS
provides.
.Pp
The only reason you're likely to encounter ND nowadays is if you have
an old Sun 2 machine, like the 2/120 or 2/50. The Sun 2 PROMs can
only use ND to boot over the network. (Later, the Sun 3 PROMs would
use
.Tn RARP
and
.Tn TFTP
to boot over the network.)
.Pp
.Nm
is a very simple ND server that only supports client reads for
booting. It exports a disk that the clients consider to be
.Pa /dev/ndp0
(ND public unit zero). The disk is available only to clients that are
listed in
.Pa /etc/ethers
and have valid hostnames.
(Sun 2 PROMs don't do RARP, but they do learn their IP
address from the first ND response they receive from the server.)
.Pp
.Ar boot1
is a file containing the mandatory first-stage network boot
program, typically
.Pa /usr/mdec/bootyy .
The layout of the exported disk is:
.Bl -bullet -offset indent
.It
block 0: normally a Sun disklabel (but ignored by the PROM)
.It
blocks 1-15: the first-stage network boot program
.El
.Pp
With the
.Fl s Ar boot2
option,
.Nm
will also make a second-stage network
boot program available to clients, typically
.Pa /usr/mdec/netboot .
When
.Ar boot2
is a filename, that file is the single second-stage network boot program
to be served to all clients.
.Pp
When
.Ar boot2
is a directory name, typically
.Pa /tftpboot ,
.Nm
finds a
client's second-stage network boot program by turning its IP address
into a filename in that directory, in the same manner later Sun 3
PROMs do when TFTPing (i.e., if a client has IP address 192.168.1.10,
.Nm
expects to find
.Pa /tftpboot/C0A8010A.SUN2
).
.Pp
When used in this last manner with an ND-aware first-stage boot program,
.Nm
serves the same purpose in the Sun 2 netboot process as
.Xr tftpd 8
serves in the Sun 3 netboot process.
.Pp
Any second-stage network boot program always begins at block 16 of the
exported disk, regardless of the length of the first-stage network
boot program.
.Pp
All first- and second-stage network boot programs must have all
executable headers stripped off; they must be raw binary programs.
.Pp
The remaining options are:
.Bl -tag -width "directory"
.It Fl i Ar interface
Only listen for ND clients on interface
.Ar interface .
Normally
.Nm
listens for clients on the first non-loopback IP interface
that is up and running.
.It Fl w Ar windowsize
This adjusts the window size of the ND protocol. This is
the number of 1-kilobyte packets that can be transmitted before
waiting for an acknowledgement. Defaults to 6.
.It Fl d
Run in debug mode. Debugging output goes to standard error
and the server will not fork.
.El
.Pp
.Sh FILES
.Bl -tag -width Pa -compact
.It Pa /etc/ethers
.It Pa /etc/hosts
.\" .It Pa /tftpboot
.El
.Sh SEE ALSO
.Xr tftpd 8
.Sh BUGS
Whether or not there is a second-stage network boot program, the
exported disk appears to all clients to have infinite length. The
content of all blocks not used by the first- or second-stage network
boot programs is undefined. All client reads of undefined blocks
are silently allowed by the server.