<?xml version="1.0"?>
<!DOCTYPE webpage
  PUBLIC "-//NetBSD//DTD Website-based NetBSD Extension//EN"
    "http://www.NetBSD.org/XML/htdocs/lang/share/xml/website-netbsd.dtd">

<webpage id="docs-network-netboot-bootparams">
<config param="desc" value="Setting up bootparamd" />
<config param="cvstag" value="$NetBSD: bootparams.xml,v 1.1 2007/06/09 11:33:59 dsieger Exp $" />
<config param="rcsdate" value="$Date: 2007/06/09 11:33:59 $" />

<head>
<!-- Copyright (c) 1998-2005
	The NetBSD Foundation, Inc.  ALL RIGHTS RESERVED. -->
<title>Setting up the rpc.bootparamd server, Diskless NetBSD HOW-TO</title>
</head>


<!--
<a href="rarp.html">Previous</a> |
<a href="nfs.html">Next (nfs)</a> | 
<a href="tftpd.html">Next (tftpd)</a> |
<a href="./">Table of Contents</a>
-->

<sect1 id="">
<para>
The <systemitem>rpc.bootparamd</systemitem> is used to convey some
information to 
diskless clients.  NetBSD only uses information regarding the root NFS
directory.  Most platforms no longer require bootparams, as they now use 
<systemitem>DHCP</systemitem> to acquire most of their netboot information.
In particular, sparc and sparc64 systems can skip ahead to setting up 
<ulink url="tftpd.html"><systemitem>tftpd</systemitem></ulink>
</para>

<para>
Before starting, it's worth mentioning that sometimes the
<systemitem>bootparamd</systemitem> daemon decides not to respond to
<systemitem>whoami</systemitem> requests.
I've seen this happen
with NetBSD, Linux, and Solaris.  Sometimes it takes several tries!  This
gives the same error message as if <systemitem>bootparamd</systemitem>
is not running.  If, after several tries, you still can't get it to work,
try compiling a different <systemitem>bootparamd</systemitem> server (or
if none is available for your server platform, try a different server OS).
</para>

<para>
Also, some systems (particularly Sun 3 ones) ask for a gateway
entry from <systemitem>bootparamd</systemitem>, and will not boot without
one. You can add a gateway entry to your bootparams by changing the line
in the examples below from
<screen>
client root=nfsserver:/export/client/root
</screen>
to
<screen>
client root=nfsserver:/export/client/root gateway=gateway:0xffffff00
</screen>

replacing <systemitem>gateway</systemitem> with the IP address of the
gateway or router on your network, and <systemitem>0xffffff00</systemitem>
with your netmask.
</para>

<para>
The following links provide more detailed information about setting up
bootparams on different operating systems:
<itemizedlist>
  <listitem><ulink url="#netbsd">NetBSD</ulink>
  </listitem>
  <listitem><ulink url="#openbsd">OpenBSD</ulink>
  </listitem>
  <listitem><ulink url="#freebsd">FreeBSD</ulink>
  </listitem>
  <listitem><ulink url="#macosx">Mac OS X and Darwin</ulink>
  </listitem>
  <listitem><ulink url="#linux">Linux</ulink>
  </listitem>
  <listitem><ulink url="#sunos">SunOS</ulink>
  </listitem>
  <listitem>
    <ulink url="#solaris">Solaris</ulink> (doesn't respond to
    <systemitem>whoami</systemitem>)
  </listitem>
  <listitem><ulink url="#news">NEWS-OS</ulink>
  </listitem>
  <listitem>
    <ulink url="#next">NEXTSTEP</ulink> (needs confirmation and clarification)
  </listitem>
  <listitem>
    <ulink url="#hpux">HP-UX</ulink> doesn't have
    <systemitem>bootparams</systemitem>
  </listitem>
</itemizedlist>
</para>

</sect1>

<sect2 id="netbsd-openbsd">
<title>
<anchor id="netbsd" />NetBSD and
<anchor id="openbsd" />OpenBSD
</title>

<orderedlist>
  <listitem>
    <para>
    Create the <filename>/etc/bootparams</filename> file:
    <screen>
# cat /etc/bootparams
client root=nfsserver:/export/client/root
    </screen>
    </para>
  </listitem>

  <listitem>
    <para>
    Start the <systemitem>bootparamd</systemitem> daemon:
    <screen>
# /usr/sbin/rpc.bootparamd -d
    </screen>
    </para>
  </listitem>
