NetBSD has a capable Linux emulation layer, and with the right libraries installed, can run the Folding at Home client with some restrictions.
To follow these instructions you should have a basic grasp of:
- how to build and install a custom kernel or how to load kernel modules
- how to install packages from pkgsrc
- how to unpack archives into a file system from the command line
- how execute commands from the command line, and redirect output
I use "$" to represent a shell prompt for an unprivileged user,
I use "#" to represent a shell prompt for the superuser (root).
What works:
- downloading the folding core
- CPU-folding (scheduled to maximum "nice"-ness, as it should be), full SMP support: I personally run it on a machine with 24 CPU threads.
- downloading and uploading work units
So the basic functionality is there. Finished work units are counted and are displayed in the statistics, properly attributed to your user and team ID (provided you have a passkey).
What doesn't work:
- GPU folding (having no supported GPU I cannot definitively say that, but it seems unlikely.)
- Remote control of the client (neither via http nor using the proprietary protocol). This is likely caused by an incomplete or incorrect mapping of a Linux syscall to the equivalent NetBSD syscall.
EDIT: The long-standing problem in NetBSD preventing this from working has now been fixed in the main source tree. As soon as the fix is rolled out for NetBSD releases, it should be possible to control FAHClient on NetBSD with FAHControl running anywhere.
How to install:
- Kernel with Linux emulation
You need a kernel with Linux emulation enabled. On NetBSD-9, which is the current stable release, either build a custom kernel with Linux emulation enabled explicitly or add the appropriate kernel modules to /etc/modules.conf and add "modules=YES" to /etc/rc.conf to have them loaded before entering multi-user operation.
- Install Linux libraries and tools
The easiest way to do this is to install all the SuSE-13 libraries from the meta-pkg. I rarely install binary packages using pkg_add, so I will describe my preferred way for installing them from pkgsrc directly. This will probably have to be done with superuser-privileges:
Code: Select all
# cd /usr/pkgsrc/meta-pkgs/suse131/
# make update
It will install much more (around 1 GB) than is required to run the FAH client, so you may choose to install only select packages from /usr/pkgsrc/emulators/suse131_*, but I cannot tell you exactly which ones are required.
- Install the FAH client
Download the normal Linux client, I found that downloading and unpacking the .deb package was the most straightforward. The client itself is exactly the same for all versions.
create a directory and unpack the client using "ar", which will extract ".deb" packages into its components, which is one data.tar.xz and one control.tar.xz archive:
Code: Select all
$ mkdir fah-install
$ cd fah-install
$ ar x fahclient_7.6.13_amd64.deb
Code: Select all
# cd /emul/linux
# tar zxpf <path to data.tar.xz>
Next make sure that you are familiar with the FAHClient command-line switches, since using a graphical frontend to control the client is not working on NetBSD. To check that the client works and to see what the options are, try running it (as a normal user!) with the help option:
Code: Select all
$ /emul/linux/usr/bin/FAHClient --help
Please correct me if I got something wrong, or ask if anything is unclear.
Cheers, and happy NetBSD-folding,
HG