Photo by Fusion Medical Animation on Unsplash
Here is a quick HOWTO for those which want to provide some FreeBSD based compute resources to help finding vaccines. I have not made a port out of this and do not know yet if I get the time to make one. If someone wants to make a port, go ahead, do not wait for me.
UPDATE 2020-03-22: 0mp@ made a port out of this, it is in “biology/linux-foldingathome”.
- Download the linux RPM of the Folding@Home client (this covers fahclient only).
- Enable the linuxulator (kernel moduls and linux_base (first part of chapter 10.2) is enough).
- Make sure linprocfs/linsysfs are mounted in /compat/linux/{proc|sys}.
cd /compat/linux
tar -xf /path/to/fahclient....rpm
- add the “fahclient” user (give it a real home directory)
- make sure there is no /compat/linux/dev or alternatively mount devfs there
mkdir /compat/linux/etc/fahclient
cp /compat/linux/usr/share/doc/fahclient/sample-config.xml /compat/linux/etc/fahclient/config.xml
chown -R fahclient /compat/linux/etc/fahclient
- edit /compat/linux/fahclient/config.xml: modify user (mandatory) / team (optional: FreeBSD team is 11743) / passkey (optional) as appropriate (if you want to control the client remotely, you need to modify some more parts, but somehow the client “loses” a filedescriptor and stops working as it should if you do that on FreeBSD)
- If you have the home directories of the users as no-exec (e.g. seperate ZFS datasets with exec=off): make sure the home directory of the fahclient user has exec permissions enabled
cd ~fahclient
(important! it tries to write to the current work directory when you start it)- Start it:
/usr/sbin/daemon /compat/linux/usr/bin/FAHClient /compat/linux/etc/fahclient/config.xml --run-as fahclient --pid-file=/var/run/fahclient.pid >/dev/null 2>&1
Per default it will now pick up some SARS-CoV‑2 (COVID-19) related folding tasks. There are some more config options (e.g. how much of the system resources are used). Please refer to the official Folding@Home site for more information about that. Be also aware that there is a big rise in compute resources donated to Folding@Home, so the pool of available work units may be empty from time to time, but they are working on adding more work units. Be patient.