Linux - GeneralThis Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I want to have BOINC start when I boot my machine where would i have to put reference to the boinc shell script for it to do this? I mean I want this to start even before the x server starts. so if i'm not logged in, it can still run.
Originally posted by purelithium I want to have BOINC start when I boot my machine where would i have to put reference to the boinc shell script for it to do this? I mean I want this to start even before the x server starts. so if i'm not logged in, it can still run.
the path to my boinc file is
/home/gelan/pgms/BOINC/
do I have to put a symlink somewhere?
I'm really not sure how to go about this.
What I did was create a user "boinc" and have the process run as that user. Do not allow BOINC to run as root. I did what it says to do on this page to get BOINC to start at boot: http://www.spy-hill.com/~myers/help/boinc/unix.html
There are a couple of modifications you may have to make with your daemon script to get it to start as a service. Post back if this does not work for you.
Now, you will need to edit these to fit your needs if you didn't do it exactly like he said in that article. For example, if your boinc directory is like mine it's in /home/boinc, not /var/lib/boinc. You should therefore change that line to read: BOINCDIR=/home/boinc You will also need to rename your boinc executable to whatever it says in this BOINCEXE line. I named mine "boinc", so that line in mine looks like this: BOINCEXE=/home/boinc/boinc
Now once you have it edited you need to put it where it says to put it (/etc/rc.d/init.d) and make sure you saved it as "boinc" and make sure you make it executable (chmod a+x boinc).
Also make sure you chmod your boinc executables to make them executable. Make sure you do this so it will add boinc as a service:
chkconfig --add boinc
Also, you need to make sure you change the permissions on your /home/boinc directory and all files within to give you (not just root) permissions. do this by cd'ing into /home/boinc and then do this (as root):
chown boinc:users *
if there are any folders in the /home/boinc directory make sure you change the permissions on them also.
Now you should be able to start the boinc service with "service boinc start"
You can stop it with "service boinc stop", and if you want to restart you can do a "service boinc restart".
can you start boinc as root? su to root and then cd to the /home/boinc directory (or wherever boinc's home is) and do this:
Code:
./boinc &
see if it starts. You will have to do a ps -aux and see if it starts. If so, then the executable is not your problem, and you can try changing this: BOINCUSER=root and see if "service boinc start" will work then. If so, then permissions are your problem. I am certain we can get this working - just takes a liitle troubleshooting.
Originally posted by purelithium changing the BOINCUSER to root allows me to start the service now, but It doesn't seem like it's actually computing anything.
Why don't I want to do this? Why is it bad to run this as root?
Well, just in theory you can, but in general it's probably not the best idea to have any process that does not need to be run as root running as root. This one should not need to be run as root.
OK this sounds like a permissions problem to me. Check to make sure your boinc directory and EVERYTHING in there is owned by boinc. Do this as follows:
Code:
ls -l
you should not see root anywhere on the output. if you do see root, do this:
Code:
chown boinc:user *
then do ls -l again and see if everything is owned by boinc. The reason for this is that the user boinc cannot run things owned by root.
Are you running SETI? If so, you will have a /home/boinc/projects directory as well. You must change the ownership of that as well as everything in it to boinc as well, using the same procedure. Also, did you connect to a project? If you didn't, you won't be computing anything for sure.
excellent! it works as the boinc user now, but I'm still not seeing it using any CPU power... i open ksysguard and look at the boinc process, and it doesn't use any cpu power. but before, when I ran it inside my normal user account, I would see it using almost all of the CPU power.
I am attached to the setiathome project, and i made sure it was attached by running the boinc mgr as the webpage you linked to told me to.
and you should see 2 things running as boinc. you should see the actual boinc program itself, and you should see the setiathome program. They should both be running as boincuser. Are they both running, or is only one running?
Originally posted by purelithium Hopefully all this will help someone else in the future, eh?
Maybe. I continue to be amazed at the seemingly non-existant population of BOINC users that read this forum. As popular as it is, there is relatively little talk about it here.
On a related note, are you using optimized clients?
That's true, I expected to find a lot more information on here about the boinc clients!
No, I couldn't get the AMD 64 client to work at all. I'm using the general x86 linux client. I just don't feel like i'm getting the most out of my AMD dual core...
Last edited by purelithium; 11-18-2005 at 08:45 PM.
Can't really help with the AMD stuff ... wish I could.
There is one more thing I forgot to mention. If your computer gets shut down improperly (power failure), BOINC will not restart as you'd expect. This is due to the presence of a lockfile that prevents it. The lockfile gets created when the service is started and deleted when it is stopped. When the power goes out, the lockfile does not get deleted. You can find it in your boinc directory. To get around this problem, you can edit that script as follows:
Code:
# Mandrake 10.1 really wants a lock file...
LOCKDIR=/var/lock/subsys
comment out the LOCKDIR so it doesn't create the lockfile:
Code:
# Mandrake 10.1 really wants a lock file...
# LOCKDIR=/var/lock/subsys
Then, you should edit these lines so that it won't ever look for a lockfile (just comment out):
Code:
cd $BOINCDIR
# if [ -f lockfile ] ; then
# echo -n "Another instance of BOINC is running (lockfile exists)."
# echo_failure
# echo
# exit 4
# fi
That's it, except for you not using the optimized clients, your setup is exactly like mine. You might find an optimized client here or here's a bunch of places to look here There are several, you should try a few - maybe one will work. Don't forget to try both the optimized seti client AND the optimized boinc client. Both can make a difference.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.