• Welcome to Overclockers Forums! Join us to reply in threads, receive reduced ads, and to customize your site experience!

Guide:Running FAH on Smoothwall

Overclockers is supported by our readers. When you click a link to make a purchase, we may earn a commission. Learn More.

Mr. Chambers

Member
Joined
Feb 25, 2001
Location
Iowa
Guide: Running FAH on Smoothwall

This guide will attempt to easily illustrate how-to setup a Smoothwall router/firewall system with the Folding@Home program. This guide was written with the helpful posts/input of SK8, Xenocide, and SavageBasher, and of course - Arkaine23. Thanks guys :)

To install FAH (Folding@Home client), you will need the following programs:
WinSCP3
PuTTY
Folding@Home Linux Client

I also have them mirrored on my server if you are unable to download them from their respective sites, here:
WinSCP3
PuTTY


Step 1 - Turning on SSH:
setup1.jpg

Remotely log into your Smoothwall box from your browser. To do this, type in "http://192.168.0.1:81" in the address bar of your browser, and press enter.

setup2.jpg

Click the "Services" tab, you will be prompted for your username and password, by default the username is "admin", and you created the password when you setup your smoothwall installation for the first time. Please note these textboxes are case-sensitive!

After logging in, click on the "Remote Access" Button, and CHECK "SSH" and then click the "Save" button.


Step 2 - Logging in:
setup3.jpg

Install WinSCP3. Start the program and click the "New" button in the upper right-hand corner.

setup4.jpg

In the "Hostname" box type in the IP of the smoothwall box, by default it is "192.168.0.1". Be sure to change the "Port number" to "222" instead of just "22". Type "root" as the username, and whichever password you created during initial setup of your smoothwall box for the root username, and press the "Login" button.


Step 3 - Copying over the FAH program:
setup5.jpg

When first logging onto your smoothwall box, you will see something very similar to this. Go up one directory in the tree, (click the little up arrow and two dots). Create a new directory, (goto the "Files" menu and choose "Create New Directory"). Name this new folder "FAH".

setup6.jpg

Double-click this new fah directory to enter it. Rename the FAH client to "fah.exe", to make things simpler. Copy the file into the /fah directory (copy and paste, or click and drag).


Step 4 - Setting file permissions with PuTTY:
setup7.jpg

Start PuTTY.exe and login the same way you did with WinSCP3. On the next screen, it will prompt you for your username and password. These are the same as before, "root" is the username by default, and whatever password you chose. Press enter, and you will be at the command line of your smoothwall installation.

setup8.jpg

Type "cd .." and enter to go up a directory. Then type "cd fah", enter, to go into the FAH directory you made in Step 3. Type "chmod +x fah.exe", enter, to enable write-permissions to the FAH setup program, and finally "./fah.exe", enter, to start the setup.


That's it! All that's left to do is enter your username and team number (32 i'm hoping), and the program will download its first protein and start folding. I'll follow up with an addition to show how-to fold automatically after restart, much like Wedo's fantastic One-click, as soon as i figure out how :) Please direct questions/comments here, or PM me. Hope this helps!
 
Last edited:
Might wanna fix screenshots 5 and 6 there dude... not suitable for the forums...
 
Mr. Chambers said:
sorry about that David, didn't notice that was included! *fixed*

No probs, just didnt want to see you get in trouble ;)
 
I used a slightly modified version of arkaine’s “foldon” file.

/usr/bin/foldon

#!/bin/bash -p

FoldDir=/root/FAH/
cd $FoldDir
./FAH4Console.exe -forceasm -verbosity 9 > FAHoutput.txt &
echo "Starting F@H service..."


Then add

/usr/bin/foldon


to the bottom of /etc/rc.d/rc.sysinit above

echo "Silencing kernel, syslog output on tty12"

This should start FAH as a service

jrlara
 
Xenocide said:
uh the way thats setup, when you close putty folding will stop....it needs to be setup as a service...

Yes, I hadn't gotten that far yet, i'm trading PM's with arkaine on how to make a small script to fold automatically.

It's very similar to what figure-later just posted.
 
Xenocide said:
any update on this..?

Not from me obviously! :-/ Been swamped with work and school lately, but all that's needed to do is figure out exactly how to properly run a script, that will automatically start folding.

Arkaine was kind enough to PM me some, but when I tried them, it didn't work, probably due to my complete lack of linux/command-line skills no doubt...

If anyone would be so kind as to post and idiot-proof set of instructions, I will finish this step-by-step pictorial guide.
 
This should work-

vi /usr/bin/fold

Remember to hit the "i" key in order to get in insert mode for vi, and when finished, hit the escape key to get back in command mode. When in command mode, pressing ":wq" (without quotes) will save the file and exit. Type the following into the new file called fold:

#!/bin/bash
FoldDir=/root/FAH/
cd $FoldDir
./FAHConsole.exe -forceasm > /dev/null &
echo "Starting Folding@Home..."



Don't forget to make your script and client execuable-

chmod +x /usr/bin/fold
Your FAH#Console-Linux.exe also needs to a chmod +x to be executable.
Move the "fold" script to /usr/bin

mv fold /usr/bin


Now edit /etc/initab using vi-

vi /etc/inittab

Remember "i" to be able to insert text with vi and then "escape key :wq"
to save. Add this to the bottom of the file-

fold:3:eek:nce:/usr/bin/fold

This should start FAH as a service as a background process, run by root. Also note that I named the folding client FAHConsole.exe and used only the -forceasm flag in the script ot aovid confusion. You can easily set these things however you prefer in the fold script. The latest FAH5.02Console-Linux.exe will probably work just fine in Smoothwall.

Remember to run folding manually once first so that you generate a client.cfg!!!!

-notes by jrlara and Arkaine
 
Last edited:
If you want to know how to set samba so that EM3 can monitor a Smoothwall folding client, I could probably help out there as well.
 
samba is too much of a security for me on a router IMO, but there is a guide on http://community.smoothwall.org/forum/ since smoothwall doesn't have gcc (annoying), you have to compile on a dev box with the same kernel :( people on the smoothwall forums have already made a pearl install script to make it easy for those who want to
 
Thank you very much for your immense help. As soon as I get alittle free time I will finish the guide with pictures, just in case there are others as linux-dumb as I am :D
 
Xenocide said:
er cept, um its not working for me..

I haven't tried it myself, due to reasons above! But what sort of errors are you getting, how do you know it isn't working?
 
Xenocide said:
isn't starting up on start up, and i know because of the log file :p

hmmm... maybe i'm half-retarded, but can't Arkaine make the script file, send it to us, and then we just upload it into the correct directory, reboot the smoothwall, and bam, we're folding?
 
Altered my post above to use a different method.

And by giving you the contents of the script, you still have to chmod it and edit the smoothwall init so that it gets started at boot. So if I were to do this stuff for you, you won't be short-changing yourself. And really its not so tough to use a text editor I promise. The trick is that smoothwall is not exactly standard so we're having to find off-the-beaten-path methods for getting our folding client to start.

If the inittab method does not work, we'll simply use cron instead.


Just beware that in my script, I have chosen to name the folding client FAHConsole.exe. And I only used -forceasm. Make sure your folding client's name matches what you put in your script. And make sure you've started it manually to confirm it is executable and to generate a client.cfg for it.
 
Thank you again arkaine, I haven't given it another try yet, but I know last time I did, the text editor just laughed at me when i tried using it... text editor > me it appears... LOL.

I think after pressing the "i" key it should work though, I wasn't aware you had to do that :p
 
Back