[BACK]Return to diskless-8.html CVS log [TXT][DIR] Up to [local] / www

Annotation of www/diskless-8.html, Revision 1.1

1.1     ! kstailey    1: <TITLE>UNIX Manual Page: man diskless</TITLE>
        !             2:
        !             3: <BODY>
        !             4: <PRE WIDTH=80>
        !             5: DISKLESS(8)             OpenBSD System Manager's Manual            DISKLESS(8)
        !             6:
        !             7: <B>NAME
        !             8:      diskless </B>- booting a system over the network
        !             9:
        !            10: <B>DESCRIPTION
        !            11:      </B>The ability to boot a machine over the network is useful for diskless or
        !            12:      dataless machines, or as a temporary measure while repairing or re-
        !            13:      installing filesystems on a local disk.  This file provides a general de-
        !            14:      scription of the interactions between a client and its server when a
        !            15:      client is booting over the network.  The general description is followed
        !            16:      by specific instructions for configuring a server for diskless Sun
        !            17:      clients.
        !            18:
        !            19: <B>OPERATION
        !            20:      </B>When booting a system over the network, there are three phases of inter-
        !            21:      action between client and server:
        !            22:
        !            23:      1.   The PROM (or stage-1 bootstrap) loads a boot program.
        !            24:      2.   The boot program loads a kernel.
        !            25:      3.   The kernel does NFS mounts for root and swap.
        !            26:
        !            27:      Each of these phases are described in further detail below.
        !            28:
        !            29:      In phase 1, the PROM loads a boot program.  PROM designs vary widely, so
        !            30:      this phase is inherently machine-specific.  Sun and Motorola machines use
        !            31:      RARP to determine the client's IP address and then use TFTP to download a
        !            32:      boot program from whoever sent the RARP reply.  HP 300-series machines
        !            33:      use the HP Remote Maintenance Protocol to download a boot program.  Other
        !            34:      machines may load a network boot program either from diskette or using a
        !            35:      special PROM on the network card.
        !            36:
        !            37:      In phase 2, the boot program loads a kernel.  Operation in this phase de-
        !            38:      pends on the design of the boot program.  The boot program:
        !            39:
        !            40:      2.1  gets the client IP address using RARP.
        !            41:      2.2  gets the client name and server IP address by broadcasting an RPC /
        !            42:           BOOTPARAMS / WHOAMI request with the client IP address.
        !            43:      2.3  gets the server path for this client's root using an RPC /
        !            44:           BOOTPARAMS / GETFILE request with the client name.
        !            45:      2.4  gets the root file handle by calling <A HREF="/cgi-bin/manpage?8+mountd">mountd(8)</A> with the server path
        !            46:           for the client root.
        !            47:      2.5  gets the kernel file handle by calling NFS lookup on the root file
        !            48:           handle.
        !            49:      2.6  loads the kernel using NFS read calls on the kernel file handle.
        !            50:      2.7  transfers control to the kernel entry point.
        !            51:
        !            52:      In phase 3, the kernel does NFS mounts for root and swap.  The kernel re-
        !            53:      peats much of the work done by the boot program because there is no stan-
        !            54:      dard way for the boot program to pass the information it gathered on to
        !            55:      the kernel.  The procedure used by the kernel is as follows:
        !            56:
        !            57:      3.1  The kernel finds a boot server using the same procedure as described
        !            58:           in steps 2.1 and 2.2 above.
        !            59:      3.2  The kernel gets the NFS file handle for root using the same proce-
        !            60:           dure as described in steps 2.3 through 2.5 above.
        !            61:      3.3  The kernel calls the NFS getattr function to get the last-modified
        !            62:           time of the root directory, and uses it to check the system clock.
        !            63:      3.4  If the kernel is configured for swap on NFS, it uses the same mecha-
        !            64:           nism as for root, but uses the NFS getattr function to determine the
        !            65:           size of the swap area.
        !            66:
        !            67: <B>CONFIGURATION
        !            68:      </B>Before a client can boot over the network, its server must be configured
        !            69:      correctly.  This example will demonstrate how a Sun client might be con-
        !            70:      figured -- other clients should be similar.
        !            71:
        !            72:      Assuming the client's hostname is to be "myclient",
        !            73:
        !            74:      1.   Add an entry to <I>/etc/ethers </I>corresponding to the client's ethernet
        !            75:           address:
        !            76:                 8:0:20:7:c5:c7          myclient
        !            77:           This will be used by <A HREF="/cgi-bin/manpage?8+rarpd">rarpd(8)</A>.
        !            78:
        !            79:      2.   Assign an IP address for myclient in your <I>/etc/hosts </I>or DNS
        !            80:           database:
        !            81:                 192.197.96.12           myclient
        !            82:
        !            83:      3.   If booting a Sun or Motorola client, ensure that <I>/etc/inetd.conf </I>is
        !            84:           configured to run <A HREF="/cgi-bin/manpage?8+tftpd">tftpd(8)</A> in the directory <I>/tftpboot</I>.
        !            85:
        !            86:           If booting an HP 300-series machine, ensure that <I>/etc/rbootd.conf </I>is
        !            87:           configured properly to transfer the boot program to the client.  An
        !            88:           entry might look like this:
        !            89:                 08:00:09:01:23:E6       SYS_NBOOT       # myclient
        !            90:
        !            91:           See the <A HREF="/cgi-bin/manpage?8+rbootd">rbootd(8)</A> manual page for more information.
        !            92:
        !            93:      4.   If booting a Sun or Motorola client, install a copy of the appropri-
        !            94:           ate diskless boot loader (such as <I>boot.sun4.sunos.4.1.1 </I>from the
        !            95:           SunOS media) in the <I>/tftpboot </I>directory.  Make a link such that the
        !            96:           boot program is accessible by a file name composed of the client's
        !            97:           IP address in HEX, a dot, and the architecture name (all upper
        !            98:           case).  For example:
        !            99:                 # cd /tftpboot
        !           100:                 # ln -s boot.sun4.sunos.4.1.1 C0C5600C.SUN4
        !           101:
        !           102:           For a Sun3 machine, the name would be just C0C5600C (the sun3 PROM
        !           103:           does not append the architecture name). The name used is architec-
        !           104:           ture dependent, it simply has to match what the booting client's
        !           105:           PROM wishes to it to be.  If the client's PROM fails to fetch the
        !           106:           expected file, <A HREF="/cgi-bin/manpage?8+tcpdump">tcpdump(8)</A> can be used to discover which filename the
        !           107:           client is trying to read.
        !           108:
        !           109:           If booting an HP 300-series machine, ensure that the network boot
        !           110:           program <I><B>SYS_NBOOT </B></I>(which may be called <I>netboot.lif </I>before installa-
        !           111:           tion) is installed in the directory <I>/usr/mdec/rbootd</I>.
        !           112:
        !           113:      5.   Add myclient to the bootparams database <I>/etc/bootparams</I>:
        !           114:                 myclient  root=server:/export/myclient/root \
        !           115:                           swap=server:/export/myclient/swap
        !           116:           Note that some bootparam servers are somewhat sensitive.  Some re-
        !           117:           quire fully qualified hostnames or partially qualified hostnames
        !           118:           (which can be solved by having both fully and partially qualified
        !           119:           entries). Other servers are case sensitive.
        !           120:
        !           121:      6.   Build the swap file for myclient:
        !           122:                 # mkdir /export/myclient
        !           123:                 # cd /export/myclient
        !           124:                 # dd if=/dev/zero of=swap bs=16k count=1024
        !           125:           This creates a 16 Megabyte swap file.
        !           126:
        !           127:      7.   Populate myclient's <I>/ </I>filesystem on the server.  How this is done
        !           128:           depends on the client architecture and the version of the OpenBSD
        !           129:           distribution.  It can be as simple as copying and modifying the
        !           130:           server's root filesystem, or perhaps you need to get those files out
        !           131:           of the standard binary distribution.
        !           132:
        !           133:      8.   Export the required filesystems in <I>/etc/exports</I>:
        !           134:                 /usr -ro myclient
        !           135:                 # for SunOS:
        !           136:                 # /export/myclient -rw=myclient,root=myclient
        !           137:                 # for OpenBSD:
        !           138:                 /export/myclient -maproot=root -alldirs myclient
        !           139:
        !           140:           If the server and client are of the same architecture, then the
        !           141:           client can share the server's <I>/usr </I>filesystem (as is done above).
        !           142:           If not, you must build a properly fleshed out <I>/usr </I>partition for the
        !           143:           client in some other place.
        !           144:
        !           145:           If your server was a sparc, and your client a sun3, you might create
        !           146:           and fill <I>/export/usr.sun3 </I>and then use the following <I>/etc/exports
        !           147:           </I>lines:
        !           148:                 /export/usr.sun3 -ro myclient
        !           149:                 /export/myclient -rw=myclient,root=myclient
        !           150:
        !           151:      9.   Copy and customize at least the following files in
        !           152:           <I>/export/myclient/root</I>:
        !           153:                 # cd /export/myclient/root/etc
        !           154:                 # cp fstab.nfs fstab
        !           155:                 # cp /etc/hosts hosts
        !           156:                 # echo myclient &gt; myname
        !           157:                 # echo inet 192.197.96.12 &gt; hostname.le0
        !           158:
        !           159:           Note that "le0" above should be replaced with the name of the net-
        !           160:           work interface that the client will use for booting.
        !           161:
        !           162:      10.  Correct the critical mount points in the client's <I>/etc/fstab </I>(which
        !           163:           will be <I>/export/myclient/root/etc/fstab</I>) ie.
        !           164:                 myserver:/export/myclient/root / nfs rw 0 0
        !           165:                 myserver:/usr /usr nfs rw 0 0
        !           166:
        !           167: <B>FILES
        !           168:      </B>/etc/ethers       Ethernet addresses of known clients
        !           169:      /etc/bootparams   client root and swap pathnames
        !           170:      /etc/exports      exported NFS mount points
        !           171:      /etc/rbootd.conf  configuration file for HP Remote Boot Daemon
        !           172:      /tftpboot         location of boot programs loaded by the Sun PROM
        !           173:      /usr/mdec/rbootd  location of boot programs loaded by the HP Boot ROM
        !           174:
        !           175: <B>SEE ALSO
        !           176:      </B><A HREF="/cgi-bin/manpage?8+rarpd">rarpd(8)</A>,  <A HREF="/cgi-bin/manpage?5+ethers">ethers(5)</A>,  <A HREF="/cgi-bin/manpage?8+tftpd">tftpd(8)</A>,  rpc.<A HREF="/cgi-bin/manpage?8+bootparamd">bootparamd(8)</A>,  <A HREF="/cgi-bin/manpage?5+bootparams">bootparams(5)</A>,
        !           177:      <A HREF="/cgi-bin/manpage?8+mountd">mountd(8)</A>,  <A HREF="/cgi-bin/manpage?5+exports">exports(5)</A>,  <A HREF="/cgi-bin/manpage?8+nfsd">nfsd(8)</A>,  <A HREF="/cgi-bin/manpage?8+rbootd">rbootd(8)</A>,  <A HREF="/cgi-bin/manpage?8+reboot">reboot(8)</A>
        !           178:
        !           179: OpenBSD 2.0                     October 2, 1994                              3
        !           180: </PRE>
        !           181: </BODY>