11.3Sfredette#	$NetBSD: README,v 1.3 2001/06/13 21:38:30 fredette Exp $
21.2Sfredette
31.3SfredetteREADME for ndbootd-0.5
41.1Sfredette
51.1SfredetteCopyright (c) 2001 Matthew Fredette.  All rights reserved.
61.1Sfredette
71.1SfredetteSee the file COPYING for no-warranty and distribution terms.
81.1Sfredette
91.1Sfredettendbootd is a daemon that serves Sun's old Network Disk (ND) protocol.
101.1SfredetteThis protocol was designed by Sun before they designed NFS.  ND simply
111.1Sfredettemakes the raw blocks of a disk available to network clients.  Contrast
121.1Sfredettethis with the true namespace and file abstractions that NFS provides.
131.1Sfredette
141.1SfredetteThe only reason you're likely to encounter ND nowadays is if you have
151.1Sfredettean old Sun-2 machine, like the 2/120 or 2/50.  The Sun-2 PROMs can
161.1Sfredetteonly use ND to boot over the network.  (Later, the Sun-3 PROMs would
171.1Sfredetteuse RARP and TFTP to boot over the network.)
181.1Sfredette
191.1Sfredettendbootd is a very simple ND server that only supports client reads.
201.1Sfredette
211.1Sfredetteusage: ndbootd [OPTIONS] BOOT1-BIN
221.1Sfredettewhere OPTIONS are:
231.1Sfredette  -s, --boot2 { BOOT2-BIN | DIR }
241.1Sfredette                          find a second-stage boot program in the file
251.1Sfredette                          BOOT2-BIN or in the directory DIR
261.1Sfredette  -i, --interface NAME    use interface NAME
271.1Sfredette  -w, --window-size COUNT 
281.1Sfredette                          send at most COUNT unacknowledged packets [default=6]
291.1Sfredette  -d, --debug             set debug mode
301.1Sfredette
311.1Sfredettendbootd exports a disk that the clients consider to be /dev/ndp0 (ND
321.1Sfredettepublic unit zero).  The disk is available to any client listed in
331.1Sfredette/etc/ethers (Sun-2 PROMs don't do RARP, but they do learn their IP
341.1Sfredetteaddress from the first ND response they receive from the server.)
351.1Sfredette
361.1SfredetteBOOT1-BIN is a file containing the mandatory first-stage network boot
371.1Sfredetteprogram.  The layout of the exported disk is:
381.1Sfredette
391.1Sfredetteblock 0: normally a Sun disklabel (but ignored by the PROM)
401.1Sfredetteblocks 1-15: the first-stage network boot program
411.1Sfredette
421.1SfredetteWith the --boot2 option, ndbootd will also make a second-stage network
431.1Sfredetteboot program available to clients.  When --boot2 is used with a
441.1Sfredettefilename BOOT2-BIN, that file is the second-stage network boot program
451.1Sfredetteto be served to all clients.
461.1Sfredette
471.1SfredetteWhen --boot2 is used with a directory name DIR, ndbootd finds a
481.1Sfredetteclient's second-stage network boot program by turning its IP address
491.1Sfredetteinto a filename in that directory, in the same manner later Sun-3
501.1SfredettePROMs do when TFTPing (i.e., if a client has IP address 192.168.1.10,
511.1Sfredettendbootd expects to find DIR/C0A8010A.SUN2).  The expected use of
521.1Sfredette--boot2 is with the /tftpboot directory, making ndbootd a functional
531.1Sfredettereplacement for tftp when used with an ND-aware first-stage boot
541.1Sfredetteprogram.
551.1Sfredette
561.1SfredetteAny second-stage network boot program always begins at block 16 of the
571.1Sfredetteexported disk, regardless of the length of the first-stage network
581.1Sfredetteboot program.
591.1Sfredette
601.1SfredetteWhether or not there is a second-stage network boot program, the
611.1Sfredetteexported disk appears to have infinite length.  The content of all
621.1Sfredetteblocks not used by the first- or second-stage network boot programs is
631.1Sfredetteundefined.
641.1Sfredette
651.1SfredetteAll first- and second-stage network boot programs must have had their
661.1Sfredetteexec headers stripped off.
671.1Sfredette
681.1SfredetteNormally, ndbootd listens on the first up and running IP interface it
691.1Sfredettefinds.  Use the --interface option to give a specific interface.
701.1Sfredette
711.1SfredetteOne parameter of the ND protocol is a sort of window size.  This is
721.1Sfredettethe number of 1-kilobyte packets that can be transmitted before
731.1Sfredettewaiting for an acknowledgement.  To change this from the default 6,
741.1Sfredetteuse the --window-size option.
751.1Sfredette
761.1SfredetteWhen debug support is compiled in (it is by default), the --debug
771.1Sfredetteoption turns on debugging.
781.1Sfredette
791.1Sfredettendbootd has only been compiled and tested under NetBSD with BPF
801.1Sfredettesupport, although there is a fair autoconf framework, and the raw
811.1Sfredetteinterface support is broken out, which should allow for reasonable
821.1Sfredetteporting.
831.1Sfredette
841.1SfredetteNote that ndbootd was developed specifically to help me to boot my
851.1Sfredetteexperimental NetBSD port on my Sun-2/120.  In this scenario, the
861.1Sfredettefirst-stage network boot (bootyy) continues to use ND to load in the
871.1Sfredettesecond-stage boot program (netboot), which can do a full
881.1SfredetteRARP/bootparams/NFS boot.  (If the program netboot ever fit in 16
891.1Sfredetteblocks, we could eliminate bootyy, but this is unlikely.)
901.1Sfredette
911.1Sfredette(Aside: it is unusual for a network boot to have two stages of boot
921.1Sfredetteprograms before the kernel; this is normally only done on real disks.
931.1SfredetteBut to the Sun-2 PROMs, /dev/ndp0 is just like a real disk in that it
941.1Sfredetteprovides no EOF condition (like a tape boot gets, or like the Sun-3
951.1SfredetteTFTP method gets), so it only loads a fixed number of blocks.)
961.1Sfredette
971.1SfredetteWhether ndbootd can be used to netboot SunOS on a Sun-2 is unknown, but
981.1Sfredettethe hope is that you can use the SunOS-provided sun2.bb file as the
991.1Sfredettefirst-stage boot program, not use any --boot2 option, and ndbootd will
1001.1Sfredetteperform as the SunOS ndbootd did.
1011.1Sfredette
1021.1SfredetteTo configure ndbootd for compiling, run the 'configure' script,
1031.1Sfredettefollowed by make.  To report bugs in compiling or using ndbootd, email
1041.1Sfredettefredette@alum.mit.edu, and please include as much information as you
1051.1Sfredettecan about what you're trying to do and what goes wrong.  I don't have
1061.1Sfredettemuch time to do support, but I'll try.
107