Name |
Date |
Size |
#Lines |
LOC |
||
---|---|---|---|---|---|---|
.. | - | - | ||||
config/ | H | - | - | 314 | 200 | |
COPYING | H A D | 22-May-2001 | 1.2 KiB | 25 | 23 | |
ChangeLog | H A D | 13-Jun-2001 | 3.8 KiB | 106 | 79 | |
Makefile | H A D | 03-Jun-2023 | 455 | 22 | 13 | |
README | H A D | 13-Jun-2001 | 4.7 KiB | 107 | 83 | |
config.h | H A D | 13-Jun-2001 | 2 KiB | 75 | 16 | |
ndbootd.8 | H A D | 02-Feb-2002 | 4.7 KiB | 154 | 153 | |
ndbootd.c | H A D | 30-Oct-2021 | 35.4 KiB | 1,008 | 732 | |
ndbootd.h | H A D | 06-Jan-2004 | 5.5 KiB | 193 | 106 |
README
1# $NetBSD: README,v 1.3 2001/06/13 21:38:30 fredette Exp $ 2 3README for ndbootd-0.5 4 5Copyright (c) 2001 Matthew Fredette. All rights reserved. 6 7See the file COPYING for no-warranty and distribution terms. 8 9ndbootd is a daemon that serves Sun's old Network Disk (ND) protocol. 10This protocol was designed by Sun before they designed NFS. ND simply 11makes the raw blocks of a disk available to network clients. Contrast 12this with the true namespace and file abstractions that NFS provides. 13 14The only reason you're likely to encounter ND nowadays is if you have 15an old Sun-2 machine, like the 2/120 or 2/50. The Sun-2 PROMs can 16only use ND to boot over the network. (Later, the Sun-3 PROMs would 17use RARP and TFTP to boot over the network.) 18 19ndbootd is a very simple ND server that only supports client reads. 20 21usage: ndbootd [OPTIONS] BOOT1-BIN 22where OPTIONS are: 23 -s, --boot2 { BOOT2-BIN | DIR } 24 find a second-stage boot program in the file 25 BOOT2-BIN or in the directory DIR 26 -i, --interface NAME use interface NAME 27 -w, --window-size COUNT 28 send at most COUNT unacknowledged packets [default=6] 29 -d, --debug set debug mode 30 31ndbootd exports a disk that the clients consider to be /dev/ndp0 (ND 32public unit zero). The disk is available to any client listed in 33/etc/ethers (Sun-2 PROMs don't do RARP, but they do learn their IP 34address from the first ND response they receive from the server.) 35 36BOOT1-BIN is a file containing the mandatory first-stage network boot 37program. The layout of the exported disk is: 38 39block 0: normally a Sun disklabel (but ignored by the PROM) 40blocks 1-15: the first-stage network boot program 41 42With the --boot2 option, ndbootd will also make a second-stage network 43boot program available to clients. When --boot2 is used with a 44filename BOOT2-BIN, that file is the second-stage network boot program 45to be served to all clients. 46 47When --boot2 is used with a directory name DIR, ndbootd finds a 48client's second-stage network boot program by turning its IP address 49into a filename in that directory, in the same manner later Sun-3 50PROMs do when TFTPing (i.e., if a client has IP address 192.168.1.10, 51ndbootd expects to find DIR/C0A8010A.SUN2). The expected use of 52--boot2 is with the /tftpboot directory, making ndbootd a functional 53replacement for tftp when used with an ND-aware first-stage boot 54program. 55 56Any second-stage network boot program always begins at block 16 of the 57exported disk, regardless of the length of the first-stage network 58boot program. 59 60Whether or not there is a second-stage network boot program, the 61exported disk appears to have infinite length. The content of all 62blocks not used by the first- or second-stage network boot programs is 63undefined. 64 65All first- and second-stage network boot programs must have had their 66exec headers stripped off. 67 68Normally, ndbootd listens on the first up and running IP interface it 69finds. Use the --interface option to give a specific interface. 70 71One parameter of the ND protocol is a sort of window size. This is 72the number of 1-kilobyte packets that can be transmitted before 73waiting for an acknowledgement. To change this from the default 6, 74use the --window-size option. 75 76When debug support is compiled in (it is by default), the --debug 77option turns on debugging. 78 79ndbootd has only been compiled and tested under NetBSD with BPF 80support, although there is a fair autoconf framework, and the raw 81interface support is broken out, which should allow for reasonable 82porting. 83 84Note that ndbootd was developed specifically to help me to boot my 85experimental NetBSD port on my Sun-2/120. In this scenario, the 86first-stage network boot (bootyy) continues to use ND to load in the 87second-stage boot program (netboot), which can do a full 88RARP/bootparams/NFS boot. (If the program netboot ever fit in 16 89blocks, we could eliminate bootyy, but this is unlikely.) 90 91(Aside: it is unusual for a network boot to have two stages of boot 92programs before the kernel; this is normally only done on real disks. 93But to the Sun-2 PROMs, /dev/ndp0 is just like a real disk in that it 94provides no EOF condition (like a tape boot gets, or like the Sun-3 95TFTP method gets), so it only loads a fixed number of blocks.) 96 97Whether ndbootd can be used to netboot SunOS on a Sun-2 is unknown, but 98the hope is that you can use the SunOS-provided sun2.bb file as the 99first-stage boot program, not use any --boot2 option, and ndbootd will 100perform as the SunOS ndbootd did. 101 102To configure ndbootd for compiling, run the 'configure' script, 103followed by make. To report bugs in compiling or using ndbootd, email 104fredette@alum.mit.edu, and please include as much information as you 105can about what you're trying to do and what goes wrong. I don't have 106much time to do support, but I'll try. 107