Register for the iXsystems Community to get an ad-free experience and exclusive discounts in our eBay Store.

Folding@Home for Corona Virus effort

Tigersharke

BOfH in User's clothing
Administrator
Moderator
Joined
May 18, 2016
Messages
252
Join the FreeBSD team!
Linux-Folding@Home Port is an easy install on FreeBSD, but if you get the error "FATAL: kernel too old" you will need to adjust a sysctl compat.linux.osrelease to value 2.6.32 which can be done by root for the present session, as sysctl compat.linux.osrelease=2.6.32 or permanently by editing your /etc/sysctl.conf to add that same line. Adding the line to your /boot/loader.conf will override whatever value it has as well.

Once all installed, you should see a message suggesting to edit the /usr/local/etc/fahclient/config.xml file if you'd like to contribute as a member of folding team FreeBSD, by adding line <team v='11743'/>

PS. Due to this being Linux software that has not been modified to function entirely as FreeBSD, the below adjustments to your /etc/fstab may be necessary.
Code:
proc            /proc                  procfs           rw      0       0
linproc         /compat/linux/proc     linprocfs        rw      0       0
linsysfs        /compat/linux/sys      linsysfs         rw      0       0


It may be necessary to load a few kernel objects onto the host system by kldload linprocfs and kldload linsysfs and kldload linux64

Those would also be added to your /etc/rc.conf file as kld_list="linprocfs linsysfs linux64" along with any others that may already be in the list. This would make it a permanent change rather than simply for the present session as above. kldstat will show what is loaded.

For jail installs, use iocage fstab -a [jailname] "[fstab entry]" with the three fstab entries above (ignoring extraneous whitespace, one space between variables should do). In an ordinary fstab tab characters can be used to make the columns pretty for future edits.

You can ignore any /proc/bus/pci/devices message since it calls that a warning and does not seem to affect running.

With further clarity this post will be modified to reflect more precise details, please report any missing details for any operation described above.
 
Last edited:

Tigersharke

BOfH in User's clothing
Administrator
Moderator
Joined
May 18, 2016
Messages
252
FYI:
Team stats can show 4 FreeBSD teams, with #11743 having the largest contribution of the bunch. The one unfortunately too normal (disheartening) statistic though is under OS, as we use the Linux client and not our own or perhaps even if we did, there is no listing for FreeBSD as an OS. Our success/effort is likely counted with Linux which diminishes them since we know this fact but boosts them for their fanboys.

Screenshot_2020-03-22 Folding home stats report.png
Screenshot_2020-03-22 Folding home stats report(1).png


We exist, so the only way to make ourselves known is to customize/fork such ports or develop our own, so that we are not under the Linux umbrella no matter where a majority of ports originate from.
 

majerus

FreeNAS Experienced
Joined
Dec 21, 2012
Messages
104
Can this be put into a plugin so its easier to consume?
 

Tigersharke

BOfH in User's clothing
Administrator
Moderator
Joined
May 18, 2016
Messages
252
My assumption was that people might have other boxes they could install it upon, though that doesn't stop it from being put in a jail or creating a plugin. I do not know precisely how either would be done, or if either method would work or would be as effective as outside on a more ordinary FreeBSD.
 

proto

FreeNAS Experienced
Joined
Sep 28, 2015
Messages
238
I put that client on a bhyve-vm, CPU workload only.

/boot/loader.conf:
linux64_load="YES"

/etc/fstab:
Code:
# Device           Mountpoint           FStype      Options        Dump    Pass#
/dev/ada0p3        none                 swap        sw             0       0

proc               /proc                procfs      rw             0       0
linsys             /compat/linux/sys    linsysfs    rw             0       0
linproc            /compat/linux/proc   linprocfs   rw             0       0
 

S1RC

Newbie
Joined
Jul 28, 2016
Messages
23
I'm new to running linux ports in an iocage jail, are there any step by step instructions on how to get this port working?

In the host system I had to load:
* kldload linprocfs
* kldload linsysfs
* kldload linux64

I'm not sure if that's the proper procedure.
 

asw2012

FreeNAS Experienced
Joined
Dec 17, 2012
Messages
123
since this is a similar subject, is there anything for rosetta@home ? Can't find much.
 

Tigersharke

BOfH in User's clothing
Administrator
Moderator
Joined
May 18, 2016
Messages
252
since this is a similar subject, is there anything for rosetta@home ? Can't find much.
I wonder if a similar effort to make it installable on FreeBSD might use some of the techniques from the folding@home port for success. I don't know any more than possibly coming across it in passing, with some relation to folding@home. If it has a Linux client or it can be shoehorned onto Linux in some way, it ought to be possible for FreeBSD.
 
Joined
Mar 25, 2020
Messages
2
I'm new to running linux ports in an iocage jail, are there any step by step instructions on how to get this port working?