</orderedlist>

<para>
This runs the <systemitem>bootparamd</systemitem> server in debugging
mode.  When the <systemitem>bootparamd</systemitem>
server gets a request, it will print the following messages:
<screen>
rpc.bootparamd: whoami got question for 192.168.1.10
rpc.bootparamd: This is host client.test.net
rpc.bootparamd: Returning client       127.0.0.1
rpc.bootparamd: getfile got question for "client" and file "root"
rpc.bootparamd: returning server:nfsserver path:/export/client/root address: 192.168.1.5
</screen>
</para>

<para>
If the requests fail, the client will print:

<screen>
bootparamd: `whoami' call failed
le(0,0,0,0): Unknown error: code 60
boot: Unknown error: code 60
</screen>

If the bootparams requests succeed, the client will print:

<screen>
boot: client name: client.test.net
root addr=192.168.1.5 path=/export/client/root
</screen>

Continue on to setting up <ulink url="nfs.html">nfs</ulink>
or <ulink url="tftpd.html">tftpd</ulink>
</para>
</sect2>

<sect2 id="freebsd">
<title>FreeBSD</title>

<orderedlist>
  <listitem>
    <para>
      Create the <filename>/etc/bootparams</filename> file:
	<screen>
# cat /etc/bootparams
client root=nfsserver:/export/client/root
	</screen>
    </para>
  </listitem>

  <listitem>
    <para>
    Start the <systemitem>bootparamd</systemitem> daemon:
      <screen>
# /usr/sbin/bootparamd -d
      </screen>
    </para>
  </listitem>

</orderedlist>

<para>
This runs the <systemitem>bootparamd</systemitem> server in debugging mode.
When the <systemitem>bootparamd</systemitem> server gets a request, it will
print the following messages:
<screen>
whoami got question for 192.168.1.10
bootparamd: this is host client.test.net
Returning client       192.168.1.5
bootparamd: getfile got question for "client" and file "root"
returning server:nfsserver path:/export/client/root address: 192.168.1.5
</screen>
</para>

<para>
If the bootparams requests fail, the client will print:

<screen>
bootparamd: `whoami' call failed
le(0,0,0,0): Unknown error: code 60
boot: Unknown error: code 60
</screen>
</para>

<para>
If the bootparams requests succeed, the client will print:

<screen>
boot: client name: client.test.net
root addr=192.168.1.5 path=/export/client/root
</screen>
</para>

<para>
Continue on to setting up <ulink url="nfs.html">nfs</ulink>
or <ulink url="tftpd.html">tftpd</ulink>
</para>
</sect2>

<sect2 id="macosx">
<title>Mac OS X and Darwin</title>

<orderedlist>
  <listitem>
    <para>
      Add your client to the NetInfo database:
        <screen>
# nicl . -create /machines/client bootparams root=nfsserver:/export/client/root
        </screen>
    </para>
  </listitem>

  <listitem>
    <para>
    Start the <systemitem>bootparamd</systemitem> daemon:
      <screen>
# /usr/sbin/bootparamd -d
      </screen>
    </para>
  </listitem>
</orderedlist>

<para>
This runs the <systemitem>bootparamd</systemitem> server in debugging mode.
When the <systemitem>bootparamd</systemitem> server gets a request, it will
print the following messages:

<screen>
rpc.bootparamd: whoami got question for 192.168.1.10
rpc.bootparamd: This is host client.test.net
rpc.bootparamd: Returning client       127.0.0.1
rpc.bootparamd: getfile got question for "client" and file "root"
rpc.bootparamd: returning server:nfsserver path:/export/client/root address: 192.168.1.5
</screen>
</para>

<para>
If the bootparams requests fail, the client will print:

