Debian/Ubuntu Diskless
Folding HOWTO
What you need:
Broadband
always on Internet connection.
Router for the Internet connection which can have
DHCP disabled on it.
PC to act as a server for the diskless clients.
This can be your ordinary PC but it is going to need to be on all
the time – it should be on all the time folding anyway!
Other PCs as diskless clients. These need at a
minimum:
Motherboard, processor, memory, power supply.
Network card that supports PXE booting. This can
be built in to the motherboard, in fact nearly all the ones that are built
in to the motherboard seem to support network booting.
You will need a keyboard, graphics card and
monitor to set them up initially, but once the diskless computers
are running they are not required. Usually just use one of each
between all the diskless computers.
Setting it up:
Start off with just your main computer
running, all others turned off.
Write down the following, with the
details from your computer. You may only have one DNS server, that is
fine, just note down what you have, e.g.
IP Address: 192.168.1.24
Subnet Mask: 255.255.255.0
Default Gateway: 192.168.1.254
DNS Servers: 206.191.0.140,
206.191.0.210
You can find:
- IP Address and subnet mask in the output of /sbin/ifconfig
- Default Gateway in the output of netstat -nr - it is the Gateway listed for the Destination 0.0.0.0
- DNS Servers listed as "nameserver" in the file /etc/resolv.conf
As root (or via sudo) edit /etc/network/interfaces and change the line
iface eth0 inet dhcp
to
iface eth0 inet static
address 192.168.1.24
netmask 255.255.255.0
gateway 192.168.1.254
Substituting the values you obtained earlier for IP address Subnet Mask and Default Gateway.
Now install the DHCP server and TFTP server on your PC
apt-get install dhcp3-server tftpd-hpa
Ignore any warnings and set tftpd-hpa to be started by inetd if you are prompted (Debian does, Ubuntu doesn't).
Now edit /etc/dhcp3/dhcpd.conf
#
# Sample configuration file for ISC dhcpd for Debian
#
# $Id: dhcpd.conf,v 1.1.1.1 2002/05/21 00:07:44 peloy Exp $
#
# The ddns-updates-style parameter controls whether or not the server will
# attempt to do a DNS update when a lease is confirmed. We default to the
# behavior of the version 2 packages ('none', since DHCP v2 didn't
# have support for DDNS.)
ddns-update-style none;
# option definitions common to all supported networks...
option domain-name-servers 206.191.0.140, 206.191.0.210;
option routers 192.168.1.254;
next-server 192.168.1.24;
filename "PXEClient/pxelinux.0";
use-host-decl-names on;
# If this DHCP server is the official DHCP server for the local
# network, the authoritative directive should be uncommented.
authoritative;
# Use this to send dhcp log messages to a different log file (you also
# have to hack syslog.conf to complete the redirection).
log-facility local7;
subnet 192.168.1.0 netmask 255.255.255.0 {
range 192.168.1.30 192.168.1.200;
default-lease-time 3600;
max-lease-time 7200;
}
Replace domain-name-servers entries with your DNS Servers
Replace routers rentry with your Default Gateway
Replace next-server with your IP Address
Ensure the subnet and netmask covers your IP Address and the Default Gateway, and ensure the range is valid for that subnet and netmask but does not include your IP Address or the Default Gateway.
Start the DHCP server as root (or via sudo) with /etc/init.d/dhcp3-server restart
Go to your router configuration window
and turn off the DHCP server. This is very router specific so I
haven't shown it here.
Download the network diskless zip file
from HERE (16MB) and extract the contents to /var/lib/tftpboot/PXEClient (you will need to create this directory) with the unzip command.
In the pxelinux.cfg directory there is
a file called default, edit this and change the USER and
TEAM if necessary. You may also want to change BIG to no if you don't
want to work on big WUs.
To enable the diskless machines to backup their work, touch the files
backup.$IP.A.$Instance
backup.$IP.B.$Instance
latest.$IP.$Instance
in the directory /var/lib/tftpboot/ where $IP is the IP address of the diskless folder (starting at the beginning of the range specified in the dhcpd.conf file above) and $Instance is the instance being backed up. Instance numbers start at 1 and there is one per logical processor (so 2 for HyperThreading or Dual Core processors). Also chmod 777 the files after creating them.
Network boot your diskless workstations, you
should see them obtain an IP address in /var/log/syslog.
This can help in determining the IP addresses of them for
you to point a web browser at to monitor them. Alternatively, the machine exports the ramdisk via Windows Networking and the folding files are in \\$Machine\C\etc\folding\$Instance.
After a couple of hours, you will see the backup files you created earlier actually have some size to them if you ls -l /var/lib/tftpboot
This software is covered by the GNU Public License Version 2. The source and a bug / feature traker are hosted by SourceForge at http://sourceforge.net/projects/foldingcd/ and this link must be redistributed with the files.
News
13 August 08: Add hang check for core_a2 where core is in stopped state at end and so no new WU is downloaded. VM memory increase to 640MB based on reports of out of space with new WUs. VM disk space increase to 1GB based on reports of out of space.
3 August 08: Add libraries for FahCore_a2.exe (SMP Gromacs CVS core). Add support for enabling -advmethods. Add support for setting memory size. Fix big packet options to match new choices in version 6 client. Minor fix on when to encrypt the proxy password.
17 July 08: Change URL to released (i.e. non-beta) version of 6.02 client. Add support for specifying TFTP server IP if doing static IP config. Add support for specifying interface, if specified and DHCP it will retry continuously in the foreground and not round robin in the background. Add support for doing a login shell, note that this has very few commands available.
24 June 08: Fix 1959158 - Add support for static network config.
23 June 08: Fix 1853657 - Add support for proxy web access.
9 June 08: Fix 1914982 - Add 30 secs to auto-return to home page after remote reboot. Fix 1853837 - Official VMWare Appliance. Fix 1922071 - Version Numbers & Add to Web Interface. Fix 1853668 - Make options selectable / changeable at boot screen - this gives a built-in Folding CD Generator and the ability to reconfigure the USB stick or VMWare Apliance.
26 March 08: Stanford upgraded the beta and moved the download location - again.
14 March 08: Upgrade to new kernel version (support more network cards), glibc and busybox. Fix 1881099 - Add folding directory link to web interface. Fix 1880850 - Optional enable of screen blanking. Fix 1914624 - Configurable Workgroup. Fix 1914625 - Disabling of nmbd and smbd.
1 March 08: Fix a bug in the hang check - wasn't killing cores with a 0 in the PID. Fix 1903637 - Add kill link to homepage. Fix 1870815 - Allow SMP per 2 CPUs.
2 February 08: Fixed install after move to SourceForge. Added autoreturn to homepage after reboot. Added the Benchmark CD as a boot option. Changed to FAH version 6 Beta 2.
11 January 08: Moved source and bug / feature tracking to SourceForge. Fixed a couple of issues in the SMP hang check - now supports multiple SMP instances (if you have more than 4 processors) and still does the kill if the Autosend text happens after the hang. Also added a check that the download from Stanford didn't error and if it did print troubleshooting suggestions and stop there.
28 November 07: Fixed Guest account for SMB support.
27 November 07: Added SMB server support, should allow monitoring by FAHMon etc.
21 November 07: Fixed syntax error in expr in autodetect of SMP hang.
20 November 07: Removed previous links with an autodetect of SMP hang and kill -9 of the cores if that is the case, warning will kill all cores on multiple SMP instances if you have more than 4 logical processors.
13 November 07: Add additional kill -9 link as previous link doesn't seem to cut it.
5 November 07: Add link to kill any remaining FahCore_a1.exe processes if SMP is hung at 100%.
22 October 07: Fix hostname to request a default hostname from DHCP and use any DHCP supplied one, if no DHCP supplied one then go with the default. Default is "fold-ABCD" where ABCD are the last 4 characters of the interface MAC address.
21 October 07: Fix INSTALL option on CD generator webpage. Fix /tmp permissions. Fix install to USB drive B.
12 October 07: Change URL to match new Stanford website.
2 October 07: Update to FAH version 6 Beta 1 for both SMP and normal clients. Fix Makefile to build on Ubuntu 7.04 64bit. N.B. Version string was previously back to front, remove version.txt from any USB sticks before running this version to get an automatic update if the install option is enabled.
19 September 07: Major rewrite! New Makefile build system. Change from an initrd to initramfs. Upgrade to kernet 2.6.22.1 for more network drivers. Work with any connected ethernet interface (eth0 - eth9) rather than just eth0. Fixed detecting extra processor if string "processor in the model name. Really finally remove hangcheck timer on 64bit (I hope!). Detect VirtualPC in addition to VMWare when deciding if to run NTP to sync time. Detects 32bit or 64bit - one image for both. Remote reboot option. Install to up to two USB drives on boot option. Run without logging to the console. Removed -advmethods from SMP - may not be any WUs available and fallback may be broken. Added -verbosity 9 to both to improve debug. Backup and restore works with up to 2 USB drives as well as with the old TFTP.
25 April 07: Bump VMWare memory a bit more to 512MB.
24 April 07: Really remove hangcheck timer from 64 bit (was only removed from 32 bit). Add backup link plus more info on webpage. Add configurable backup time including core checkpoint if in valid range (3-30 mins), default backup is set to 15, set to 0 to disable. Change CD Generator to work with / and reserve # as per Stanford. Increase VMWare .vmx file memory to avoid out of memory crashes. Detect VMWare and only run NTP if VMWare not found.
3 April 07: Corrected VMWare stuff to VMWare Server for SMP version and updated the .vmx file with 2 CPUs.
2 April 07: Kernel patch for SKB errors plus remove hangcheck timer (doesn't work in VMWare)
20 Mar 07: New 64 bit version for SMP folding
27 Oct 06: Updated kernel to use ACPI - should correctly pickup SMP on all systems now. Added dmesg.txt and cpuinfo.txt files accessible from the browser to help with any future processor detection issues.
18 Sep 06: New version uploaded, removed wine as no longer necessary (Linux and Windows cores now using same compiler) and updated kernel to 2.6.17.2 to support Core 2 Duo Motherboards. Also released source to comply with GPL.
20 Aug 05: New version uploaded, now uses wine to run the windows console client for improved performance.
13 Aug 05: New version uploaded, correctly handles HTML encoding of non-alphanumeric characters.
11 Aug 05: New version uploaded, now checks for TFTP server IP in DHCP before trying to backup/restore to it.
7 Aug 05: New version uploaded, doesn't try to backup/restore via TFTP as caused issues with some routers. If you tried before and it got stuck saying "to" then this should fix it.