This is an attempt to build a working server setup for my Acorn NCs.
NCs come in many variations and revisions, with different hardware and OS versions. This guide only deals with ethernet NFS machines.
Network Type | Boot Type |
---|---|
Modem | |
Ethernet | Boot with TopCat |
Ethernet | Boot with NFS |
In this guide I will be creating a Linux virtual machine to act as the server for the NCs, though you could configure a real machine to act in the same way if you have one spare.
For your own network you will need to know the following IP addresses, the examples in the guide use the values in the brackets after it, you will have to adapt them to your own values as you progress.
A diagram of the network used in this guide
A list of all things that need changing when using different IP adresses
We will use Oracle Virtual Box to create a virtual machine to be the NC Boot Server.
Create a new machine and select the following options;
Download an ISO of Xubuntu 22.04, which is an LTS (Long Term Support) version with support until 2025.
Install in the usual manner, picking these choices;
Set a static IP address in you host range
The simplest way to do this is to log in with the user you created during installation, and use the GUI tool to configure the network. (From the top right icon in the desktop).
The network computers do not have clocks on board, as such they must fetch their time over the network from a server, we will use our Network Computer Boot server to do this.
apt install ntp ntpdate
Verify you get a response with
ntpdate -q 127.0.0.1
Check server is running with
systemctl status ntp netstat -an
And make sure entries for port 123 are present
Create a new user 'ncd' to hold the base distro.
adduser ncd
Set a known password and ignore all the other questions about details.
Login as ncd and uncompress the nc distro
wget https://4corn.co.uk/archive/Acorn_Developer_Site/reference/nc/unixbeta/base/120398.tar.gz wget https://4corn.co.uk/archive/Acorn_Developer_Site/reference/nc/unixbeta/unix/180398.tar tar xvfz 120398.tar.gz tar xvf 180398.tar
Login as Root
chmod -R nobody:nogroup /home/ncd/boot
apt install nfs-kernel-server
Edit /etc/exports
Add line
/home/ncd/boot 192.168.0.0/255.255.255.0(rw,all_squash,sync,insecure)
Edit /etc/nfs.conf
Find the section [nfsd] and uncomment/alter the following lines
udp=y vers2=y
Reboot the NFS server to pick up the new configuration
service nfs-kernel-server restart
Edit /home/ncd/boot/ncconfig/106/setupnet
Change the route to match your gateway
bin:route -e add net default 192.168.0.1 1
Change the DNS resolvers to match your DNS servers
set inet$resolvers 192.168.0.1 set inet$localdomain local
Change the netmask to match your network, this is a 32bit Hex netmask, e.g. this example is 255.255.255.0
bin:fixnetmask 0xffffff00
Change the ntp timeserver to point at out NC Boot Server
set inet$timeserver 192.168.0.70
Edit /home/ncd/boot/!nfsboot/!run,feb
Insert these hack lines after RMEnsure OSVersion 1.06 basic
| HACK force boot v106 set OS$Version 106
Network computers use a service called rpc.pcnfsd to authenticate users for access to the network shares on the NC Boot Server. This program is now largely deprecated and not included in standard Linux distributions for more than 15 years. As such we will compile a version from the source code included in the Acorn NC distribution.
As root install the tools needed to build the program
apt install build-essential apt install libtirpc-dev
Prepare and alter the source, so it builds on newer machines
cd /home/ncd/pcnfsd mkdir pcnfsd cd pcnfsd tar xvfz ../pcnfsd.tar.gz mkdir svr4 cp Makefile.svr4 Makefile.linux
Edit Makefile.linux
Change CFLAGS to
CFLAGS = -DOSVER_LINUX -Wno-endif-labels -I/usr/include/tirpc
Change LIBS to
LIBS = -ltirpc -lcrypt
Change LFLAGS to
LFLAGS =
Edit pcnfsd_svc.c
Change line 444 to:
actual = *(struct sockaddr_in *) svc_getcaller(caller);
Edit common.h
At line 293 create a section
#ifdef OSVER_LINUX #define BSD_STYLE_PRINT #define BSD_STYLE_PR_LIST #define BSD_STYLE_QUEUE #define BSD_STYLE_CANCEL #define BSD_STYLE_STATUS #define BSD_STYLE_MONITOR #define SHADOW_SUPPORT #endif
Edit pcnfsd_misc.c
change line 58 to
extern char tempstr[256];
Build the program
make -f Makefile.linux
This should create the program in the svr4 subdirectory svr4/rpc.pcnfsd
Install the program
As root
cp /home/ncd/pcnfsd/pcnfsd/svr4/rpc.pcnfsd /usr/sbin
Create a systemd service to run rpc.pcnfsd on startup
Edit /etc/systemd/system/pcnsfd.service
Insert the the following content
[Unit] Description=Starts PCNFSD service After=rpcbind.service [Service] Type=oneshot RemainAfterExit=true ExecStart=/usr/sbin/rpc.pcnfsd [Install] WantedBy=multi-user.target
Then change the permissions of the service, start it running and configure it to start on system startup.
chmod 664 /etc/systemd/system/pcnfsd.service systemctl daemon-reload systemctl enable pcnfsd.service
We create users on the NC Boot Server to store their files. In this example we set up one user called ncdemo but you can add as many as you wish.
As root
adduser ncdemo
Give them a password here.
cp -r /home/ncd/eguser /home/ncdemo/nchome chown -R ncdemo:ncdemo /home/ncdemo/nchome
HACK test chmod a+r /home/ncdemo/nchome
Edit /home/ncd/boot/etc/passwd
Add a line
ncdemo 192.168.0.70 /home/ncdemo/nchome ncdemo
Edit /etc/exports
Add a line
/home/ncdemo/nchome 192.168.0.0/255.255.255.0(rw,sync,no_subtree_check,insecure)
Restart the NFS server to load the new config.
systemctl restart nfs-kernel-server
In theory you could configure the server to handle BOOTP (an earlier form of DHCP) requests from the client to automatically configure the Network Computer to boot, but for now we will configure the NC with a static IP address.
On the NC, plug in a PS2 keyboard, on startup press both Alt keys simultaniously to enter a configuration mode.
Configure client
NC IP address: 192.168.0.50 Boot server IP address: 192.168.0.70 Gateway IP address: 192.168.0.1 Sub-net mask: 255.255.255.0 DNS IP address: 192.168.0.1 Boot mount: /home/ncd/boot Static IP booting: Y