In the host system I had to load:
* kldload linprocfs
* kldload linsysfs
* kldload linux64

I'm not sure if that's the proper procedure.
I also tried this while that did get rid of the errors saying those modules weren't working, it left me with this:
Code:
root@folder:~ # service fahclient start
Starting fahclient.
02:24:40:WARNING:Exception: Failed to open '/proc/bus/pci/devices': Failed to open '/proc/bus/pci/devices': No such file or directory: No such file or directory
02:24:40:ERROR:Exception: Could not read link /proc/self/exe
/usr/local/etc/rc.d/fahclient: WARNING: failed to start fahclient

I am thoroughly new to much of what's supposed to be going on here, so sorry in advance if this is something stupidly simple to fix. I just want to use my idle system to help in this time of need.
 

Tigersharke

BOfH in User's clothing
Administrator
Moderator
Joined
May 18, 2016
Messages
252
I also tried this while that did get rid of the errors saying those modules weren't working, it left me with this:
Code:
root@folder:~ # service fahclient start
Starting fahclient.
02:24:40:WARNING:Exception: Failed to open '/proc/bus/pci/devices': Failed to open '/proc/bus/pci/devices': No such file or directory: No such file or directory
02:24:40:ERROR:Exception: Could not read link /proc/self/exe
/usr/local/etc/rc.d/fahclient: WARNING: failed to start fahclient

I am thoroughly new to much of what's supposed to be going on here, so sorry in advance if this is something stupidly simple to fix. I just want to use my idle system to help in this time of need.
I have these set for my FreeBSD box.
Code:
linprocfs            /compat/linux/proc      linprocfs       rw        0       0
fdesc                /dev/fd                 fdescfs         rw        0       0
proc                 /proc                   procfs          rw        0       0
linproc              /compat/linux/proc      linprocfs       rw        0       0
linsysfs             /compat/linux/sys       linsysfs        rw        0       0


I do not believe that the /proc/bus/pci/devices is important, especially since it calls that a warning, the issue is with the error. I cannot say for certain which variation is the one that solves it but an dstab adjustment is likely necessary. I will add the above to the initial post of this thread.

I also note that the following kernel objects are set to load on my box:
Code:
5     1 0xffffffff8192e000     4950 linprocfs.ko
6     4 0xffffffff81933000     3148 linux_common.ko
7     1 0xffffffff81937000     1a80 fdescfs.ko
8     1 0xffffffff81939000     1ebe linsysfs.ko
<snip>
11    4 0xffffffff81c02000    13f30 linuxkpi_gplv2.ko
<snip>
26    1 0xffffffff81d71000    35490 linux64.ko
<snip>
30    1 0xffffffff81dde000    3d620 linux.ko


I will have to check my loader.conf or rc.conf to see if/what I specifically set to load.
 
Last edited:
Joined
Mar 25, 2020
Messages
2
I have these set for my FreeBSD box.
Code:
linprocfs            /compat/linux/proc      linprocfs       rw        0       0
fdesc                /dev/fd                 fdescfs         rw        0       0
proc                 /proc                   procfs          rw        0       0
linproc              /compat/linux/proc      linprocfs       rw        0       0
linsysfs             /compat/linux/sys       linsysfs        rw        0       0


I do not believe that the /proc/bus/pci/devices is important, especially since it calls that a warning, the issue is with the error. I cannot say for certain which variation is the one that solves it but an dstab adjustment is likely necessary. I will add the above to the initial post of this thread.

I also note that the following kernel objects are set to load on my box:
Code:
5     1 0xffffffff8192e000     4950 linprocfs.ko
6     4 0xffffffff81933000     3148 linux_common.ko
7     1 0xffffffff81937000     1a80 fdescfs.ko
8     1 0xffffffff81939000     1ebe linsysfs.ko
<snip>
11    4 0xffffffff81c02000    13f30 linuxkpi_gplv2.ko
<snip>
26    1 0xffffffff81d71000    35490 linux64.ko
<snip>
30    1 0xffffffff81dde000    3d620 linux.ko


I will have to check my loader.conf or rc.conf to see if/what I specifically set to load.
Thanks a bunch! All it took was adding proc, linproc, and linsysfs to my jail's fstab (not sure which one did it, I'm sure it wasn't proc since I tried that one before I added the other two and it didn't work...)!
For anyone who stumbles across this in the future, you'll just need to use iocage fstab -a [jailname] "[fstab entry]" with the last three entries from @Tigersharke's fstab as posted in the OP (ignoring extraneous whitespace, one space between variables should do).
 

Tigersharke

BOfH in User's clothing
Administrator
Moderator
Joined
May 18, 2016
Messages
252
FYI: In an ordinary fstab one can use tab characters to pretty-ify the columns.

I'm glad we have this 99% ironed out. I'll add the jail detail to the top post.
 
Top