BOINC (Berkeley Open Infrastructure for Network Computing) is a multi-platform system for distributed computing. While available for most mainstream operating systems like Windows and OS X, BOINC projects can also be run on FreeBSD.
The BOINC is available directly from the ports tree. Assuming you already have FreeBSD 10 installed with the ports collection, just install the net/boinc-client port. You can opt to include the GUI, or just the core client.
# portmaster net/boinc-client
To enable the BOINC client to run in the background, add boinc_client_enable to rc.conf:
# vi /etc/rc.conf boinc_client_enable="YES"
Installing Native Projects
BOINC is software that runs other software. Generally speaking, the projects themselves provide binaries directly to the client, but many do not support FreeBSD as something of a niche operating system. A small number of BOINC projects do have ports available which you can build straight from the tree.
You can search ports for boinc to see which projects are currently available.
# cd /usr/ports/ # make search name=boinc
If you find your project, just install the port to complete the process.
# portmaster astro/boinc-setiathome-v7
Once the application is installed, just use boinccmd to connect to your project account, and you’re done!
# boinccmd --project_attach http://setiathome.berkeley.edu [authenticator]
Running Linux Projects
As I mentioned in the last section, many projects (like World Community Grid) do not support FreeBSD natively. Even though you can install the boinc client, if a project doesn’t provide FreeBSD-compatible files, their project software won’t run. To compensate for this the FreeBSD client gives the option of using Linux emulation. More projects are available for Linux than FreeBSD, so Linux emulation allows the FreeBSD client to also run project software that was written for clients on Linux… and expands the number of projects available by doing so.
The first step is to build or rebuild the boinc_client itself with Linux support. If you already included this feature when you installed the client, you can skip rebuilding it. If you aren’t sure, run make config to check. You’ll also need to install the linux_base emulators port to provide Linux emulation to the system.
# cd /usr/ports/net/boinc-client # make config [select Linux] # portmaster net/boinc-client emulators/linux_base-f10
Linux emulation should now be installed, but you may have to make a few more changes before project software will run. Enable linux emulation in rc.conf:
# vi /etc/rc.conf linux_enable="YES"
Enable shared memory features. (If you get shmem errors from a project, check this.)
# vi /etc/devfs.conf link /tmp shm
Finally, some documentation suggests setting the following flag in sysctl.
# vi /etc/sysctl.conf kern.elf32.fallback_brand=3
That should it! Don’t forget to reboot to ensure the system picks up all your changes.
If you’re still having trouble getting your projects to run, check the client logs for errors. The default ports client uses /var/db/boinc/ as a working directory. stderrdae.txt and stdoutdae.txt store errors and output respectively. You can also check the account_*.xml files to verify your account settings are correct.