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.
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. 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 salboot.com. This set up procedure explains how to partition and format your hard disk as well as install salboot.com 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 salboot.com 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. 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 salboot.com using fdisk. A: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. Next you want to format your c: drive and run install.bat to install all the files for salboot.com. A:format c: Now remove the dos.salboot diskette and reboot your machine. You should see "c:\salboot.com". Now you have a formatted 8MB partition with salboot.com 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".
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". 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" 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 salboot.com. This machine is now set up as a "crashbox". 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:
#/usr/sbin/portmap (/usr/sbin/rpc.portmap)
/home loom16.cs.washington.edu
#/usr/sbin/mountd (/usr/sbin/rpc.mountd)
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
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 www.apache.org/apache/dist/. After setting up your http server according to the instructions provided by the supplier i.e. Netscape, Apache etc, do the following.
#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 ftp.warwick.ac.uk:/pub/inet/bootp/.
bootps 67/udp bootp # bootp server bootpc 68/udp # bootp client
bootps dgram udp wait root /usr/sbin/bootpd bootpd bootps dgram udp wait root /usr/sbin/bootpd in.bootpd
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. Installing/Building
# gunzip < rconsole.tar.gz | tar xf - 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 loom16.cs.washington.edu Fields:
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 Now you can start the rconsole daemon and connect to your crashbox. #rconsoled loom16 & (Probably needs to be done as root) Hit return and you will see the prompt: >>>To exit rconsole, type (Ctrl Shift Minus) then q. You now need to create two files based on templates provided with your SPIN sources.
Now you are ready to boot SPIN.
Copyright (c) 1997 The University of Washington. All rights reserved. |