1.\" $NetBSD: ndbootd.8,v 1.4 2002/02/02 01:21:00 wiz Exp $ 2.\" <<Id: ndbootd.8,v 1.2 2001/05/15 14:42:25 fredette Exp >> 3.\" 4.\" Copyright (c) 2001 Matthew Fredette. 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. All advertising materials mentioning features or use of this software 15.\" must display the following acknowledgement: 16.\" This product includes software developed by Matthew Fredette. 17.\" 4. The name of Matthew Fredette may not be used to endorse or promote 18.\" products derived from this software without specific prior written 19.\" permission. 20.\" 21.\" THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR IMPLIED 22.\" WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF 23.\" MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. 24.\" 25.Dd May 9, 2001 26.Dt NDBOOTD 8 27.Os 28.Sh NAME 29.Nm ndbootd 30.Nd 31.Tn Sun 32Network Disk (ND) Protocol server 33.Sh SYNOPSIS 34.Nm 35.Op Fl s Ar boot2 36.Op Fl i Ar interface 37.Op Fl w Ar windowsize 38.Op Fl d 39.Ar boot1 40.Sh DESCRIPTION 41.Nm 42is a server which supports the 43Sun Network Disk (ND) Protocol. 44This protocol was designed by Sun before they designed 45.Tn NFS . 46ND simply 47makes the raw blocks of a disk available to network clients. Contrast 48this with the true namespace and file abstractions that 49.Tn NFS 50provides. 51.Pp 52The only reason you're likely to encounter ND nowadays is if you have 53an old Sun 2 machine, like the 2/120 or 2/50. The Sun 2 PROMs can 54only use ND to boot over the network. (Later, the Sun 3 PROMs would 55use 56.Tn RARP 57and 58.Tn TFTP 59to boot over the network.) 60.Pp 61.Nm 62is a very simple ND server that only supports client reads for 63booting. It exports a disk that the clients consider to be 64.Pa /dev/ndp0 65(ND public unit zero). The disk is available only to clients that are 66listed in 67.Pa /etc/ethers 68and have valid hostnames. 69(Sun 2 PROMs don't do RARP, but they do learn their IP 70address from the first ND response they receive from the server.) 71.Pp 72.Ar boot1 73is a file containing the mandatory first-stage network boot 74program, typically 75.Pa /usr/mdec/bootyy . 76The layout of the exported disk is: 77.Bl -bullet -offset indent 78.It 79block 0: normally a Sun disklabel (but ignored by the PROM) 80.It 81blocks 1-15: the first-stage network boot program 82.El 83.Pp 84With the 85.Fl s Ar boot2 86option, 87.Nm 88will also make a second-stage network 89boot program available to clients, typically 90.Pa /usr/mdec/netboot . 91When 92.Ar boot2 93is a filename, that file is the single second-stage network boot program 94to be served to all clients. 95.Pp 96When 97.Ar boot2 98is a directory name, typically 99.Pa /tftpboot , 100.Nm 101finds a 102client's second-stage network boot program by turning its IP address 103into a filename in that directory, in the same manner later Sun 3 104PROMs do when TFTPing (i.e., if a client has IP address 192.168.1.10, 105.Nm 106expects to find 107.Pa /tftpboot/C0A8010A.SUN2 108). 109.Pp 110When used in this last manner with an ND-aware first-stage boot program, 111.Nm 112serves the same purpose in the Sun 2 netboot process as 113.Xr tftpd 8 114serves in the Sun 3 netboot process. 115.Pp 116Any second-stage network boot program always begins at block 16 of the 117exported disk, regardless of the length of the first-stage network 118boot program. 119.Pp 120All first- and second-stage network boot programs must have all 121executable headers stripped off; they must be raw binary programs. 122.Pp 123The remaining options are: 124.Bl -tag -width "directory" 125.It Fl i Ar interface 126Only listen for ND clients on interface 127.Ar interface . 128Normally 129.Nm 130listens for clients on the first non-loopback IP interface 131that is up and running. 132.It Fl w Ar windowsize 133This adjusts the window size of the ND protocol. This is 134the number of 1-kilobyte packets that can be transmitted before 135waiting for an acknowledgement. Defaults to 6. 136.It Fl d 137Run in debug mode. Debugging output goes to standard error 138and the server will not fork. 139.El 140.Sh FILES 141.Bl -tag -width Pa -compact 142.It Pa /etc/ethers 143.It Pa /etc/hosts 144.\" .It Pa /tftpboot 145.El 146.Sh SEE ALSO 147.Xr tftpd 8 148.Sh BUGS 149Whether or not there is a second-stage network boot program, the 150exported disk appears to all clients to have infinite length. The 151content of all blocks not used by the first- or second-stage network 152boot programs is undefined. All client reads of undefined blocks 153are silently allowed by the server. 154