Booting a Network Computer

From RISC OS

Jump to: navigation, search

Contents

Introduction

Acorn Network Computers (NCs) are discless machines designed to boot from a telephone or ethernet network. They have NCOS in ROM or flash, but rely on the network for applications other than the basic browser and wordprocessor that might be supplied.

As NCs were under development for much of the time they were available, there are many different versions of NC hardware and software available. The following is mostly based on NCOS 0.1 but will probably apply to other versions too. I'm assuming you're booting from some kind of Unix machine, though you could probably boot from Windows or RISC OS with the right software.

Network config

Ethernet NCs expect to find an IP address using BOOTP. You can cancel this on boot by holding down both Alt keys which may leave you in a configuration menu (in NCOS 0.1 it just dumps you into the browser with no network active). You can boot to a command line by pressing Alt-Alt-Shift on power on.

To boot you'll need a BOOTP server on your network. This can either be standalone bootpd, or some DHCP servers (notably ISC dhcpd) also provide BOOTP. For the root directory you'll also need an NFS server. Note these don't have to be the same machine.

bootpd configuration

Here's a sample /etc/bootptab configuration:

.default:\
# domain name
        :hn:dn="mydomain.example.com":\
# TFTP boot directory
        :td=/tftpboot:\
# name servers
        :ds=192.168.1.2:\
        :to=auto:\
        :ns="192.168.1.2"

# Next, we can define different master entries for each subnet. . .

.subnet115:\
# use default template we've just defined
        :tc=.default:\
# subnet mask
        :sm=255.255.255.0:\
# gateway
        :gw=192.168.1.2:\
# NFS boot server address
        :sa=192.168.1.4:

# entry for NC - 'ournc' is in the DNS and resolves to the IP address we want to give it
ournc:  tc=.subnet115:\
# MAC address of NC - printed by NC on boot
        ha=00.11.22.33.44.55:\
# NFS mountpoint on server 192.168.1.4 to boot from
        bf=/nc
# we could also do ip=192.168.1.99 to set the IP address explicitly

Typing 'man 5 bootptab' should explain all the two-letter codes. Remember to separate each statement with colons and, if an entry spills onto more than one line, add backslashes at the end of lines.

This will give the NC an IP address and tell it which NFS share on which server to mount as its root directory.

dhcpd configuration

ISC's /etc/dhcpd.conf is a little less terse:

allow booting;
allow bootp;

# option definitions common to all supported networks...
option domain-name "mydomain.example.com";
option domain-name-servers 192.168.1.2;

option subnet-mask 255.255.255.0;
option routers 192.168.1.1;
option broadcast-address 192.168.1.255;

default-lease-time 600;
max-lease-time 7200;

# Acorn NC
host ournc {
  hardware ethernet 00:11:22:33:44:55;
  fixed-address 192.168.1.99;
  option host-name "ournc"; 

  #stage 1: this would be a kernel to fetch by TFTP if the NC supported that
  # but we need to clear it otherwise dhcpd supplies a file the NC can't
  # read and gives an error 'Insufficient access'
  filename "/nc";

  #stage 2: NFS root
  next-server 192.168.1.4;
  option root-path "/nc";
}

You can also add sections to this to issue IP addresses by DHCP to other parts of your network, but I'll ignore this for now.

When I power up my NC, it gives:

Waiting for a boot server .. tries=0
  Physical address is 00:11:22:33:44:55

with my NC's MAC address. It keeps repeating this until it gets a valid address, at which point the screen clears and says:

Irlam Instruments Ethernet card

Success of the first stage!

NFS config

To serve the root filesystem to the NC you'll need an NFS server. As I said above it doesn't have to be on the same machine as the BOOTP server - in the examples above I've chosen 192.168.1.4 to be my NFS server. First install an NFS server package. On Debian Linux machines this can be achieved by installing the 'nfs-user-server' or 'nfs-kernel-server' packages.

Then, create yourself a directory where your RISC OS files are going to go. In the BOOTP configurations above I've called it /nc:

# mkdir /nc

Now we need to export this by NFS. Edit /etc/exports and add a line:

/nc     192.168.1.0/255.255.255.0(rw,all_squash,sync)

This exports the directory /nc read/write access on all machines on the subnet 192.168.1.* As we've fixed the IP for our NC we could constrain it to only the NC, but that makes testing a little difficult. We can also constrain access to the NFS servers at port level by editing /etc/hosts.allow:

portmap: 127.0.0.1,192.168.1.
lockd: 127.0.0.1,192.168.1.
rquotad: 127.0.0.1,192.168.1.
mountd: 127.0.0.1,192.168.1.
statd:  127.0.0.1,192.168.1.

Make those 192.168.1.99 to only give access to our NC when we've finished testing. But it's still not very secure since it's easy to spoof addresses on ethernet.

Filing system layout

The NFS mount uses the standard way of encoding RISC OS filetypes - files are named file,abc where 'abc' is the hexadecimal filetype. If you write the files with a RISC OS NFS client like Sunfish then filetypes will be correclty encoded. To be able to write to the NFS mount the files should have a user id (uid) of 32767 and a group id (gid) of 9999. Note that this isn't secure because there's no password - any other machine on the network can also write the NFS mount.

On the NFS mount you need a file or directory !NFSBoot from which the NC will boot. This could be a RISC OS !Boot directory modified for NC OS (probably you'll need to load modules from RISC OS before this will work), or it could be a simple Obey file called !NFSBoot,feb

References

Booting an NC into NetBSD

Personal tools