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