Previous | Next | Table of Contents

Setting up the rbootd server, Diskless NetBSD HOW-TO

HP's proprietary RMP (Remote Maintenance Protocol) was used through HP-UX 9.10 to handle all aspects of diskless clients. One of the parts of RMP is the rbootd protocol, which is used to send the bootloader program to a diskless client when it is powered on.

RMP is not TCP/IP, and therefore cannot be passed on by routers (thus the stipulation that your client and the server(s) must be on the same subnet). It also means that your server must have device drivers that are able to send unspecified data to the ethernet. This is why there is a limited number of operating systems that can be rbootd servers. People have compiled versions of rbootd that use the bpf, pcap, nit, lla, and dlpi device drivers.

Setting up rbootd, NetBSD
Setting up rbootd, OpenBSD
Setting up rbootd, FreeBSD
Setting up rbootd, Mac OS X and Darwin
Setting up rbootd, Linux
Setting up rbootd, SunOS
Setting up rbootd, Solaris
Setting up rbootd, NEWS-OS 4
Setting up rbootd, HP-UX 7
Setting up rbootd, HP-UX 9
The native HP-UX 9 rbootd works, but is time consuming to set up
Setting up rbootd, HP-UX 10
The native HP-UX 10 rbootd does not serve hp300 clients
Setting up rbootd, IRIX (no info available)


NetBSD, OpenBSD, and Mac OS X and Darwin

NetBSD and OpenBSD ship with the rbootd server on all supported platforms. Mac OS X 10.1.x and Darwin 1.4.1 ship with an older version of the rbootd server which doesn't support hppa clients, but should work fine for hp300 clients. Therefore, what is necessary to set up rbootd is pretty simple.

  1. # mkdir -p /usr/mdec/rbootd

  2. cp [releasedir]/NetBSD-[version]/hp300/installation/misc/SYS_UBOOT /usr/mdec/rbootd

  3. # chmod -R a+rX /usr/mdec/rbootd

  4. Create an /etc/rbootd.conf file with the following line:
    #/etc/rbootd.conf
    CC:CC:CC:CC:CC:CC  SYS_UBOOT

  5. # /usr/sbin/rbootd -d [-i <interface>]
    You may need to include the -i option if your rbootd server has more than one ethernet card

This will start rbootd in debugging mode. It will print out all rbootd requests it receives and prints all messages it sends.

If rbootd is working correctly, then your client will present the following selection along with any other bootable systems during the search for bootable systems:

LAN, 21, rbootdserver
   1Z SYS_UBOOT

Here is an example of the rbootd debugging output from NetBSD.
Here is an example of the rbootd debugging output from OpenBSD.

Continue on to setting up rarp


FreeBSD

The FreeBSD rbootd hasn't caught up with a few bug fixes. Otherwise, it is the exact same source code used in the NetBSD rbootd. Either you can get the FreeBSD 2.2.6 or later rbootd source code and recompile rbootd (after removing the patch for currently fixed bugs) or download the NetBSD rbootd source code and compile it (after patching a few things). The procedure is almost identical for both, so only the NetBSD rbootd will be covered (since it works on older versions of FreeBSD).

The NetBSD rbootd source code is available from the NetBSD mirrors in the hp300/installation/misc directory along with SYS_UBOOT.

You may prefer to use YAMAMORI Takenori's sun-rbootd package instead of the built-in rbootd.

  1. Get /pub/NetBSD/arch/hp300/rbootd.tgz from your ftp server and extract it.
    tar -xvzpf rbootd.tgz

  2. cd rbootd

  3. For the NetBSD source, add the following line to utils.c before the line that has #include <time.h>:
    #include <sys/time.h>

  4. If you are running FreeBSD 2.2.6 or later, you will need to remove the workaround in rmpproto.c.

  5. # make

  6. # cp rbootd /usr/local/libexec/

  7. # mkdir -p /usr/mdec/rbootd

  8. cp [releasedir]/NetBSD-[version]/hp300/installation/misc/SYS_UBOOT /usr/mdec/rbootd

  9. # chmod -R a+rX /usr/mdec/rbootd

  10. Create an /etc/rbootd.conf file with the following line:
    #/etc/rbootd.conf
    CC:CC:CC:CC:CC:CC  SYS_UBOOT

  11. # /usr/local/libexec/rbootd -d [-i <interface>]
    You may need to include the -i option if your rbootd server has more than one ethernet card

