So you now have your familiar Fedora Core 2 desktop screen. If you wish to depending on your “client” or “node” you may be able to boot with a graphical screen straight away!!! But that’s not what we want, because that means you are using the main server to do the processing. One of the first things to do is identifying which one of your network cards in eth0 and which one is eth1. I would seriously advise writing which is which on the backplate of the lan cards, eth1 is your WAN connecting to the internet and eth0 is the farm dhcp interface. You literally have a 50/50 chance of getting the right one. On first boot plug ONE in and find your ip address, if you have 192.168.0.254 then its eth0, anything else and you’ve plugged in eth1.
Fire up your client machine. Personally I like to use the nforce2 chipset for my nodes as they support everything needed. VIA boards still do the job. This next part can get quite complex.
There are two types of network card – those with a “boot rom” and those without. Boot roms broadcast over the network that it exists and basically says “someone please send me something to boot”. This is BOOTP booting; the K12 server will recognise this and send it a reduced kernel that can start the extended kernel operating. I’m am not that good at explaining this so I advise you take a look at www.k12ltsp.org/clients.html as that explains it far better. Nforce2 boards PXE boot using the zpxe file specific for the network card. The zpxe files are found on the site www.etherboot.org I would recommend downloading these into a new folder in /tftboot/lts/pxe/bootstrap/*.zpxe
Telling the server which card to look for
Next step – you have the zpxe file for you network card and everything is all connected up, so how do you tell the server to give that file to that specific machine. Answer – you assign a static ip based on the MAC address of the network device. This done through the dhcp.conf file that is found in /etc/dhcpd.conf
This file is very important to the operation of your diskless farm and must be got right. You will find that the K12 install has placed a nice set of examples within the dhcpd.conf file that are commented out using “#”. I’ve always found that I’ve needed to put my isp’s DNS value in the line
option domain-name-servers XXX.XXX.XXX.XXX
It does not matter if your existing network users the same subnet 192.168.0 because you are specifying the network on eth1 that is not taking a blind bit of notice to your existing network.
So to create an entry for your first ltsp client called ws001
After the line “option log-servers 192.168.0.254”; enter the following
host ws001 {
hardware ethernet XX:XX:XX:XX:XX:XX; #MAC ADDRESS
fixed address 192.168.0.1;
if substring (option vendor-class-identifier, 0, 9) = “PXEClient” {
filename “lts/pxe/bootstrap/<your downloaded zpxe file>”;
}else if substring (option vendor-class-identifier, 0, 9) = “Etherboot” {
filename “lts/vmlinuz.ltsp”;
option vendor-encapsulated-options 3c:09:45:74:68:65:72:62:6f:6f:74:ff;
}
Once done to check for syntax errors (normally a missing open or close {} ), restart dhcp by
/etc/rc.d/init.d/dhcpd restart
So let’s break down the above into what it is doing. The dhcp server has got a call from a machine saying it wants a dhcp licence. So the server checks, do I know this machine (the MAC address) and if so what shall I do. Well first off – here you go have a static ip address, next one, you’ll be asking using “PXEClient” so therefore here have a boot pxe, then using that pxe which wil now broadcast “Ethernet” boot the tftpboot kernel and start the fire up for the real thing.
If you boot your client at this stage you will now get the fixed ip and still boot into a graphical interface. Have a play by running both at this point, have your server running either top from command line or system information, and see that whenever you request something to be done on your client, the cpu that is being used is the servers. Not what we want for crunching.
Next file to edit – the “exports” file in /etc. There is a nice line that says “the following needs to be uncommented to use local apps”. Yup – you guessed it, uncomment the line.
We are finished configuring the servers “real” files, the files in etc are owned and used by the server. In the folder /opt/ltsp/i386 are the files that are used by the nodes. Now not all of the files required for crunching are there, but we will cover that later.
Next file = rc.sysinit that is found in /opt/ltsp/i386/etc
Look for the section that is labelled “Mount Filesystems”. Now the little if routine in there is saying, if local apps is set to use, then mount the home folder. We know we want the home folder mounted, so simply copy the line “mount –t nfs –o nolock……” and paste it outside the loop, the line after “fi” will do. In K12 that’s the only edit required to rc.sysinit.
In the same directory we have the file “lts.conf” this file drives the building blocks of the operating system that is being created for you diskless client, so this is the next one to edit. On a default install will see a lot of examples that are all commented out, including a setup for using local apps for the machine [ws001]. Insert the code below into the file
[ws001]
LOCAL_APPS = Y
LOCAL_WM = Y
NIS_DOMAIN = ltsp
NIS_SERVER = 192.168.0.254
SCREEN_01 = shell
RUNLEVEL = 3
RCFILE_01 = start_boinc
So we’ve told the server to send a kernel to the diskless node and now we are setting the parameters of that kernel. Runlevel 3 is console, we are running dedicated crunchers, so why risk losing a few clock cycles to graphics 
Now we need to have the “mounting” directories sorted. We are mounting home, so for each workstation we need a directory to run boinc. Firstly in the /opt/ltsp/i386/home directory create a dir for each node, named the same as the name in the lts.conf
So we have
/opt/ltsp/i386/home/ws001
/opt/ltsp/i386/home/ws002
/opt/ltsp/i386/home/ws003
We do not need anything else in here, as we are using the real /home for the data, this is the mount point. (that may be technically incorrect – I’m not too sure tbh)
So now in /home create the same (nearly)
/home/ws001/boinc
/home/ws002/boinc
/home/ws003/boinc and so on……
In the boinc folder place the most recent boinc file, you do not need to put in the boinc manager into each directory. In the boinc folder also create a “remote_hosts.cfg” file that has a single line in it with “192.168.0.254”, this allows the boinc manager running on your server to monitor the boinc client.
Now to start boinc on machine bootup we take a quick look back at the lts.conf and the RCFILE_01 entry. Between this and the rc.sysinit we are saying on boot run the file “start_boinc” in the /opt/ltsp/i386/etc/rc.d folder. In that folder you will find a sample file, do a copy and then paste to create “sample(copy)” and then rename it to “start_boinc”. Edit this file to include
echo “Starting Boinc”
cd /home/${HOSTNAME}/boinc
rm nohup.out
rm lockfile
nohup ./boinc –run_cpu_benchmarks –allow_remote_gui_rpc &
nohup directs all output from the command boinc to the file “nohup.out”, the “&” on the end keeps it quiet from the client screen so you can monitor its progress and generally use the logon screen without the boinc messages appearing.
Now referring back slightly again, I previously mentioned that not all files from the “full” install were in the /opt/ltsp/i386 tree. You will need to copy three files into the correct locations.
/usr/bin/nohup copy to /opt/ltsp/i386/usr/bin
/usr/bin/top copy to /opt/ltsp/i386/usr/bin/top
/lib/libproc.so.3.2.0 copy to /opt/ltsp/i386/
Now, just we need to restart the services before booting the client machine to see all the changes take effect, from the system terminal
/etc/rc.d/init.d/portmap restart
/etc/rc.d/init.d/named restart
/etc/rc.d/init.d/xinetd restart
/etc/rc.d/init.d/dhcpd restart
/etc/rc.d/init.d/nfs restart
Now when you boot your client, you should be able to see the line “Starting Boinc” from the start_boinc file you created and because of the command line argument asking boinc to run the benchmarks, if you type “top” you will see the machine with no disk has a 100% cpu usage. To kill the boinc process from the diskless node, press “k”, then more than likely the process number of 144 (check it may be different).
Now press “q” to exit top, then cd /home/${HOSTNAME}/boinc and now you can attach projects using
./boinc –attach_project
Once you have set all your project going, you can either run quiet by “./boinc &” or type the full path to your start “batch” file
/etc/rc.d/start_boinc
Or in my opinion the simplest way is to reboot the machine !!
For new nodes, just add the entry to lts.conf and dhcpd.conf and do the same.
Comments and or glaringly obvious errors and all that - spent all day nailing the easiest way imo to get this running. If it helps get one farm running it was worth it 
DT.