WHAT IS THIS WEB PAGE ABOUT?
Most of today's home computers are very fast and waste a lot of power waiting for you to do something. This idle power can be put to good use.
If you have an interest in donating your computer's spare idle CPU cycles for useful scientific research such as SETI@home (Search for Extra-Terrestrial Intelligence), Einstein@home (Search for Pulsars and Neutron Stars) or wish to donate your CPU idle time for other scientific projects then you will want to download and run BOINC (Berkeley Open Infrastructure for Network Computing).
The steps shown here allow you to install BOINC securely and to automatically start and run under it's own BOINC user account when your computer is turned on. The BOINC software in this HowTo is installed in directory /opt/BOINC instead of /home/boinc/BOINC. The reason for placing it here is so that user BOINC can run the client and any users that belong to BOINCG group can read, but not modify BOINC settings.
These steps work with Mandrake 10 up to and including Mandriva 2008. Included in this How-To guide are additional steps you need so that BOINC can run correctly on Mandriva's Higher "MSEC 4" server security level. You can skip many steps in this guide if you are running at a more Standard security level.
Please note that due to all the details mentioned above, this How-To is much more work than simply setting up BOINC to run under your own user account. If you want a more generic version of How-To compatible with other versions of Linux you have a great guide written by the original author for the BOINC script used in this setup. The general guide is shown on Eric Meyer's How To Guide. There are several other guides shown on the BOINC wiki.
SOME SUGGESTIONS IF INSTALLING BOINC ON A NEW COMPUTER
Skip this section if you already have installed Linux. If you plan to run a Linux file server and have not installed Linux yet, I suggest putting BOINC on a partition of it's own. The reasons for this suggestion is hard drive space, and backups.
Users may fill-up hard drive space to the point of not having room available for other programs to do their work. When you run out of room, it interferes with programs like BOINC. BOINC hard drive space requirements are somewhat steady (except for growing log files), so a small partition of 200MB, 500MB, or 1G is okay. If you have not used BOINC before and are not familiar with how much space some projects use, you may want to skip this suggestion.
When it comes to you making backups (except for occasional backups), making a backup of the BOINC working directory may not have value to you. The files are large and they change often. Putting BOINC at a location other than a default /home/user directory allows you to leave BOINC running and only turn it off if-and-when you decide to do a backup on the BOINC directory. It also makes your backup of home directories far simpler too because you can simply backup /home/* and not some other combination with complicated exclusions and exceptions to skip directories like /home/user/BOINC.
As you can see in the partial script example below, if you make backups, and are using steps similar to this tar backup script then you can make a simple modification to backup just once a month, and only stop BOINC when you actually do backup that BOINC partition or directory:
# Create Monthly Backups on 1st day of each month if [ $DOM = "01" ]; then MakeFullMonthlyBackup "1" "$DIR1" >> $ERRFILE; MakeFullMonthlyBackup "2" "$DIR2" >> $ERRFILE; MakeFullMonthlyBackup "3" "$DIR3" >> $ERRFILE; # Stop BOINC. Make a monthly backup. Restart BOINC /sbin/service boinc stop MakeFullMonthlyBackup "BOINC" "/opt/BOINC" >> $ERRFILE; # Maybe rotate BOINC log files before starting BOINC? # Done, start BOINC /sbin/service boinc start fi |
CREATE PACCESS & BOINCG GROUPS, THEN ADD A BOINC USER ACCOUNT
Ideally, you will want to create a BOINC account just for BOINC and give it few permissions to the rest of your computer. The various research projects only need a network connection and knowledge of available RAM. Future versions of BOINC may introduce interesting features so you may want to create a shared "read-only" BOINCG group for this purpose. If you follow the suggestion of putting BOINC in another directory, such as /opt/BOINC instead of /home/user/BOINC mentioned in the previous section, it will be easier for looking at BOINC using group boincg permission access.
This HowTo guide will be using groups named paccess, boincg and a new user account named boinc which belongs to nobody except boinc. If you want to use different names, please substitute where applicable.
Most of these steps can be done quickly on a command-line console (or shell). If you have not used a command-line console before you can usually find it by following your menu. It is likely located in "Mandriva->System->Terminals->Console".
Below are the steps you enter. Below that is information about each instruction used. This example assumes your user account is named you. Please substitute the user name of your account when required.
1. 2. 3. 4. 5. 6. 7. 8. |
|
The reason for adding group paccess is so that BOINC can access /proc without needing adm rights to directory /proc.
ALLOW BOINC TO RUN AT HIGHER MSEC 4 LEVEL
If your computer will run using Standard "MSEC 2" or High "MSEC 3", you can skip this section. These steps are required to allow BOINC to run on Mandriva Higher "MSEC 4" Security Level because permissions on directories will change and some programs will be terminated automatically if they are found running.
You will need to edit a file and some directory settings in su mode, so open up a command line console and follow these steps.
1. 2. 3. 4. 5. |
|
In file perm.4 you will want to edit the line containing /proc from:
/proc root.adm 550 |
| change permissions to: |
/proc root.paccess 550 |
| and insert this new line for a new BOINC directory: |
/opt/BOINC boinc.boincg 750 |
ADJUST YOUR HOSTS FILE TO REFLECT YOUR COMPUTER NAME TO THE BOINC SERVERS
You Can skip this section if you want. This is just a minor issue seen with BOINC version 5.8.xx. You may want to adjust your /etc/hosts file so that BOINC reports back the name you expect. Some /etc/hosts files have local as the first name in a list of names. Move your expected computer name to the front of this list. You will need to change this in su mode.
1. 2. 3. 4. |
|
Here is an example before you edit the file:
127.0.0.1 localhost genesis GENESIS |
| This is after you move your computer name to the front: |
127.0.0.1 genesis localhost GENESIS |
SWITCH TO USER BOINC AND GO GET THE LATEST BOINC
At this point, you are ready to get the files needed. Log out of your user account and log into the BOINC user account. Once you have logged into your computer's BOINC user account, open up an Internet web browser and Download the latest stable BOINC file to your DeskTop or your ~ ( /home/boinc/ ) directory.
RUN THE SCRIPT, EDIT SOME SETTINGS
The latest version of BOINC at the time this How-To was written was version 5.8.16, so this How-To will use 5.8.16 for the following steps. In this section, you will change to directory /opt and build the BOINC directory and files, then set group permissions to boincg.
1. 2. 3. 4. 5. 6. 7. 8. 9. 10. 11. 12. 13. 14. 15. 16. 17. |
|
This will create a directory named BOINC/ with the following files of interest:
| boinc | BOINC core client. This program will be run as a daemon using a start-up script supplied later. |
| boincmgr | BOINC manager. This program manages the client program, shows stats and is used for choosing projects. It is best to run this using the run_manager script. |
| run_client | A script that cd's into the BOINC directory and runs the core client. This script should be renamed to run_client.sh if you want Konqueror to automatically recognize it as a script, but since this How-to will setup your computer to start BOINC on power-up, this script is not really needed then (we will not modify it or rename it). |
| run_manager | A script that cd's into the BOINC directory and runs the manager. This script should be renamed to run_manager.sh so that Konqueror can automatically recognize it as a script. Then it will be edited using Kwrite. |
#!/bin/sh cd "/opt/BOINC" && exec ./boincmgr $@ |
GET THE INIT SCRIPT, EDIT BOINC SCRIPT IF NECESSARY
If you want BOINC to automatically start when your computer is turned-on, you will need an init daemon script such as this one. Download this script file, or copy this script below. If you are not using Mandriva, you may want to use a more generic script and edit it to match your setup, for example, use this one Eric Meyer's Script.
If you prefer to copy and paste to a script called boinc then copy the listing below.
#!/bin/sh
#
# BOINC - start and stop the BOINC client daemon on Unix
#
# Unix start/stop script to run the BOINC client as a daemon at
# system startup, as the 'boinc' user (not root!).
#
# This version works on Red Hat Linux, Fedora Core, Mandriva,
# and Slackware Linux, and should work on generic Linux systems
# provided they have 'pidof'. Metadata for chkconfig and the SUSE
# equivalent INIT info are included below.
#
# Usage: boinc { start | stop | restart | status }
#
####
# chkconfig: 345 98 03
# description: This script starts the local BOINC client as a daemon \
# BOINC lets you donate your idle computer time to science \
# projects like SETI@home, Climateprediction.net, Rosetta@home, \
# World Community Grid, and many others. \
# For more info about BOINC (the Berkeley Open Infrastructure \
# for Network Computing) see http://boinc.ssl.berkeley.edu
# processname: boinc
# config: /etc/sysconfig/boinc
#
### BEGIN INIT INFO
# Provides: boinc
# Required-Start: $network
# Required-Stop: $network
# Default-Start: 3 4 5
# Default-Stop: 0 1 2 6
# Short-Description: BOINC client daemon initialization script
# Description: This script starts the local BOINC client as a daemon \
# BOINC lets you donate your idle computer time to science \
# projects like SETI@home, Climateprediction.net, Rosetta@home, \
# World Community Grid, and many others. \
# For more info about BOINC (the Berkeley Open Infrastructure \
# for Network Computing) see http://boinc.ssl.berkeley.edu
### END INIT INFO
#
# Eric Myers |
INSERT THE BOINC SCRIPT IN THE INIT.D DIRECTORY, SET SERVICE
Save the file above in directory /etc/init.d as file boinc. The steps below assume you downloaded the file to your desktop.
1. 2. 3. 4. 5. 6. 7. 8. |
|
[root@genesis boinc]# chkconfig --level 345 boinc on [root@genesis boinc]# chkconfig --list boinc boinc 0:off 1:off 2:off 3:on 4:on 5:on 6:off [root@genesis boinc]# ls -l /etc/rc[0-6].d/*boinc* lrwxrwxrwx 1 root root 15 Sep 30 12:00 /etc/rc0.d/K03boinc -> ../init.d/boinc* lrwxrwxrwx 1 root root 15 Sep 30 12:00 /etc/rc1.d/K03boinc -> ../init.d/boinc* lrwxrwxrwx 1 root root 15 Sep 30 12:00 /etc/rc2.d/K03boinc -> ../init.d/boinc* lrwxrwxrwx 1 root root 15 Sep 30 12:00 /etc/rc3.d/S98boinc -> ../init.d/boinc* lrwxrwxrwx 1 root root 15 Sep 30 12:00 /etc/rc4.d/S98boinc -> ../init.d/boinc* lrwxrwxrwx 1 root root 15 Sep 30 12:00 /etc/rc5.d/S98boinc -> ../init.d/boinc* lrwxrwxrwx 1 root root 15 Sep 30 12:00 /etc/rc6.d/K03boinc -> ../init.d/boinc* |
OPTIONAL CHECK, STOP THE COMPUTER, RESTART, VERIFY BOINC STARTS
If you want to verify that BOINC actually starts when your computer is turned on, exit, shutdown the computer, restart, enter the boinc user account and do a check.
1. 2. 3. 4. |
|
TIME TO ADD PROJECTS FOR BOINC TO WORK ON
If you have done the previous steps and encountered no problems, then at this point, you know that the BOINC client program daemon is working fine and will start as soon as your computer is turned on. You do not need to log in and start it each time because it is automatic now. It is running as user boinc and that it is running in directory /opt/BOINC.
Time to add projects to work on because the default install has no work to do yet. Log into the BOINC user account and start the BOINC manager which you placed on the Desktop (in one of the earlier steps). Click on the Desktop boinc.sh shortcut link to launch the BOINC manager. From this point onwards (version 5.8.16 and better is easy to follow), follow the prompts and begin adding whichever projects you prefer to work on. Here is a List of BOINC Projects.
Once you are done adding all the projects you wish to work with, it is worth suggesting to you that you should set BOINC to run at 100% since there are lots of programs that may confuse BOINC into waiting for other programs to finish. The "nice" level is quite low and this low nice value makes it so almost every process on your computer will have a higher priority than BOINC and therefore BOINC should not slow down your computer for what you usually do, whether this is your computer, file server, or whatever this computer is used for. In summary, you really shouldn't notice that BOINC is running at all. If you want to check it out, use the top command to see it run (below is an example which shows an idle computer busy working at Einstein@home. You'll notice the Nice value of 19 for Einstein which allows almost every other program to have higher priority):
|
Once you have finished working with the BOINC manager, exit, then log-out of the boinc user account completely since you no longer need to be here. Go back to your normal user account. Boinc is now working during idle time and will start up on boot up.
If you need to adjust anything in BOINC, just log into the boinc user account and click on the DeskTop shortcut, do what you need to do and then log out again.
Many of the steps done above could be skipped and are somewhat towards setting BOINC with group access, but BOINC is not quite yet shareable yet since this version (5.8.16) of BOINC is not quite multi-user ready yet, but it is getting very close. If you find what is needed to allow other group users to watch BOINC without affecting BOINC's operation, please send a comment. Thanks.
You are Done.
If you find this HowTo useful, see some errors, corrections, or improvements that can be added, please send them. Thanks.
| Links To Sections Of This BOINC How To | |||
| Top Of Page | Some Suggestions | Create BOINC and Groups | Boinc At MSEC 4 |
| Adjust HOSTS File | Download BOINC | Run And Edit | Get BOINC Daemon |
| Add BOINC To Init.d | Reset Computer Test | Add Projects | Comments |
| Other Web Pages | ||||
| Home Page | Backup With Tar | Disk Image Backup | Ship Arcade | PicDis Disassembler |