<screen>
bootparamd: `whoami' call failed
le(0,0,0,0): Unknown error: code 60
boot: Unknown error: code 60
</screen>
</para>

<para>
If the bootparams requests succeed, the client will print:

<screen>
boot: client name: client.test.net
root addr=192.168.1.5 path=/export/client/root
</screen>
</para>

<para>
Continue on to setting up <ulink url="nfs.html">nfs</ulink>
or <ulink url="tftpd.html">tftpd</ulink>
</para>
</sect2>

<sect2 id="linux">
<title>Linux</title>

<para>
The bootparam daemon should come with all recent distributions as of
this writing (2001-03-01). If you
don't have <filename>/usr/sbin/rpc.bootparamd</filename> then you'll have
to download the newest netkit-bootparamd sources from
<ulink url="ftp://ftp.uk.linux.org/pub/linux/Networking/netkit/">
ftp://ftp.uk.linux.org/pub/linux/Networking/netkit</ulink>.
</para>

<orderedlist>
  <listitem>
    <para>
    If needed, extract and compile the daemon. See the
    <filename>README</filename> for details, but the following should
    <quote>just work</quote>:

      <screen>
# ./configure; make; make install
      </screen>
    </para>
  </listitem>

  <listitem>
    <para>
    Create the <filename>/etc/bootparams</filename> file:
      <screen>
# cat /etc/bootparams
client root=nfsserver:/export/client/root
      </screen>
    </para>
  </listitem>

  <listitem>
    <para>
    Start the <systemitem>bootparamd</systemitem> daemon:
      <screen>
# /usr/[local/]sbin/rpc.bootparamd -d
      </screen>
    </para>
  </listitem>
</orderedlist>

<para>
This runs the <systemitem>bootparamd</systemitem> server in debugging mode.
When the <systemitem>bootparamd</systemitem> server gets a request, it will
print the following messages:

<screen>
whoami got question for 192.168.1.10
This is host client.test.net
Returning client   (none)    127.0.0.1
getfile got question for "client" and file "root"
returning server:nfsserver path:/export/client/root address: 192.168.1.5
</screen>
</para>

<para>
If the bootparams requests fail, the client will print:

<screen>
bootparamd: `whoami' call failed
le(0,0,0,0): Unknown error: code 60
boot: Unknown error: code 60
</screen>
</para>

<para>
There have been several reports of problems with the
<systemitem>bootparamd</systemitem> that ships with some distributions of
linux. If you run into this, try compiling the NetKit
<systemitem>bootparamd</systemitem> from source and check that your
<systemitem>rarpd</systemitem> is working.
Debian/woody with kernels 2.4.x, rarpd-0.981107 and
netkit-bootparamd-0.17 are reported to work without problems.
</para>

<para>
If the bootparams requests succeed, the client will print:

<screen>
boot: client name: client.test.net
root addr=192.168.1.5 path=/export/client/root
</screen>
</para>

<para>
Continue on to setting up <ulink url="nfs.html">nfs</ulink>
or <ulink url="tftpd.html">tftpd</ulink>
</para>

</sect2>

<sect2 id="sunos">
<title>SunOS</title>

<para>
If your SunOS box is already set up as an NFS server and if the
directory <filename>/tftpboot</filename> exists, then the
<systemitem>bootparamd</systemitem> server will already be running.
</para>

<orderedlist>
  <listitem>
    <para>
    Create the <filename>/etc/bootparams</filename> file:
      <screen>
# cat /etc/bootparams
client root=nfsserver:/export/client/root
      </screen>
    </para>
  </listitem>

  <listitem>
    <para>
      Look for the <systemitem>bootparamd</systemitem> daemon in the
      process list:
      <screen>
# ps aux | grep bootparam
      </screen>
    </para>

    <para>
    If it's not already running, then you need to:
      <screen>
# /usr/etc/rpc.bootparamd -d
      </screen>
    </para>
  </listitem>
</orderedlist>

<para>
This runs the bootparamd server in debugging mode.
If the bootparams requests fail, the client will print:

<screen>
bootparamd: `whoami' call failed
le(0,0,0,0): Unknown error: code 60
boot: Unknown error: code 60
</screen>
</para>

<para>
If the bootparams requests succeed, the client will print:

<screen>
boot: client name: client.test.net
root addr=192.168.1.5 path=/export/client/root
</screen>
</para>

<para>
Continue on to setting up <ulink url="nfs.html">nfs</ulink>
or <ulink url="tftpd.html">tftpd</ulink>
</para>

</sect2>

<sect2 id="solaris">
<title>Solaris</title>

<para>
If your Solaris box is already set up as an NFS server and if the
directory <filename>/tftpboot</filename> exists, then the
<systemitem>bootparamd</systemitem> server will already be running.
</para>

<orderedlist>
  <listitem>
    <para>
     Create the <filename>/etc/bootparams</filename> file:
      <screen>
# cat /etc/bootparams
client root=nfsserver:/export/client/root
      </screen>
    </para>
  </listitem>

  <listitem>
    <para>
      Look for the <systemitem>bootparamd</systemitem> daemon in the
      process list:
      <screen>
# /usr/bin/ps -ef | grep bootparam
      </screen>
    </para>

    <para>
    If it's already running, then you need to <command>kill -HUP</command>
    that process, otherwise, you'll need to:
      <screen>
# /usr/sbin/rpc.bootparamd -d
      </screen>
    </para>
  </listitem>
</orderedlist>

<para>
This runs the <systemitem>bootparamd</systemitem> server in debugging mode.
It doesn't even notice that the client has sent a bootparams request.
</para>

<para>
If the bootparams requests fail, the client will print:

<screen>
bootparamd: `whoami' call failed
le(0,0,0,0): Unknown error: code 60
boot: Unknown error: code 60
</screen>
</para>

