Boot Set-up for
iX86 SPIN.


SPIN is setup to boot over a network utilizing a few different network protocols. At the UW we have certain machines that are dedicated to booting and running SPIN. These machines are referred to as crashboxes. The setup and configuration of all the services listed here, including the crashboxes, is described in greater detail later in this document.
Required Services
BOOTP This is used to provide the crashbox with the IP address of the bootp server as well as its own IP address.
HTTP By default this is the method used to fetch the initial script file during kernel booting. If you don't wish to use http for some reason, be sure you set your build variables accordingly.
NFS You must have an nfs server running on the machine where your SPIN tree resides. Most (or all if you don't use http) of the extensions are fetched via this protocol.
RCONSOLE This is a tool that facilitates remote connections between machines. To run this you will have to have the rconsole server running on a machine that has a serial line connection to your crashbox.

It is possible to set all of this up using just two machines. One machine serves as the crashbox and the other provides all of the other services. This second machine can be the same Linux machine where you build your SPIN kernel.

Setting Up a Crash Box

The device driver layer, called sal, in the iX86 version of SPIN is taken from the FreeBSD operating system. In order to load and boot your SPIN kernel, you need to have a FreeBSD file system in place. At the UW we achieve this by installing FreeBSD on the machines where we boot SPIN. In addition to FreeBSD, your machine also needs a DOS partition where we install This set up procedure explains how to partition and format your hard disk as well as install and FreeBSD, and is intended for a machine that will predominantly be used for booting and running the SPIN kernel.

It is possible to use a machine on which you already have FreeBSD installed provided there is an existing DOS Partition as well. If this is the case for you, you can take a look a our FAQ: What if I already have FreeBSD?.

Before You Begin

You will need two boot diskettes; one for and one for FreeBSD. You can get the FreeBSD boot diskette (boot.flp) by following their installation instructions.

Get the (1.5MB) dos.salboot boot image here. Once you have the dos.salboot image you can place it on a diskette using dd.

Insert a diskette into your machine.
# dd if=dos.salboot of=disk device bs=512k
Here disk device is the /dev entry for the floppy drive, probably /dev/fd0.

Once you have these two boot diskettes you are ready to set-up your "crashbox".

Create a DOS Partition

At this point you should already have your two boot diskettes - dos.salboot and boot.flp. Now boot your pc with the dos.salboot diskette.

Create a 1MB DOS partition for using fdisk.


Select 3 "Delete Partition or Logical DOS Drive" and delete ALL partitions.

Select 1 "Create Primary DOS Partition". Type "N" then "1" to create a small DOS partition (this is actually rounded up to 8MB). Return to the root menu.

Select 2 "Set Active Partition" then type "1" to activate partition 1. Return to the root menu.

Select 4 "Display Partition Information" this looks something like:

	Partition   Status   Type      VolumeLabel   Mbytes   System   Usage
	c:1         A        PRI DOS                 8	      UNKNOWN  0%

Exit fdisk. When asked to insert DOS system diskette, just press any key to continue.

At this point DOS may tell you: Invalid media type reading device drive c.
Abort, Retry, Fail? You can just abort.

Next you want to format your c: drive and run install.bat to install all the files for

A:format c:

Now remove the dos.salboot diskette and reboot your machine. You should see "c:\". Now you have a formatted 8MB partition with installed. The next step is to install FreeBSD.

Installing FreeBSD

These instructions will walk you through a "minimal install" of FreeBSD. If you are interested in any other type of installation you may want to take a look at the real instructions.

Insert your boot.flp diskette and reboot the machine.

At the "Kernel Configuration Menu" select "Skip kernel configuration and continue with installation".

At the main menu, select 7 "Custom".

At the "Choose Custom Installation Options" menu, select 2 "Partition".

You should see something like this:

Disk name: sd0
Disk Geometry: .....

Offset     Size     End       Name     Ptype    Desc   Subtype   Flags
    0          63       62       -        6   unused     0
   63       16002   160064   sd0s1        2   fat        1
16065     4181340  4197404       -        6   unused     0
*Some of these values will be different for you depending on your available disc space.

The last partition should be selected. Type "C" (C-Create) to create a slice then hit return twice. This will allocate all the remaining disk space for FreeBSD.

Quit the partition editor.

At the "Install boot manager" screen, select "None: Leave the Master Boot Record Untouched".
(Use the spacebar to select, then return.)

At the "Choose Custom Installation Options" menu, select 3 "Label".

Disk:  sd0	Partition Name: sd0s2	Free:  4176900  blocks 

Part	Mount	Size	Newfs
----	-----	----	-----
sd0s1	none	7MB	DOS

Type "C" (C-Create). Specify "1024M", "FS A file system", and "/" as the mount point. Type "C" again. Hit return this will select all remaining space, then select "SWAP A Swap Partition".

Part	Mount	Size 	Newfs
----	-----	----	-----
sd0s1	none	7MB	DOS
sd0s2a	/	1024MB	UFS Y
sd0s2b	swap	1015MB	SWAP

Quit from the DiskLabel Editor.

At the "Choose Custom Installation Options" menu, select 4 "Distributions".

At the "Choose Distributions" menu, select 6 "Minimal".
(Use the spacebar to select, then return)

At the "Choose Custom Installation Options" menu, select 5 "Media".

At the "Choose Installation Media" menu, you can take your pick. If you have a CD-ROM, this will be much faster than installing via ftp. If you are going to install via ftp you will need to provide IP address, gateway, and DNS information.

At the "Choose Custom Installation Options" menu, select 6 "Commit"
(Use the spacebar to select, then return)

After the installation is complete, you will be back at the "Choose Custom Install Options" menu. Just choose "Exit" and then "Exit Install". At this point your machine will reboot. In order to be sure that the install was successful, press the "F2" key at the prompt to boot FreeBSD.

Once you reboot your machine, press the "F1" key at the prompt to run This machine is now set up as a "crashbox".

Setting Up an NFS Server

You will need to set up your development (Linux) machine to work as an NFS server. RedHat provides a nice guide for doing this. You want to be able to mount your SPIN build directory over the network so that the SPIN kernel can be booted on a remote machine. Here is a condensed version of the necessary steps for setting up the NFS server on your development box:

  • Start portmap or rpc.portmap. You will find this in /usr/sbin/.
#/usr/sbin/portmap (/usr/sbin/rpc.portmap)
  • Edit /etc/exports so that you export the top level directory of where your spin directory is located; this is the same as MOUNT_POINT in the make.conf file you edited earlier. Using the earlier example of /home/myspin, add this line to the /etc/exports file:
(Here loom16 is the crashmachine and /home is made available to loom16.)
  • Start mountd or rpc.mountd AND nfsd or rpc.nfsd. Look in /usr/sbin/ to see what your versions are called.
#/usr/sbin/mountd (/usr/sbin/rpc.mountd)
#/usr/sbin/nfsd (/usr/sbin/rpc.nfsd)
  • Check that these programs are running by typing rpcinfo -p. You should see something like this:
    program vers proto   port
    100000    2   tcp    111  portmapper
    100000    2   udp    111  portmapper
    100005    1   udp   1009  mountd
    100005    1   tcp   1011  mountd
    100003    2   udp   2049  nfs
    100003    2   tcp   2049  nfs
  • Note that you have just manually started these processes. If you want them to run at system start-up, you will have to modify your system rc files. If you have questions about any of this, you might try the RedHat Guide for more details.

Setting Up an HTTP Server

It is possible to fetch some or all of the SPIN extensions via http. The default configuration fetches the initial script file via http and the remaining extensions via nfs. It is not necessary to have an http server, so you don't have to continue with this. If you don't provide an http server, you will have to define FETCH_METHOD=nfs in your spin/make.conf file. See Pre-Build Modifications for more details.

We have used both Netscape server and Apache server at the UW. The Apache server is available free from

After setting up your http server according to the instructions provided by the supplier i.e. Netscape, Apache etc, do the following.

  • Inside the http server's web-document root directory, create a symbolic link to your nfs mount point with the same name as your mount directory. For example, if your nfs mount directory is /home, do this in your http document directory:
#ln -s /home home

That is all there is to it.


You also need to set up a bootp server on your development (Linux) machine. Look for /usr/sbin/bootpd to see that you have bootp installed. If you don't then you can get bootp-2.4.3.tar.gz from

  • Edit /etc/services on your Linux machine to include the lines:
        bootps          67/udp          bootp           # bootp server
        bootpc          68/udp                          # bootp client
  • Edit /etc/inetd.conf on your Linux machine to include one of the following lines:
  	bootps dgram   udp     wait    root     /usr/sbin/bootpd        bootpd
  	bootps dgram   udp     wait    root     /usr/sbin/bootpd        in.bootpd
  • Create the file /etc/bootptab. This file specifies how bootp operates and what machines it will serve. Look at and/or copy this bootptab example.


At the UW we use rconsole to create a remote connection to another machine on the network. The rconsole facility allows access to the console of a remote machine via a hardwired tty line. To set up rconsole, you need to download and and build the sources.


  • Download the file:
    rconsole.tar.gz (14KB)

    remote console (rconsole) sources

  • Unpack this file and build:
# gunzip < rconsole.tar.gz | tar xf -
# (Optional)rm rconsole.tar
# cd rconsole
# make

This will build the rconsole and rconsoled and place them in /usr/local/bin. You can read rconsole.doc for a more detailed explanation of the rconsole utility.

The build process also copies the rconsoles file into /etc/. This file specifies the remote machines and name of the rconsole server. There is a single entry in this file that can be used as an example. If you are going to have more than one crashbox connected to your rconsole server, you will need an entry in this file similar to the following for each of the crashboxes.

	ttyS0   13      loom20  2500    loom16


  • ttyS0: Serial line corresponding to COM1 port.
    This may differ on your machine. For example if you use COM2 in place of COM1, this would be ttyS1
  • 13: Baud (You shouldn't need to change this.)
  • loom20: Name of the machine that will be the rconsole server (Your Linux machine).
  • 2500: Port number (You shouldn't need to change this.)
  • loom16: Name of the remote machine you will connect to. (Your crashbox)
  • The last entry is just the full name of the remote machine.

Connecting Your Machines

You will need to connect your crashbox to the rconsole server using one of the COM ports. On our machines this required a null-modem cable with female DB9 connections at each end. I actually took a standard RS-232C cable that had female DB9 connections and added a DB9 male x female null-modem adapter to one end. At the UW we also have multiple machines connected to a single rconsole server through a serial module. Here is a diagram of the set-up

Running rconsole

At this point you should be able to run rconsoled and connect to your crashbox. In this example I will use the machines from the rconsoles file above.

First execute the following command so that the rconsole prompt remains left aligned.

#stty -icrnl < /dev/ttyS0
(This assumes you are using the ttyS0 serial connection)

Now you can start the rconsole daemon and connect to your crashbox.

#rconsoled loom16 & (Probably needs to be done as root)
#rconsole loom16
Attempting to connect to loom16 (via /dev/ttyS0) ... Connected
rconsole: Type '^_{q|e}' to exit.

Hit return and you will see the prompt:

To exit rconsole, type (Ctrl Shift Minus) then q.

hostboot and hostmap files

You now need to create two files based on templates provided with your SPIN sources.

  1. Look in spin/user/scripts/boothost.d/ You will see two file named scsi_machine.rc and ide_machine.rc. The names refer to the type of disk controllers on your crashmachine. Make a copy of the appropriate file for your crashbox and re-name it "your_machine_name.rc".
  2. Now look in spin/user/scripts/bootmap.d/ You will see an example file there called You need to read this file and edit it based on the name of your crashmachine. Then re-name the file with the IP address of your crashmachine.

Now you are ready to boot SPIN.


Copyright (c) 1997 The University of Washington. All rights reserved.