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