_     _                  __  __ _           _          _
 | |   (_)_ __  _   ___  _|  \/  (_)_ __   __| | ___  __| |
 | |   | | '_ \| | | \ \/ / |\/| | | '_ \ / _` |/ _ \/ _` |
 | |___| | | | | |_| |>  <| |  | | | | | | (_| |  __/ (_| |
 |_____|_|_| |_|\__,_/_/\_\_|  |_|_|_| |_|\__,_|\___|\__,_|
| Home | Software | Mirrors | Writings | Dutch Power Cows | About |

Writings

Running Folding@Home with a Knoppix GNU/Linux Live CD on a Windows network share

Here is a short HOWTO, to get a Folding@Home client to run on Knoppix Live CD,
while the files are located on a Windows XP network share.
This setup might be usefull incase you wish to fold with diskless machines.

In my example setup I have a Windows XP Professional SP2 host which hosts
the folding network share and a Knoppix 3.9 client which does the actual folding.

The basic process is:
  1. Setup the network share on the Windows host (GUI)
  2. Mount the network share on the Linux host (Console) (GUI)
  3. Start Folding! (Console) (GUI)
Step 1: Setup the network share on the Windows host
Click: Start -> Run -> explorer C:
RightClick the white area: New -> Folder
RightClick the new folder: Properties -> Sharing
Enable: "Share this folder on the network" and "Allow network users to change my files"

Create a directory on the Windows host and share it on the network.
Make sure to allow the users to modify the folders content, else the Folding@Home
client won't be able to create/write the files it needs to function.

In the below screenshot you can see the folder properties of the Folding directory,
I already ran the F@H client once so it already created the files it needs. Click to enlarge.
Folding Networkshare on WinXP


Step 2 (CLI): Mount the network share on the Linux host
root@tty1[/]# mkdir folding
root@tty1[/]# mount.smbfs //192.168.145.3/Folding folding/ -o username=Administrator
Password: 
root@tty1[/]# mount | grep folding
//192.168.145.3/Folding on /folding type smbfs (rw)
root@tty1[/]# ls -al /folding
total 3645
drwxr-xr-x   1 root root    4096 Mar 14 23:48 .
drwxr-xr-x  10 root root    1024 Mar 14 23:52 ..
-rwxr-xr-x   1 root root  249236 Mar 14 18:39 FAH502-Linux.exe
-rwxr-xr-x   1 root root   27167 Mar 14 20:30 FAHlog.txt
-rwxr-xr-x   1 root root 3435392 Mar 14 18:53 FahCore_78.exe
-rwxr-xr-x   1 root root    1481 Mar 14 18:53 MyFolding.html
-rwxr-xr-x   1 root root     103 Mar 14 18:53 client.cfg
-rwxr-xr-x   1 root root      65 Mar 14 12:31 download-url.txt
-rwxr-xr-x   1 root root       8 Mar 14 18:39 machinedependent.dat
-rwxr-xr-x   1 root root    7168 Mar 14 18:41 queue.dat
-rwxr-xr-x   1 root root     159 Mar 14 20:14 unitinfo.txt
drwxr-xr-x   1 root root    4096 Mar 14 14:13 work
I choose to boot Knoppix with the option knoppix 3,
this causes Knoppix to boot into single-user mode with only a root shell and without a GUI.
This is usefull as it saves alot of RAM by not loading KDE and X.
When Knoppix finishes booting, create a directory where you will mount the network share.

Use the command mount.smbfs to mount the Windows share,
smbmount can also be used, which is just a wrapper around mount.smbfs.
You can reference to the Windows host by IP address or hostname.

I use the Windows useraccount Administrator because that's the only existing user on my Windows install,
you should really use a Least-Privileged User Account!
There are no other users in my case since I only compile qd on this install, and it's inside a Virtual Machine.
I should also be a good boy and follow the LUA way, but I'm lazy ;-)

It may be usefull to set some other options for the mounted files and directories.
You can set the ownership rights of the files and directories with the options uid and gid.
To set the file permissions, use the options fmask and dmask
If I would want the knoppix user and group to own the mounted files and directories,
have them all read-, write-, and executable and explicitly set the Windows Workgroup,
I would do the following:
root@tty1[/]# id knoppix
uid=1000(knoppix) gid=1000(knoppix) groups=1000(knoppix),20(dialout),21(fax),
22(voice),24(cdrom),25(floppy),26(tape),27(sudo),29(audio),30(dip),44(video),
60(games),100(users),106(usb),110(scanner),115(camera)
root@tty1[/]# mount.smbfs //192.168.145.3/Folding folding/ -o workgroup=LINUXMINDED,
username=Administrator,uid=1000,gid=1000,fmask=777,dmask=777
Password: 
root@tty1[/]# ls -al /folding
total 3645
drwxrwxrwx   1 knoppix knoppix    4096 Mar 14 23:59 .
drwxr-xr-x  10 root    root       1024 Mar 14 23:59 ..
-rwxrwxrwx   1 knoppix knoppix  249236 Mar 14 18:39 FAH502-Linux.exe
-rwxrwxrwx   1 knoppix knoppix   27167 Mar 14 20:30 FAHlog.txt
-rwxrwxrwx   1 knoppix knoppix 3435392 Mar 14 18:53 FahCore_78.exe
-rwxrwxrwx   1 knoppix knoppix    1481 Mar 14 18:53 MyFolding.html
-rwxrwxrwx   1 knoppix knoppix     103 Mar 14 18:53 client.cfg
-rwxrwxrwx   1 knoppix knoppix      65 Mar 14 12:31 download-url.txt
-rwxrwxrwx   1 knoppix knoppix       8 Mar 14 18:39 machinedependent.dat
-rwxrwxrwx   1 knoppix knoppix    7168 Mar 14 18:41 queue.dat
-rwxrwxrwx   1 knoppix knoppix     159 Mar 14 20:14 unitinfo.txt
drwxrwxrwx   1 knoppix knoppix    4096 Mar 14 14:13 work

Below is a nice screenshot of the most essential commands. Click to enlarge.
Commands to mount the Windows share on Knoppix


Step 3 (CLI): Start folding!
root@tty1[/]# cd folding
root@tty1[/folding]# ./FAH502-Linux.exe -verbosity 9

Note: Please read the license agreement (FAH502-Linux.exe -license). Further 
use of this software requires that you have read and accepted this agreement.



--- Opening Log file [March 15 05:52:15] 


# Linux Console Edition #######################################################
###############################################################################

                       Folding@Home Client Version 5.02

                          http://folding.stanford.edu

###############################################################################
###############################################################################

Launch directory: /folding
Executable: ./FAH502-Linux.exe
Arguments: -verbosity 9 

[05:52:15] - Ask before connecting: No
[05:52:15] - User name: Anonymous (Team 0)
[05:52:15] - User ID: 2600A7A52C2AEED3
[05:52:15] - Machine ID: 1
[05:52:15] 
[05:52:15] Loaded queue successfully.
[05:52:15] + Benchmarking ...
The network share is now available. Start the client as usual, there's not much more to it.
This procedure could also be done with an NFS mount on a UNIX box or some other network share.
Folding with diskless machines is fun and not very hard.

The proof by screenshot ;-) Click to enlarge.
Commands to start Folding@Home on the mounted network share


Step 2 (GUI): Mount the network share on the Linux host
Add the Windows host to LinNeighborhood.
You only have to enter an IP address or hostname.
If you click Query a node status query will be done for the remaining information.
See the LinNeighborhood README for more details.
?


RightClick the Windows host and click scan as user.
Enter the Windows Workgroup, Username and Password of the account allowed to access the network share,
and click OK.

The below screeshot shows the context menu when you right click the host,
and the Insert User window which is opened when you click scan as user.
?


RightClick the network share and click mount.
Optionally change the mount point if you don't like the default.
Be sure to set the File Mode to 755 or similar,
because the default 644 does not allow file execution and
you can't change the permissions of the files with chmod after they're mounted.
Finally, click Mount to mount the network share in the filesystem.
?


cd into the mounted directory and check the permissions of the mounted files.
All should be fine, but if the FAH502-Linux.exe and FahCore_*.exe files are not executable,
or the files are not writeable by the user who runs FAH502-Linux.exe
it won't work and you need to set the File Mask correctly in the Mount Dialog window.
?


Step 3 (GUI): Start folding!
The network share is now available. Start the client as usual, there's not much more to it.
This procedure could also be done with an NFS mount on a UNIX box or some other network share.
Folding with diskless machines is fun and not very hard.

?

Written: 2006-03-14


Fortune:

Voodoo Programming:  Things programmers do that they know shouldn't work but
they try anyway, and which sometimes actually work, such as recompiling
everything.
-- Karl Lehenbauer