<para>
If the bootparams requests succeed, the client will print:
<screen>
boot: client name: client.test.net
root addr=192.168.1.5 path=/export/client/root
</screen>
</para>

<para>
Continue on to setting up <ulink url="nfs.html">nfs</ulink>
or <ulink url="tftpd.html">tftpd</ulink>
</para>

</sect2>

<sect2 id="news">
<title>NEWS-OS</title>

<orderedlist>
  <listitem>
    <para>
    Create the <filename>/etc/bootparams</filename> file:
      <screen>
# cat /etc/bootparams
client root=nfsserver:/export/client/root
      </screen>
    </para>
  </listitem>

  <listitem>
    <para>
    Start the <systemitem>bootparamd</systemitem> daemon:
      <screen>
# /usr/etc/rpc.bootparamd -d
      </screen>
    </para>
  </listitem>
</orderedlist>

<para>
If the bootparams requests fail, the client will print:

<screen>
bootparamd: `whoami' call failed
le(0,0,0,0): Unknown error: code 60
boot: Unknown error: code 60
</screen>
</para>

<para>
If the bootparams requests succeed, the client will print:

<screen>
boot: client name: client.test.net
root addr=192.168.1.5 path=/export/client/root
</screen>
</para>

<para>
Continue on to setting up <ulink url="nfs.html">nfs</ulink>
or <ulink url="tftpd.html">tftpd</ulink>
</para>

</sect2>

<sect2 id="next">
<title>NEXTSTEP</title>

<para>
This information has been updated recently. If you try this, please
report success or failure so this page can be updated. 
<ulink url="http://www.NetBSD.org/cgi-bin/feedback.cgi">(contact
us)</ulink>
</para>

<orderedlist>
  <listitem>
    <para>
    Create the <filename>/etc/bootparams</filename> file:

      <screen>
# cat /etc/bootparams
client root=nfsserver:/export/client/root
      </screen>
    </para>
  </listitem>

  <listitem>
    <para>
    Use the <command>nidump</command> utility to load the
    <filename>/etc/bootparams</filename> data into the netinfo database.
    <command>nidump</command> can also be used to export from
    netinfo to <filename>/etc/bootparams</filename>.
    </para>
  </listitem>

  <listitem>
    <para>
      Look for the <systemitem>bootparamd</systemitem> daemon in the
      process list:
      <screen>
# ps -aux | grep bootparamd
      </screen>
    </para>

    <para>
    If it's running, <command>kill -HUP</command> that process to force it
    to reread <filename>/etc/bootparams</filename>.
    </para>

    <para>
    If it's not running, then you need to run it:
      <screen>
# /usr/etc/rpc.bootparamd -d
      </screen>
    </para>
  </listitem>
</orderedlist>

<para>
If the bootparams requests fail, the client will print:

<screen>
bootparamd: `whoami' call failed
le(0,0,0,0): Unknown error: code 60
boot: Unknown error: code 60
</screen>
</para>

<para>
If the bootparams requests succeed, the client will print:

<screen>
boot: client name: client.test.net
root addr=192.168.1.5 path=/export/client/root
</screen>
</para>


<para>
Back to the <ulink url="bootparams.html">top</ulink>
</para>

</sect2>


<sect2 id="hpux">
<title>HP-UX</title>

<para>
Sorry, HP-UX does not ship with the <systemitem>bootparamd</systemitem>
daemon.  It might be possible to find source code and compile the daemon,
but I couldn't find it.
</para>

<para>
If you know more about this, please let us know.
</para>


<para>
Back to the <ulink url="bootparams.html">top</ulink>
</para>

</sect2>

</webpage>

