Booting a Network Computer

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:\ :hn:dn="mydomain.example.com":\ :td=/tftpboot:\ :ds=192.168.1.2:\ :to=auto:\ :ns="192.168.1.2" .subnet115:\ :tc=.default:\ :sm=255.255.255.0:\ :gw=192.168.1.2:\ :sa=192.168.1.4: ournc: tc=.subnet115:\ ha=00.11.22.33.44.55:\ bf=/nc
 * 1) domain name
 * 1) TFTP boot directory
 * 1) name servers
 * 1) Next, we can define different master entries for each subnet. ..
 * 1) use default template we've just defined
 * 1) subnet mask
 * 1) gateway
 * 1) NFS boot server address
 * 1) entry for NC - 'ournc' is in the DNS and resolves to the IP address we want to give it
 * 1) MAC address of NC - printed by NC on boot
 * 1) NFS mountpoint on server 192.168.1.4 to boot from
 * 1) 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 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; 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"; }
 * 1) option definitions common to all supported networks...
 * 1) Acorn 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:
 * 1) 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