This will start rbootd in debugging mode. It will print out all rbootd requests it receives and prints all messages it sends.

If rbootd is working correctly, then your client will present the following selection along with any other bootable systems during the search for bootable systems:

LAN, 21, rbootdserver
   1Z SYS_UBOOT

Here is an example of the rbootd debugging output from FreeBSD.
Here is an example of the rbootd debugging output from FreeBSD when the patches are not applied correctly (i.e. the byte-order is wrong).

FreeBSD may get everything fixed in their rbootd at some point, in which case, you can try running that instead of the NetBSD rbootd. You would run it as:
# /usr/libexec/rbootd -d [-i <interface>]

You can currently take the FreeBSD 2.2.6 rbootd source code and remove the patches for FreeBSD (since they're no longer necessary). This will compile and work.

Continue on to setting up rarp


Linux

All of the Linux information is available in more detail at Peter Maydell's Official Linux rbootd Page and Wes Brown's mirror of it.

Alan Bain has made rbootd into a Debian package (it is currently in the "unstable" section of the packages). If you're running Debian, you may consider trying this instead of following the directions below. Once you get it working, you can continue on to setting up rarp.

You may prefer to use YAMAMORI Takenori's sun-rbootd package instead of these other options.

Linux has an add-on package that allows programs to write directly to the ethernet. Some distributions (Debian) ship with this library in place. The latest (as of 8/1/98) Red Hat and Slackware distributions don't.

To check for this library, you should look for libpcap.a in either /usr/lib or /usr/local/lib. If it's there, then you can skip the first two steps.

  1. get libpcap.tar.Z from ftp.ee.lbl.gov.

  2. untar it and run:
    # ./configure
    # make
    # make install
    # make install-incl
    # make install-man

  3. get rbootd.tar.gz from ftp.NetBSD.org, from Peter Maydell's official rbootd site, or from Wes Brown's mirror.

  4. edit pathnames.h to specify a location for SYS_UBOOT. You might consider /usr/mdec/rbootd for consistency with other rbootd implementations. You should, however, use /usr/local/lib/rbootd/ to fit in with the standard Linux package scheme.

  5. # make -f Makefile.linux

    It will give some warnings, but these can be ignored.

    If it fails with an error, you may not have /lib/libc.so.6.X.X. If this is the case, then you will need to edit Makefile.linux and add -lbsd to the following line:

    LFLAGS = -lbsd -lpcap
    Then run make -f Makefile.linux clean;make -f Makefile.linux.

  6. # cp rbootd /usr/local/sbin

  7. # mkdir -p /usr/mdec/rbootd (replacing /usr/mdec/rbootd with the directory name you specified in pathnames.h)

  8. cp [releasedir]/NetBSD-[version]/hp300/installation/misc/SYS_UBOOT /usr/mdec/rbootd (replacing /usr/mdec/rbootd with the directory name you specified in pathnames.h)

  9. # chmod -R a+rX /usr/mdec/rbootd

  10. Create an /etc/rbootd.conf file with the following line:
    #/etc/rbootd.conf
    CC:CC:CC:CC:CC:CC  SYS_UBOOT

  11. # /usr/local/sbin/rbootd -d [-i <interface>]
    You may need to include the -i option if your rbootd server has more than one ethernet card

This will start rbootd in debugging mode. It will print out all rbootd requests it receives and prints all messages it sends.

If rbootd is working correctly, then your client will present the following selection along with any other bootable systems during the search for bootable systems:

LAN, 21, rbootdserver
   1Z SYS_UBOOT

Here is an example of the rbootd debugging output from Linux.

Continue on to setting up rarp


SunOS, Solaris, HP-UX 7, 9, and 10, and NEWS-OS

YAMAMORI Takenori has written a SunOS-style rbootd server (i.e. in the manner that Sun machines are configured to run diskless). This rbootd server works under the following operating systems: The directions are the same for all platforms. His site is available in Japanese or in English.

This is still a work-in-progress, which is why you should download the latest version directly from his site. If you find that it doesn't work for your platform/architecture, be sure to send him an email detailing what went wrong.

  1. Download and unextract a copy of sun-rbootd-1.3.2.tar.gz (or the most recent version) from YAMAMORI's site: English or Japanese

  2. # make

  3. # cp sun-rbootd /usr/local/sbin

  4. # /usr/bin/mkdir -p -m 755 /tftpboot

  5. cp [releasedir]/NetBSD-[version]/installation/misc/SYS_UBOOT /tftpboot

  6. # chmod -R a+rX /tftpboot

  7. Create an /etc/ethers file, listing your client:
    #/etc/ethers
    CC:CC:CC:CC:CC:CC     client

  8. If you're on an NIS network, you will need to add the contents of that /etc/ethers file to the /etc/ethers on the NIS server and perform an NIS make.

  9. Add your client to the /etc/hosts file:
    192.168.1.10 client

  10. Figure out your client's IP address in hexadecimal (it is an eight-digit hexidecimal number), for example: 192.168.1.10 maps to C0A8010A

  11. # cd /tftpboot

  12. # ln -s SYS_UBOOT C0A8010A
    This is how rbootd can figure out which bootblocks to send to your client, using the /etc/ethers file

  13. If you're running HP-UX, you should make sure the native rbootd is not running. This will interfere with the sun-rbootd.
    # ps -ef | grep rbootd
    # kill pid

  14. /usr/local/sbin/sun-rbootd -d [-a|-i <interface>]
    You may need to include the -i option if your rbootd server has more than one ethernet card, otherwise, use -a.

This will start sun-rbootd in debugging mode. It will print out all rbootd requests it receives and prints all messages it sends. When sun-rbootd is in debugging mode, it will look in the current directory for the bootable files, not in /tftpboot (thus the requirement to cd to /tftpboot before running).

If you are running HP-UX and rbootd fails with one of the following error messages, then you must kill the native rbootd process:
HP-UX 9 (and earlier)

HPEXT_DXSAP: Device busy
HPEXT_SXSAP: Invalid argument
read: Destination address required
read -1
HP-UX 10 (and later)
dlpi: DL_BIND_REQ is nacked.
dlpi: unix_errno 16
If rbootd is working correctly, then your client will present the following selection along with any other bootable systems during the search for bootable systems:
LAN, 21, rbootdserver
   1Z C0A8010A

Here is an example of the rbootd debugging output from sun-rbootd.

Continue on to setting up rarp


HP-UX 7

Alas, HP-UX 7 and earlier dealt with diskless clients in a somewhat bizarre fashion. They used RMP for networking between client and server, and used something called Context Dependent Files to distinguish important files between machines. Don't ask. Bottom line is that it's a lot of work to set this up, unless you already have a cluster configured on your server.

It is highly probable that YAMAMORI Takenori's sun-rbootd package will compile under HP-UX 7. This will be much less painful than the process outlined below.

If your machine is already set up in a clustered configuration (server or client), then the procedure below still applies, but it will take much less time (and fewer reboots).

SAM will create a lot of context dependent files (10 MB worth) that it is unable to clean up. You'll need at least 10 MB disk space, and it will rebuild the kernel a few times and reboot several more.

By following this procedure you will make your HP-UX machine into a cluster server, meaning you'll be able to boot any HP Series 300/400 workstation into HP-UX disklessly. The last steps modify your server's setup so that the clients will boot to NetBSD instead.

If you choose to not heed this warning, here's how you do it in HP-UX 7:

  1. Shut down to single-user mode by running:
    # /etc/shutdown now

  2. # /usr/bin/sam
    If you're running X, be sure to run sam from within an hpterm, instead of an xterm

  3. Pick Kernel Configuration and use /hp-ux as the kernel to modify.

  4. Pick Add/Remove Subsystems
    Add DSKLESS/9000 (type y, and then hit Perform Task),
    Add NFS/9000 (type y, and then hit Perform Task),
    Add NS/9000 (type y, and then hit Perform Task),
    Hit Exit Task,
    Pick Generate a New Kernel which will then generate a new kernel and reboot

  5. After it's done rebooting, shut down to single-user mode by running:
    # /etc/shutdown now

  6. # usr/bin/sam If you're running X, be sure to run sam from within an hpterm, instead of an xterm

  7. Pick Cluster Configuration, then pick:
    Create an HP-UX Cluster, and fill in:
    The server's name (rbootdserver)
    The server's IP address (192.168.1.5)
    The server's ethernet address (without colons) (SSSSSSSSSSSS)
    Type s300 into the Machine field

  8. Click on Add, then hit OK. Here, sam warns you that it's unable to clean up the mess it's going to create.

  9. Wait.
    It took about half an hour on a fast Series 400 machine.

  10. It'll want to reboot again.

  11. # /usr/bin/sam
    again

  12. Pick Cluster Configuration, then pick:
    Add Cluster Clients, and fill in:
    The client's name (client)
    The client's IP address (192.168.1.10)
    The client's ethernet address (without colons) (CCCCCCCCCCCC)
    Type s300 into the Machine field

  13. Click on Perform Task, then wait.

  14. You should end up with an /etc/clusterconf file that looks somewhat like this:
    #/etc/clusterconf
    SSSSSSSSSSSS: # clustercast address -- DO NOT REMOVE THIS LINE
    SSSSSSSSSSSS:1:rbootdserver:r:1:4
    CCCCCCCCCCCC:2:client:c:1:1

  15. Edit /etc/boottab and comment out (#) all the lines, then add:
    cluster:HPS300::SYS_UBOOT:/SYS_UBOOT

  16. # ps -ef | grep rbootd
    kill the process for rbootd

  17. # /etc/rbootd -l 3-L /tmp/rbootd.log
    This runs rbootd with the highest level of logging and writes debugging information to /tmp/rbootd.log

A word of warning: HP-UX and NetBSD won't coexist when rbootd is used from a HP-UX server. There is no way to specify which bootloader is the default to the clients on a machine-by-machine basis. The default is either HP-UX or NetBSD. You can intervene during boot and specify the other if you list other bootloaders on the cluster:HPS300 line in /etc/boottab.

For example, to have NetBSD be default and allow for HP-UX, your /etc/boottab file should look like:

#/etc/boottab
cluster:HPS300::SYS_UBOOT,SYSHPUX,SYSDEBUG,SYSBCKUP,SYSTEST:/SYS_UBOOT,/hp-ux,/SYSDEBUG,/SYSBCKUP,/SYSTEST
Also note, you can have only one line uncommented in /etc/boottab that has HPS300 in the second column.

If rbootd is working correctly, then your client will present the following selection along with any other bootable systems during the search for bootable systems:

LAN, 21, rbootdserver
   1Z SYS_UBOOT

Continue on to setting up rarp


HP-UX 9

Alas, HP-UX 9 and earlier dealt with diskless clients in a somewhat bizarre fashion. They used RMP for networking between client and server, and used something called Context Dependent Files to distinguish important files between machines. Don't ask. Bottom line is that it's a lot of work to set this up, unless you already have a cluster configured on your server.

You may prefer to use YAMAMORI Takenori's sun-rbootd package instead of the built-in rbootd. The procedure is much less time-consuming and difficult than the one outlined below.

If your machine is already set up in a clustered configuration (server or client), then the procedure below still applies, but it will take much less time (and fewer reboots).

SAM will create a bunch of context dependent files (about 10 MB worth), which it is not able to clean up. You'll need at least 10 MB disk space, and it will rebuild the kernel a few times and reboot several more.

By following this procedure you will make your HP-UX machine into a cluster server, meaning you'll be able to boot any HP Series 300/400 workstation into HP-UX disklessly. The last steps modify your server's setup so that the clients will boot to NetBSD instead.

If you choose to not heed this warning, here's how you do it in HP-UX 9.X:

  1. Shut down to single-user mode by running:
    # /etc/shutdown now

  2. # /usr/bin/sam
    Open Cluster Configuration

  3. If your system is currently standalone, it'll ask:
    Would you like to create a cluster server?
    Hit yes.

  4. Open Actions/Add Cluster Clients. Fill in:
    The client's name (client)
    Click on 300/400
    The client's IP address (192.168.1.10)
    The client's ethernet address (without colons) (CCCCCCCCCCCC)

  5. Click on Add, then hit OK. Here, sam warns you that it's unable to clean up the mess it's going to create.

  6. Wait. It took about half an hour on a fast Series 400 machine.
    While you're waiting, take a look at the cluster.log file that sam created on my machine.

  7. It'll want to reboot with your new kernel (with diskless drivers, and in clustered mode).

  8. cp [releasedir]/NetBSD-[version]/installation/misc/SYS_UBOOT /usr/boot

  9. Your /etc/clusterconf should look something like this:
    #/etc/clusterconf
    SSSSSSSSSSSS: # clustercast address -- DO NOT REMOVE THIS LINE
    SSSSSSSSSSSS:1:rbootdserver:r:1:4
    CCCCCCCCCCCC:2:client:c:1:1

  10. Edit /etc/boottab and comment (#) out all the lines with HPS300 in the second column. Then add the following line:
    cluster:HPS300::SYS_UBOOT:/SYS_UBOOT

  11. # ps -ef | grep rbootd
    kill the process for rbootd

  12. # /etc/rbootd -l 3 -L /tmp/rbootd.log
    This runs rbootd with the highest level of logging and writes debugging information to /tmp/rbootd.log.

A word of warning: HP-UX and NetBSD won't coexist when rbootd is used from a HP-UX server. There is no way to specify which bootloader is the default on a machine-by-machine basis. The default is either HP-UX or NetBSD. You can intervene during boot and specify the other if you list other bootloaders on the cluster:HPS300 line in /etc/boottab.

For example, to have NetBSD be default and allow for HP-UX, your /etc/boottab file should look like:

#/etc/boottab
cluster:HPS300::SYS_UBOOT,SYSHPUX,SYSDEBUG,SYSBCKUP,SYSTEST:/SYS_UBOOT,/hp-ux,/SYSDEBUG,/SYSBCKUP,/SYSTEST
Also note, you can have only one line uncommented in /etc/boottab that has HPS300 in the second column.

Here is an example of the rbootd debugging output from HP-UX 9.0.

If rbootd is working correctly, then your client will present the following selection along with any other bootable systems during the search for bootable systems:

LAN, 21, rbootdserver
   1Z SYS_UBOOT

Continue on to setting up rarp


HP-UX 10

HP decided to not support diskless Series 300/400 workstations in the 10.0 and later releases of HP-UX. In other words, they only support netbooting of pa-risc workstations. I attempted to figure out how to work around this, but didn't get very far. Maybe someone else could figure out the rest? Please let us know if you do.

Chances are it's not possible. Apparently, HP-UX 10 encapsulates bootp requests inside their rbootd packets now.

These are the files that I had configured in my failed attempts:

You run /sbin/init.d/rbootd start.

I had placed SYS_UBOOT in various places in the hopes it would be found (such as /tmp, /home/tftpdir, and /usr/boot.

Here is the output from tcpdump when attempting to rboot off an HP-UX 10 machine:

00:00:41.623180 client < 9:0:9:0:0:4 sap f8 ui/C len=43
                         0000 0006 0806 0901 0000 0000 00ff ff00
                         0248 5053 3330 3020 2020 2020 2020 2020
                         2020 2020 2000 00ee ee11 11
00:00:41.627400 RBOOTDSERVER.TEST.NET.bootps < 255.255.255.255.bootpc: 
xid:0x220 Y:client.test.net S:RBOOTDSERVER.TEST.NET [|bootp] (ttl 64, id 52777)

This is the output from /usr/sbin/rbootd -l 3 /dev/lan0:

Sun Jul 19 01:03:21 1998 : STARTUP
Sun Jul 19 01:03:21 1998 : device is lan0
Sun Jul 19 01:03:21 1998 : opening device 0: /dev/lan0 (BOOTPFWD)
Sun Jul 19 01:03:21 1998 : INITIALIZATION COMPLETE

HP-UX 9 rbootd under HP-UX 10

I also tried using HP-UX 9's rbootd under HP-UX 10. For the sake of argument, let's say a HP-UX 9 filesystem is mounted under /tmp_mnt/hpux9. Here's what happened:

  1. # mkdir -p /usr/local/sbin/

  2. # cp /tmp_mnt/hpux9/etc/rbootd /usr/local/sbin/rbootd

  3. # cp -Rp /tmp_mnt/hpux9/lib /
    HP-UX 9 needs its shared libraries.

  4. # mkdir -p /usr/adm
    HP-UX 9 rbootd expects to write its log file to /usr/adm/rbootd.log

  5. # /usr/local/sbin/rbootd -l 3 /dev/lan0

The logfile (/usr/adm/rbootd.log) says:
Rejected boot request from 0xCCCCCCCCCCCC

Note, that sun-rbootd compiles and works for HP-UX 10. You can follow those directions to set up your HP-UX 10 machine as a rbootd server.

Back to the top


IRIX

Apparently, there's an rbootd server available for IRIX. I have no further information on this. Please let us know if you can tell me how to set it up!

Back to the top


Previous | Next | Table of Contents
NetBSD Home Page
NetBSD Documentation top level

(Contact us) $NetBSD: index.html,v 1.4 2015/10/09 10:13:44 jnemeth Exp $
Copyright © 1998-2003 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.