MMM
Page 1 of 2 12 LastLast
Results 1 to 25 of 36

Thread: Updating to latest Boinc on Berkely site, Linux

  1. #1
    Xtreme Cruncher
    Join Date
    Jan 2009
    Location
    Nashville
    Posts
    4,162

    Updating to latest Boinc on Berkely site, Linux

    I wanted to update Boinc to the latested stable one at Berkely so I could use the app_config.xml file as the latest Boinc from the Ubuntu repositories was 7.0.27 and I needed 7.0.40 at least to use it. While it is still fresh in my mind I thought I would document how I did it. I know D_A has given the directions to do it like this but I could not find it in the forums, so I thought it might be useful with the renewed interest in Linux thanks to MMs adventures.

    How To Open Terminal and Use The Command Line

    You can copy and paste the commands to a Terminal.
    Install Boinc from repositories, if not already installed. If it is installed skip this part. The reason to install from repositories first is it sets up Boinc to start at bootup, creates some symbolic links, installs config files and checks dependencies. The archive does none of this. We use the archive to update the binaries installed by the repository.

    Code:
    sudo app-get install boinc-client boinc-manager
    close Boinc Manager if open.

    Now stop boinc from running. When you installed it Boinc was started.

    Code:
    sudo service boinc-client stop
    Download latest Boinc from Berkely to your $HOME directory. $HOME is the system variable for /home/username/. It is best to download to your $HOME directory so you have Read, Write and Execute permission.

    You can download using a web browser or you can use the command line if you are not using a desktop.

    Type cd and hit enter.
    Code:
    cd
    wget http://boinc.berkeley.edu/dl/boinc_7.2.28_x86_64-pc-linux-gnu.sh
    Change version number to one you wish to retrieve.

    cd and hitting enter, will put you in your home directory


    NOTE: you do not have to type the entire file name. Type boinc_ and hit tab, it should finish the filename for you. If not type more of the name and hit tab until it does.

    Change file permissions to executable.
    Code:
    sudo chmod a+x  boinc_7.0.65_x86_64-pc-linux-gnu.sh
    or what version you downloaded

    Run file to unpack.
    Code:
    sudo sh  boinc_7.0.65_x86_64-pc-linux-gnu.sh
    again substitute the name of the file you downloaded


    now cd BOINC the directory name should be all caps.

    Code:
    cd BOINC
    Copy boinc, boinccmd and boincmgr to over write the older version of boinc.
    Code:
    sudo cp boinc* /usr/bin/
    
    Start boinc-client.
    Code:
    sudo service boinc-client start
    This worked for me on Ubuntu updating 7.0.27 to 7.0.65. I have not used Mint but from what I know about it it should work there as well.

    Some of the actions above can be accomplished with variances in what I used. This is what worked me. Please feel free to correct or add to this.

    Yes Linux can make you feel stupid. You are not alone if you get to feeling that way when it does not do what you expect or gives an error that makes no sense to you. Enter as much info as you can here there are several experienced Linux people here, one of us will figure it out.

    To install 7.2.28 from archive it is the same just use that version number.

    Here is how to install 7.0.65 from repositories using ubuntu-backports.


    ++++++++++++++++++++++++++++++++++++++++++++++++++ ++++++++++++++++++++++++++++++++++++++++++++++++++ ++++++++++++++++++++++++

    If you installed boinc from the archives downloaded from Berkely and have been running boinc from $HOME/BOINC and want to use the benefits of the install from the repositories and not loose your current work here is how to do it.

    Stop boinc: close boinc-manager and stop boinc-client.

    Code:
    sudo boinccmd --quit
    Install from repositories.
    Code:
    sudo apt-get install boinc-client boinc-manager
    if you do not want to run the manager leave that part out. It does not matter which version is installed by this.

    The install process will start boinc-client when it is finished. Stop it.

    Code:
    sudo service boinc-client stop
    If you want to use the binaries from your $HOME/BOINC install then: ~/ is another variable for your home directory.

    Code:
    sudo cp ~/BOINC/boinc* /usr/bin/
    Then change to the boinc install in your home directory.
    Code:
    cd ~/BOINC

    Now become superuser or root.

    Code:
    sudo -s
    Present Working Directory.
    Code:
    pwd
    make sure it shows you in BOINC. /home/username/BOINC

    copy recursively the projects folder or directory from ~/BOINC to /var/lib/boinc-client, over writing any thing there.
    Code:
    cp -r projects /var/lib/boinc-client/

    Code:
    cd /var/lib/boinc-client
    Change ownership of all files and directories recursively in projects directory to user boinc in group boinc
    Code:
    chown -R boinc:boinc projects
    Leave superuser mode.
    Code:
    exit
    Start boinc-client
    Code:
    sudo service boinc-client start
    If you see some errors do not panic. Hit the UP ARROW key and hit ENTER. Open boinc-manager or a terminal window and top. Work units should show running with no work lost.

    If you screw up, everything in $HOME/BOINC should still be there so just start over. If you need to start from the very beginning just:

    Code:
    sudo apt-get purge boinc-client boinc-manager
    You really should not need to remove the install. Nothing we did should effect the current work units. You can also use copy and paste to reduce typing errors.
    --------------------------------------------------------------------------------------------------

    If for some reason you want to run the projects work units from $HOME/BOINC but use the scripts that are installed by the repositories that start boinc on bootup there are instructions here.
    ================================

    To stop Update Managers from updating your boinc install on Ubuntu, Mint and other Debian based distros.

    ================================


    Many thanks to OldChap and D_A for suggestions and error checking.
    Last edited by PoppaGeek; 12-01-2013 at 08:18 AM.

  2. #2
    Xtreme crazy bastid
    Join Date
    Apr 2007
    Location
    On mah murder-sickle!
    Posts
    5,878
    I would add only one thing at the end of the procedure:

    sudo service boinc-client start

    [SIGPIC][/SIGPIC]

  3. #3
    Xtreme crazy bastid
    Join Date
    Apr 2007
    Location
    On mah murder-sickle!
    Posts
    5,878
    If for some reason anyone does this and boinc or the manager won't run, open a terminal and type
    Code:
    ldd boinc
    or
    Code:
    ldd boincmgr
    This will identify what libraries are required for your installed boinc version and what you do or do not have on your system and will make fault finding a lot faster.

    [SIGPIC][/SIGPIC]

  4. #4
    Xtreme Legend
    Join Date
    Mar 2008
    Location
    Plymouth (UK)
    Posts
    5,279
    Thanks to you both.

    I expect the one you were talking about Poppa was at http://www.xtremesystems.org/forums/...d-forget/page5 or thereabouts

    Good timing For SCW


    My Biggest Fear Is When I die, My Wife Sells All My Stuff For What I Told Her I Paid For It.
    79 SB threads and 32 IB Threads across 4 rigs 111 threads Crunching!!

  5. #5
    Xtreme Cruncher
    Join Date
    Jan 2009
    Location
    Nashville
    Posts
    4,162
    @ D_A thanks added

    @ OC yes that looks like the one. I like how he did it, a little less typing. Changed.

  6. #6
    Xtreme Cruncher
    Join Date
    Jan 2009
    Location
    Nashville
    Posts
    4,162
    Something OC said in a PM got me thinking. I used to compile kernels before Linux and FreeBSD supplied generic kernels that supported SMP. While enabling SMP I would strip out support for hardware and services I did not have or use. This made for a smaller kernel.

    Anyone ever try this on a cruncher and compare before and after, same hardware generic kernel vs custom complied? It's been a few years but I may try it if no one else has. Be interesting to see if there would be a performance gain. I doubt it would be significant but might be interesting just the same.

  7. #7
    Xtreme crazy bastid
    Join Date
    Apr 2007
    Location
    On mah murder-sickle!
    Posts
    5,878
    Quote Originally Posted by PoppaGeek View Post
    Something OC said in a PM got me thinking. I used to compile kernels before Linux and FreeBSD supplied generic kernels that supported SMP. While enabling SMP I would strip out support for hardware and services I did not have or use. This made for a smaller kernel.

    Anyone ever try this on a cruncher and compare before and after, same hardware generic kernel vs custom complied? It's been a few years but I may try it if no one else has. Be interesting to see if there would be a performance gain. I doubt it would be significant but might be interesting just the same.
    Yes. Currently I have three Sossaman machines under my desk. Two with generic "server" kernels (PAE enabled but no other significant changes) and one with a custom kernel I did myself (heavily customised). The custom kernel is SLIGHTLY more efficient than the generic, but it's not by much.

    [SIGPIC][/SIGPIC]

  8. #8
    Xtreme Member
    Join Date
    Jun 2010
    Location
    Crab Nebula
    Posts
    493
    Question for ya D_A. I had boinc installed on mint that had a HDD failure. I managed to get the boinc data directory off the drive before it quit. I did a fresh install on another machine and tried to use the old data directory on the new install but boinc won't start. When I try to run the boinc manager a gedit window opens with the text below in the window. Is there any way to fix that this so I can use the old boinc data directory on the new install. I swap them on windows all the time but this is my first attempt on Linux. Thanks.

    cd "/home/david/BOINC" && exec ./boincmgr $@



    You'll never know what you're living for until you know what you're willing to die for.

  9. #9
    Xtreme crazy bastid
    Join Date
    Apr 2007
    Location
    On mah murder-sickle!
    Posts
    5,878
    chmod +x run_manager
    chmod +x run_client

    Your script on the new install doesn't have execute permission.

    edit: sometimes double clicking on the script will do that regardless of the execute permissions. Try opening a console in your BOINC folder (or cd'ing to it in an open terminal) and entering ./run_manager and see if it works.
    Last edited by D_A; 11-03-2013 at 01:18 AM.

    [SIGPIC][/SIGPIC]

  10. #10
    Xtreme Cruncher
    Join Date
    Jan 2009
    Location
    Nashville
    Posts
    4,162
    TO try and explain what we are trying to do here:

    By installing from the repositories we are setting up Boinc to run at bootup, automatically. The archive you download from Berkely does NOT do this. But the Berkely one will always be the latest version. So we download the one from there and copy the newest binaries over the older ones. You still have all the startup files, which are not version specific and the newest binaries.

    The ONLY files you should be concerned about from the Berkely archive are the boinc, boinccmd and boincmgr.

    The repositories will install from a package that sets up all startup files and sets permissions ans creates directories.

    The archive from Berkely are the minimal needed files to run boinc from the command line, not automatically, from wherever you unpack the archive.
    Last edited by PoppaGeek; 11-03-2013 at 05:49 AM.

  11. #11
    Xtreme Legend
    Join Date
    Mar 2008
    Location
    Plymouth (UK)
    Posts
    5,279
    So, for folks like me who didn't quite get it back along about getting the original from the repositories, is there a chance to rescue the situation and keep the current stats but also get it to auto start?

    I, for example, have everything(?) installed in the BOINC folder. I will need to move or delete some stuff then start afresh I guess.... whaddaya think?


    My Biggest Fear Is When I die, My Wife Sells All My Stuff For What I Told Her I Paid For It.
    79 SB threads and 32 IB Threads across 4 rigs 111 threads Crunching!!

  12. #12
    Xtreme Member
    Join Date
    May 2007
    Location
    The Netherlands
    Posts
    935
    Can we have a list of where all the boinc files are installed from the repositories? The files are all over the place. I think it was DA that once said they where spread like hippo manure.

  13. #13
    Xtreme Cruncher
    Join Date
    Jan 2009
    Location
    Nashville
    Posts
    4,162
    I upgraded 3 Ubuntu boxes yesterday using the above method. All picked up where the old version was. All tasks were restarted and finished.

    Startup scripts and config files are in /etc/boinc-client

    binaries are in /usr/bin

    work units, app_config.xml etc are all in /var/lib/boinc-client and /var/lib/boinc-client/projects


    Libraries are all in /usr/lib/x86_64-linux-gnu and to me at a glance are all shared. The download from Berkley does not contain or include any libraries so they must all be shared.


    @OC if you install from repositories copy all files in $HOME/BOINC/projects to /var/lib/boinc-client/projects

    If you get permission errors even using sudo you can sudo -s but be careful and double think about what you are doing and typing. Type exit as soon as you get done.
    Last edited by PoppaGeek; 11-03-2013 at 06:28 AM.

  14. #14
    Xtreme Cruncher
    Join Date
    Jan 2009
    Location
    Nashville
    Posts
    4,162
    poppageek@8356x2deb:/etc/boinc-client$
    drwxr-xr-x 2 root root 4096 Oct 20 11:24 .
    drwxr-xr-x 101 root root 4096 Nov 2 22:04 ..
    -rw-r--r-- 1 root boinc 531 Oct 20 11:22 cc_config.xml
    -rw-rw-r-- 1 root boinc 1498 Oct 27 09:36 global_prefs_override.xml
    -rw-r----- 1 root boinc 1 May 25 2012 gui_rpc_auth.cfg
    -rw-r--r-- 1 root boinc 295 Jul 11 14:53 remote_hosts.cfg

    ------------------------------------------------------------

    poppageek@8356x2deb:/var/lib/boinc-client$ ls -al
    total 4420
    drwxr-xr-x 5 boinc boinc 4096 Nov 3 08:36 .
    drwxr-xr-x 38 root root 4096 Jul 12 19:04 ..
    -rw-r--r-- 1 boinc boinc 4724 Nov 2 17:16 account_www.worldcommunitygrid.org.xml
    -rw-r--r-- 1 boinc boinc 46927 Nov 2 16:26 all_projects_list.xml
    lrwxrwxrwx 1 root root 34 Jul 12 19:04 ca-bundle.crt -> /etc/ssl/certs/ca-certificates.crt
    lrwxrwxrwx 1 root root 31 Jul 12 19:04 cc_config.xml -> /etc/boinc-client/cc_config.xml
    -rw-r--r-- 1 boinc boinc 604649 Nov 3 08:35 client_state_prev.xml
    -rw-r--r-- 1 boinc boinc 604649 Nov 3 08:35 client_state.xml
    -rw-r--r-- 1 boinc boinc 10641 Nov 3 08:36 daily_xfer_history.xml
    -rw-r--r-- 1 boinc boinc 9675 Oct 23 08:32 get_current_version.xml
    -rw-r--r-- 1 boinc boinc 2046 Jul 12 19:04 get_project_config.xml
    lrwxrwxrwx 1 root root 43 Jul 12 19:04 global_prefs_override.xml -> /etc/boinc-client/global_prefs_override.xml
    -rw-r--r-- 1 boinc boinc 6418 Nov 2 16:52 global_prefs.xml
    lrwxrwxrwx 1 root root 34 Jul 12 19:04 gui_rpc_auth.cfg -> /etc/boinc-client/gui_rpc_auth.cfg
    -rw-r--r-- 1 boinc boinc 771120 Nov 3 08:35 job_log_www.worldcommunitygrid.org.txt
    -rw-r--r-- 1 boinc boinc 0 Nov 2 16:26 lockfile
    -rw-r--r-- 1 boinc boinc 142 Jul 12 19:05 lookup_account.xml
    -rw-r--r-- 1 boinc boinc 13106 Nov 2 16:26 lookup_website.html
    -rw-r--r-- 1 boinc boinc 41476 Jul 12 19:05 master_www.worldcommunitygrid.org.xml
    drwxrwx--x 2 boinc boinc 4096 Nov 2 16:26 notices
    drwxrwx--x 3 boinc boinc 4096 Oct 28 15:32 projects
    lrwxrwxrwx 1 root root 34 Jul 12 19:04 remote_hosts.cfg -> /etc/boinc-client/remote_hosts.cfg
    -rw-r--r-- 1 boinc boinc 36088 Nov 3 08:35 sched_reply_www.worldcommunitygrid.org.xml
    -rw-r--r-- 1 boinc boinc 47352 Nov 3 08:35 sched_request_www.worldcommunitygrid.org.xml
    drwxrwx--x 10 boinc boinc 4096 Nov 2 16:26 slots
    -rw-r--r-- 1 boinc boinc 10368 Nov 3 08:35 statistics_www.worldcommunitygrid.org.xml
    -rw-r--r-- 1 boinc boinc 24303 Oct 31 16:52 stderrdae.txt
    -rw-r--r-- 1 boinc boinc 2097180 Nov 2 03:23 stdoutdae.old
    -rw-r--r-- 1 boinc boinc 115084 Nov 3 08:35 stdoutdae.txt
    -rw-r--r-- 1 boinc boinc 2833 Nov 2 16:27 time_stats_log

    -------------------------------------------------------------

    ls: cannot open directory .: Permission denied
    poppageek@8356x2deb:/var/lib/boinc-client/projects$ sudo -s
    root@8356x2deb:/var/lib/boinc-client/projects# ls -al
    total 84
    drwxrwx--x 3 boinc boinc 4096 Nov 3 08:43 .
    drwxr-xr-x 5 boinc boinc 4096 Nov 3 08:36 ..
    drwxrwx--x 2 boinc boinc 73728 Nov 3 08:35 www.worldcommunitygrid.org


    -----------------------------------------------------------------

    root@8356x2deb:/usr/bin# ls -al boinc*
    -rwxr-xr-x 1 root root 934352 Nov 2 16:25 boinc
    -rwxr-xr-x 1 root root 261280 Nov 2 16:25 boinccmd
    -rwxr-xr-x 1 root root 1908528 Nov 2 16:25 boincmgr


    When you see something like this:

    lrwxrwxrwx 1 root root 34 Jul 12 19:04 ca-bundle.crt -> /etc/ssl/certs/ca-certificates.crt

    it is a link. The actual file is in /etc/ssl/certs/ca-certificates.crt

    EDIT:
    Startup script called by init
    /etc/init.d/boinc-client
    Last edited by PoppaGeek; 11-03-2013 at 12:33 PM.

  15. #15
    Xtreme Member
    Join Date
    Jun 2010
    Location
    Crab Nebula
    Posts
    493
    Quote Originally Posted by D_A View Post

    edit: sometimes double clicking on the script will do that regardless of the execute permissions. Try opening a console in your BOINC folder (or cd'ing to it in an open terminal) and entering ./run_manager and see if it works.
    I get permission denied. I tried sudo ./run_manager and still permission denied.



    You'll never know what you're living for until you know what you're willing to die for.

  16. #16
    Xtreme crazy bastid
    Join Date
    Apr 2007
    Location
    On mah murder-sickle!
    Posts
    5,878
    Quote Originally Posted by nanoprobe View Post
    I get permission denied. I tried sudo ./run_manager and still permission denied.
    Ok, check the file permissions and ownership. If it belongs to another user, such as root, you could well not be able to run it, and if it doesn't have execute permission you won't be able to run it. Make sure both the scripty (run_manager) and the binary file (boincmgr) both have execute permission.

    sudo chown <username> <filename>
    chmod +x <filename>

    [SIGPIC][/SIGPIC]

  17. #17
    Xtreme Cruncher
    Join Date
    Jan 2009
    Location
    Nashville
    Posts
    4,162
    Forgot the statup script so added it to list of file locations.

  18. #18
    Xtreme Cruncher
    Join Date
    Jan 2009
    Location
    Nashville
    Posts
    4,162
    Someone asked for a list of all the files the boinc_X.X.X.deb file installs. I am looking to see how hard it is to build debian/Ubuntu packages and here is the list of files installed by apt-get:

    /.
    /etc
    /etc/bash_completion.d
    /etc/bash_completion.d/boinc
    /etc/boinc-client
    /etc/boinc-client/cc_config.xml
    /etc/boinc-client/global_prefs_override.xml
    /etc/boinc-client/gui_rpc_auth.cfg
    /etc/boinc-client/remote_hosts.cfg
    /etc/default
    /etc/default/boinc-client
    /etc/init.d
    /etc/init.d/boinc-client
    /lib
    /lib/udev
    /lib/udev/rules.d
    /lib/udev/rules.d/40-boinc-client.rules
    /usr
    /usr/bin
    /usr/bin/boinc
    /usr/bin/boinccmd
    /usr/bin/update-boinc-applinks
    /usr/lib
    /usr/lib/boinc-client
    /usr/lib/boinc-client/switcher
    /usr/share
    /usr/share/boinc-client
    /usr/share/boinc-client/udev-cpu_share
    /usr/share/bug
    /usr/share/bug/boinc-client
    /usr/share/bug/boinc-client/script
    /usr/share/doc
    /usr/share/doc/boinc-client
    /usr/share/doc/boinc-client/NEWS.Debian.gz
    /usr/share/doc/boinc-client/README.Debian.gz
    /usr/share/doc/boinc-client/changelog.Debian.gz
    /usr/share/doc/boinc-client/checkin_notes.gz
    /usr/share/doc/boinc-client/copyright
    /usr/share/doc/boinc-client/examples
    /usr/share/doc/boinc-client/examples/move-boinc-dir.sh
    /usr/share/lintian
    /usr/share/lintian/overrides
    /usr/share/lintian/overrides/boinc-client
    /usr/share/locale
    /usr/share/locale/ar
    /usr/share/locale/ar/BOINC-Client.mo
    /usr/share/locale/be
    /usr/share/locale/be/BOINC-Client.mo
    /usr/share/locale/bg
    /usr/share/locale/bg/BOINC-Client.mo
    /usr/share/locale/ca
    /usr/share/locale/ca/BOINC-Client.mo
    /usr/share/locale/cs
    /usr/share/locale/cs/BOINC-Client.mo
    /usr/share/locale/cy
    /usr/share/locale/cy/BOINC-Client.mo
    /usr/share/locale/da
    /usr/share/locale/da/BOINC-Client.mo
    /usr/share/locale/de
    /usr/share/locale/de/BOINC-Client.mo
    /usr/share/locale/el
    /usr/share/locale/el/BOINC-Client.mo
    /usr/share/locale/es
    /usr/share/locale/es/BOINC-Client.mo
    /usr/share/locale/fa
    /usr/share/locale/fa/BOINC-Client.mo
    /usr/share/locale/fi
    /usr/share/locale/fi/BOINC-Client.mo
    /usr/share/locale/fr
    /usr/share/locale/fr/BOINC-Client.mo
    /usr/share/locale/gl
    /usr/share/locale/gl/BOINC-Client.mo
    /usr/share/locale/hr
    /usr/share/locale/hr/BOINC-Client.mo
    /usr/share/locale/hu
    /usr/share/locale/hu/BOINC-Client.mo
    /usr/share/locale/it
    /usr/share/locale/it/BOINC-Client.mo
    /usr/share/locale/ja
    /usr/share/locale/ja/BOINC-Client.mo
    /usr/share/locale/ko
    /usr/share/locale/ko/BOINC-Client.mo
    /usr/share/locale/lt
    /usr/share/locale/lt/BOINC-Client.mo
    /usr/share/locale/lv
    /usr/share/locale/lv/BOINC-Client.mo
    /usr/share/locale/nb
    /usr/share/locale/nb/BOINC-Client.mo
    /usr/share/locale/nl
    /usr/share/locale/nl/BOINC-Client.mo
    /usr/share/locale/nn
    /usr/share/locale/nn/BOINC-Client.mo
    /usr/share/locale/pl
    /usr/share/locale/pl/BOINC-Client.mo
    /usr/share/locale/pt_BR
    /usr/share/locale/pt_BR/BOINC-Client.mo
    /usr/share/locale/pt_PT
    /usr/share/locale/pt_PT/BOINC-Client.mo
    /usr/share/locale/ro
    /usr/share/locale/ro/BOINC-Client.mo
    /usr/share/locale/ru
    /usr/share/locale/ru/BOINC-Client.mo
    /usr/share/locale/sk
    /usr/share/locale/sk/BOINC-Client.mo
    /usr/share/locale/sl
    /usr/share/locale/sl/BOINC-Client.mo
    /usr/share/locale/sv_SE
    /usr/share/locale/sv_SE/BOINC-Client.mo
    /usr/share/locale/tr
    /usr/share/locale/tr/BOINC-Client.mo
    /usr/share/locale/uk
    /usr/share/locale/uk/BOINC-Client.mo
    /usr/share/locale/zh_CN
    /usr/share/locale/zh_CN/BOINC-Client.mo
    /usr/share/locale/zh_TW
    /usr/share/locale/zh_TW/BOINC-Client.mo
    /usr/share/man
    /usr/share/man/man1
    /usr/share/man/man1/boinc.1.gz
    /usr/share/man/man1/boinccmd.1.gz
    /usr/share/man/man1/update-boinc-applinks.1.gz

    Good reason to install the debian package first then update via Berkely download.

    It also checks dependencies, sets environment varibles and scheduling/startup scripts.
    Last edited by PoppaGeek; 11-08-2013 at 04:31 PM.

  19. #19
    Xtreme Cruncher
    Join Date
    Jan 2009
    Location
    Nashville
    Posts
    4,162
    While poking around in the Ubuntu Software Center on the Boinc page there is a drop down above the screenshot of Boinc and it lists a backport for v7.0.65+dfsg(precise-backports). In other words version 7.0.65.

    If you do not see backports:

  20. #20
    Xtreme Cruncher
    Join Date
    Jan 2009
    Location
    Nashville
    Posts
    4,162
    I just installed version 7.2.28 and it is running fine. Picked up all work units that were under way.

    Sometimes when restarting boinc-client after upgrading i get error messages. I just hit up arrow key and enter, same command as before and it runs fine.

    poppageek@ghostN ~/Downloads/BOINC $ sudo cp boinc* /usr/bin
    poppageek@ghostN ~/Downloads/BOINC $ sudo service boinc-client start
    * Starting BOINC core client: boinc [ OK ]
    * Setting up scheduling for BOINC core client and children: chrt: failed to set pid 22085's policy: No such process
    chrt: failed to set pid 22085's policy: No such process
    chrt: failed to set pid 22085's policy: No such process
    Could not write to /proc/22085/oom_adj

    [ OK ]
    poppageek@ghostN ~/Downloads/BOINC $ sudo service boinc-client start
    * Starting BOINC core client: boinc [ OK ]
    * Setting up scheduling for BOINC core client and children: [ OK ]
    Don't know what is going here yet but there are no errors on work units

    poppageek@ghostN ~/Downloads/BOINC $ boinccmd -V
    boinccmd, built from BOINC 7.2.28
    EDIT:
    From what I can tell boinc did not find the PID, Process ID it thought it would. No biggie. Just try again.
    Last edited by PoppaGeek; 11-15-2013 at 03:10 PM.

  21. #21
    Xtreme Cruncher
    Join Date
    Jan 2009
    Location
    Nashville
    Posts
    4,162
    I added a section to the first post on how to move current work from a archive install to a repositories install. Advise of errors plz.

  22. #22
    Xtreme crazy bastid
    Join Date
    Apr 2007
    Location
    On mah murder-sickle!
    Posts
    5,878
    I just looked into what's required to get the latest Folding @ Home client running on my Slackware system.



    By comparison all this jiggery pokery with BOINC is absolute child's play!

    [SIGPIC][/SIGPIC]

  23. #23
    Xtreme Cruncher
    Join Date
    Jan 2009
    Location
    Nashville
    Posts
    4,162
    This works but there is a gotcha. Permissions and file ownership.

    I do not want to further complicate all this but I found another way to use the advantages of repository install and what you have in $HOME/BOINC.

    If you install from the repositories /etc/default/boinc-client will be installed. As seen below there is a setting for the data directory.

    /etc/default/boinc-client
    Code:
     
    # This file is /etc/default/boinc-client, it is a configuration file for the
    # /etc/init.d/boinc-client init script.
    
    # Set this to 1 to enable and to 0 to disable the init script.
    ENABLED="1"
    
    # Set this to 1 to enable advanced scheduling of the BOINC core client and
    # all its sub-processes (reduces the impact of BOINC on the system's
    # performance).
    SCHEDULE="1"
    
    # The BOINC core client will be started with the permissions of this user.
    BOINC_USER="boinc"
    
    # This is the data directory of the BOINC core client.
    BOINC_DIR="/var/lib/boinc-client"
    
    # This is the location of the BOINC core client, that the init script uses.
    # If you do not want to use the client program provided by the boinc-client
    # package, you can specify here an alternative client program.
    #BOINC_CLIENT="/usr/local/bin/boinc"
    BOINC_CLIENT="/usr/bin/boinc"
    
    # Here you can specify additional options to pass to the BOINC core client.
    # Type 'boinc --help' or 'man boinc' for a full summary of allowed options.
    #BOINC_OPTS="--allow_remote_gui_rpc"
    BOINC_OPTS=""
    You could change these to point to your install in the home directory. /home/yourusername/BOINC

    So Boinc will start on boot and use the work units in the home directory from the archive install.


    So for me it would look like this:

    /etc/default/boinc-client
    Code:
     
    # This file is /etc/default/boinc-client, it is a configuration file for the
    # /etc/init.d/boinc-client init script.
    
    # Set this to 1 to enable and to 0 to disable the init script.
    ENABLED="1"
    
    # Set this to 1 to enable advanced scheduling of the BOINC core client and
    # all its sub-processes (reduces the impact of BOINC on the system's
    # performance).
    SCHEDULE="1"
    
    # The BOINC core client will be started with the permissions of this user.
    BOINC_USER="boinc"
    
    # This is the data directory of the BOINC core client.
    BOINC_DIR="/home/poppageek/BOINC"
    
    # This is the location of the BOINC core client, that the init script uses.
    # If you do not want to use the client program provided by the boinc-client
    # package, you can specify here an alternative client program.
    #BOINC_CLIENT="/usr/local/bin/boinc"
    BOINC_CLIENT="/usr/bin/boinc"
    
    # Here you can specify additional options to pass to the BOINC core client.
    # Type 'boinc --help' or 'man boinc' for a full summary of allowed options.
    #BOINC_OPTS="--allow_remote_gui_rpc"
    BOINC_OPTS=""
    You HAVE TO HAVE a full install from the repositories. This script is used by another script /etc/init.d/boinc-client and alone will do nothing.

    The install from repositories sets boinc-client to run as user boinc. Since you are probably running boinc from $HOME/BOINC you are most likely running as your login name. So you will need to change ownership of the BOINC directory to boinc.

    Stop Boinc-client

    Code:
    sudo boinccmd --quit
    Edit /etc/default/boinc-client and change BOINC_DIR="/var/lib/boinc-client" to BOINC_DIR="/home/YOURUSERNAME/BOINC"

    You can change the BOINC_USER="boinc" to your username or you can change the ownership of the BOINC directory and all it's files.

    Change owner to boinc.
    Code:
    cd
    sudo chown -R boinc:boinc BOINC
    And leave the setting in the /etc/defaults/boinc-client file BOINC_CLIENT=/usr/bin/boinc.

    Copy boinc, boincmd and boincmgr to /usr/bin.
    Code:
    cd ~/BOINC
    sudo cp boinc* /usr/bin/
    If you have done it all correctly then this should work.

    Code:
    sudo service boinc-client start
    If I am not being clear plz speak up.

    Yes, jiggery and pokery, that's it.
    Last edited by PoppaGeek; 11-19-2013 at 06:46 PM.

  24. #24
    Xtreme Cruncher
    Join Date
    Jan 2009
    Location
    Nashville
    Posts
    4,162
    Here is the script that starts boinc-client on bootup. As you can see it does a lot. I have considered editing it down to just being a startup script and someone may want to do that. I have decided not to do it for the simple reason it is too easy to install from the repositories and update from the latest archive. It works well and from what I have seen has all benefits and no disadvantages.

    But if you want to do it for your own reasons here it is. It reads the file /etc/default/boinc-client, in above post, for some settings.

    /etc/init.d/boinc-client

    Code:
    #! /bin/sh
    ### BEGIN INIT INFO
    # Provides:          boinc boinc-client
    # Required-Start:    $all
    # Required-Stop:     $local_fs $remote_fs
    # Should-Start:      x11-common network-manager gdm kdm dbus
    # Should-Stop:       x11-common
    # Default-Start:     2 3 4 5
    # Default-Stop:      0 1 6
    # Short-Description: BOINC core client
    # Description:       core client for the BOINC distributed computing
    #                    infrastructure
    ### END INIT INFO
    
    # Debian init.d script for the BOINC core client
    # Copyright © 2005, 2006, 2007, 2008
    # Debian BOINC Maintainers <pkg-boinc-devel@lists.alioth.debian.org>
    #
    # This file is licensed under the terms of the GNU General Public License,
    # Version 2 or any later version published by the Free Software Foundation.
    
    set -e
    . /lib/lsb/init-functions
    
    # Default values for the variables that are also set in the defaults file.
    ENABLED=0
    SCHEDULE=0
    BOINC_USER=boinc
    BOINC_DIR=/var/lib/boinc-client
    BOINC_CLIENT=/usr/bin/boinc
    BOINC_OOM_ADJ=15
    
    #VALGRIND_OPTIONS="-v --log-file=/tmp/valgrind_boinc.log "
    VALGRIND_OPTIONS=""
    
    # Source defaults file. Edit that file to configure this script.
    if [ -e /etc/default/boinc-client ]; then
      . /etc/default/boinc-client
    fi
    
    # Quit quietly, if $ENABLED is 0.
    test "$ENABLED" != "0" || exit 0
    
    if [ "$BOINC_CLIENT" = "/usr/bin/boinc" ]; then
      test -x "$BOINC_CLIENT" || exit 0
    elif [ ! -x "$BOINC_CLIENT" ]; then
      log_failure_msg "BOINC client '$BOINC_CLIENT' does not exist or is not" \
        "executable."
      exit 5
    fi
    
    if [ ! -d "$BOINC_DIR" ]; then
      log_failure_msg "BOINC data directory '$BOINC_DIR' does not exist."
      exit 6
    fi
    
    if [ -z "$BOINC_USER" ]; then
      log_failure_msg "BOINC_USER variable is empty. Set it to a user to run" \
        "the BOINC core client."
      exit 6
    fi
    
    if [ ! -z "$BOINC_OPTS" ]; then
            (echo $BOINC_OPTS | grep -- '--daemon' 1>/dev/null) &&
                    log_warning_msg "\`--daemon' option detected \
                            on /etc/default/boinc-client, this \
                            can cause problems on boinc. The option \
                            will be suppressed"
                    BOINC_OPTS=`echo "$BOINC_OPTS" | sed 's/--daemon//g'`
    fi
    
    PIDFILE=/var/run/boinc.pid
    DESC="BOINC core client"
    NAME=`basename $BOINC_CLIENT`
    BOINC_OPTS="--check_all_logins --redirectio --dir $BOINC_DIR $BOINC_OPTS"
    
    is_running()
    {
      retval=1
      if [ -r $PIDFILE ]; then
        pid=`cat $PIDFILE`
        if [ -e /proc/$pid ]; then
          procname=`/bin/ps h -p $pid`
          [ -n "$procname" ] && retval=0
        fi
      fi
      return $retval
    }
    
    start()
    {
      log_begin_msg "Starting $DESC: $NAME"
      if is_running; then
        log_progress_msg "already running"
      else
        if [ -n "$DISPLAY" -a -x /usr/bin/xhost ]; then
           # grant the boinc client to perform GPU computing
           xhost local:boinc || echo -n "xhost error ignored, GPU computing may not be possible"
        fi
        if [ -n "$VALGRIND_OPTIONS" ]; then
          start-stop-daemon --start --quiet --background --pidfile $PIDFILE \
             --make-pidfile --user $BOINC_USER --chuid $BOINC_USER \
             --chdir $BOINC_DIR --exec /usr/bin/valgrind -- $VALGRIND_OPTIONS $BOINC_CLIENT $BOINC_OPTS
        else
          start-stop-daemon --start --quiet --background --pidfile $PIDFILE \
             --make-pidfile --user $BOINC_USER --chuid $BOINC_USER \
             --chdir $BOINC_DIR --exec $BOINC_CLIENT -- $BOINC_OPTS
        fi
     fi
      log_end_msg 0
    
      if [ "$SCHEDULE" = "1" ]; then
        schedule
      fi
    }
    
    stop()
    {
      log_begin_msg "Stopping $DESC: $NAME"
      if ! is_running; then
        log_progress_msg "not running"
      else
        start-stop-daemon --stop --quiet --oknodo --pidfile $PIDFILE \
          --user $BOINC_USER --exec $BOINC_CLIENT
    
                    # Wait until really stopped - $pid is set from is_running
                    # (waiting for max 60s (600 cycles at 100ms))
                    i=0
                    while kill -0 "$pid" 2> /dev/null;  do
                            if [ $i = '600' ]; then
                                    break;
                            else
                                    if [ $i = '0' ]; then
                                            echo -n " ... waiting "
                                    elif [ $(($i%10)) = 0 ]; then
                                            echo -n "."
                                    fi
                                    i=$(($i+1))
                                    sleep .1
                            fi
                    done
      fi
    
      rm -f "$BOINC_DIR/lockfile"
     rm -f $PIDFILE
      log_end_msg 0
    }
    
    chrt_many()
    {
       POLICY="$1"
       PRIO="$2"
       NICE="$3"
       shift 3
       for i in "$@"; do
         chrt -p $POLICY $PRIO $i || return
         # increasing compatibility with older versions of renice
         # in reaction to bug report #600134
         renice $NICE -p $i > /dev/null || renice -n $NICE -p $i
       done
    }
    
    schedule()
    {
      log_begin_msg "Setting up scheduling for $DESC and children:"
      if ! is_running; then
        log_progress_msg "$NAME not running"
      else
        if [ ! -x "`which ionice 2>/dev/null`" ]; then
          log_progress_msg "ionice not found,"
        else
          if ionice -c 3 -p $pid 2>/dev/null; then
            log_progress_msg "idle,"
          else
            log_progress_msg "ionice failed,"
          fi
        fi
    
        children=`ps --ppid $pid -o pid= | tr '\n' ' '`
     if [ ! -x "`which chrt 2>/dev/null`" ]; then
          log_progress_msg "chrt not found"
        else
          # BOINC client needs higher priority than scientific apps
          renice 0 -p $pid > /dev/null || renice -n 0 -p $pid
          # Apps receive minimal priority
          if [ -n "$children" ]; then
            (chrt_many --idle 0 10 $children >/dev/null \
              && log_progress_msg "idleprio") || \
            (chrt_many --batch 0 10 $children >/dev/null \
              && log_progress_msg "batch") || \
            (chrt_many --other 0 10 $children >/dev/null \
              && log_progress_msg "normal") || \
            log_progress_msg "chrt failed"
          fi
        fi
        for BPID in ${pid} ${children}; do
          if [ -w /proc/${BPID}/oom_adj ]; then
            echo ${BOINC_OOM_AD} > /proc/${BPID}/oom_adj 2>/dev/null || true
          else
            echo "Could not write to /proc/${BPID}/oom_adj"
          fi
        done
      fi
      log_end_msg 0
    }
    
    status()
    {
      STATUS="Status of $DESC:"
      if is_running; then
        log_success_msg "$STATUS running"
        children=`ps --ppid $pid -o pid= | tr '\n' ' '`
        if [ -x "`which chrt 2>/dev/null`" ]; then
          log_success_msg "Scheduling of $DESC: $pid"
          chrt -p $pid
    
          if [ -n "$children" ]; then
            log_success_msg "Scheduling of $DESC's children: $children"
            for i in $children; do
              chrt -p $i
            done
          fi
        fi
        log_success_msg "OOM killer status for $DESC:"
        for BPID in ${pid} ${children}; do
          echo -n "PID ${BPID}: "
          if [ ! -d "/proc/${BPID}" ]; then
            echo "/proc/${BPID} not found"
            continue
          fi
    
          echo -n "adj "
          if [  -r "/proc/${BPID}/oom_adj" ]; then
            cat /proc/${BPID}/oom_adj
          else
            echo "?"
          fi
          echo ", score "
    
          if [  -r "/proc/${BPID}/oom_adj" ]; then
            cat /proc/${BPID}/oom_score
          else
            echo -n "?"
          fi
    
          echo
        done
    
        # Display $BOINC_USER's cpu_share:
        uid=`id -u $BOINC_USER`
        cpu_share_file="/sys/kernel/uids/$uid/cpu_share"
     if [ -f "$cpu_share_file" ]; then
          log_success_msg "cpu_share: `cat "$cpu_share_file"`"
        fi
      else
        log_success_msg "$STATUS stopped"
      fi
    }
    
    case "$1" in
      start)
        start
        ;;
    
      stop)
        stop
        ;;
    
      restart|force-reload)
        stop
        sleep 1
        start
        ;;
    
      status)
        status
        ;;
    
      schedule)
        schedule
        ;;
    
      *)
        log_success_msg "Usage: $0 {start|stop|restart|force-reload|status|schedule}" >&2
        exit 1
        ;;
    esac
    exit 0

  25. #25
    Xtreme Cruncher
    Join Date
    Jan 2009
    Location
    Nashville
    Posts
    4,162
    Added some info on what commands were doing and some minor editing.

    Please advise of mistakes.

    Thanks

Page 1 of 2 12 LastLast

Bookmarks

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •