Results 1 to 8 of 8

Thread: Can I move boinc from linux root?

  1. #1
    Junior Member
    cjspizz's Avatar
    Join Date
    September 21st, 2019
    Location
    Waxhaw, NC
    Posts
    35

    Unhappy Can I move boinc from linux root?

    Unlike most programs, boinc installed itself in root and keeps all the data files there. I allocated a generous 30GB to my root partition during install, but it's now ~60% full because of boinc. Anyone know why boinc makes its home in root? More importantly, does anyone know how I can move it (or at least move the data files to the /home partition)?

  2. #2
    Ambassador from TSBT scole of TSBT's Avatar
    Join Date
    May 8th, 2015
    Location
    Goldsboro, NC
    Posts
    1,009

    Re: Can I move boinc from linux root?

    It's normally installed in /var/lib/ by default. You can't just move it if that's where the install script put it. Check your /etc/init.d/boinc-client script and see if the lines are the same as these...
    Code:
    BOINC_DIR=/var/lib/boinc-client
    BOINC_CLIENT=/usr/bin/boinc

  3. #3
    Diamond Member
    zombie67's Avatar
    Join Date
    October 24th, 2010
    Location
    Reno, NV
    Posts
    7,269

    Re: Can I move boinc from linux root?

    In the past, I have just downloaded the app from the BOINC site, extracted it to my Desktop, and just run it form there. Works fine, assuming you are running a GUI.
    "Don't confront me with my failures, I had not forgotten them" - Jackson Browne

    Avatar source


  4. #4
    Junior Member
    cjspizz's Avatar
    Join Date
    September 21st, 2019
    Location
    Waxhaw, NC
    Posts
    35

    Re: Can I move boinc from linux root?

    Quote Originally Posted by scole of TSBT View Post
    It's normally installed in /var/lib/ by default. You can't just move it if that's where the install script put it. Check your /etc/init.d/boinc-client script and see if the lines are the same as these...
    Code:
    BOINC_DIR=/var/lib/boinc-client
    BOINC_CLIENT=/usr/bin/boinc
    Yup, they're the same, and that's where everything is:

    boinc-root-hog.jpg

    But that's the problem. I was hoping to move BOINC_DIR to /home because my root partition is filling up.

    sdc-partitions.png

    Is there any way to do that? Maybe stop taking new tasks, complete the tasks on hand, then uninstall/reinstall with new settings?

  5. #5
    Ambassador from TSBT scole of TSBT's Avatar
    Join Date
    May 8th, 2015
    Location
    Goldsboro, NC
    Posts
    1,009

    Re: Can I move boinc from linux root?

    Try moving the folder to where you want and change the folder name in the boinc-client script and see if it works. It should because we run additional clients in other folders and that is only place the path is referenced by the installed scripts

  6. #6
    Junior Member
    cjspizz's Avatar
    Join Date
    September 21st, 2019
    Location
    Waxhaw, NC
    Posts
    35

    Re: Can I move boinc from linux root?

    That didn't work, partly because boinc wouldn't use the folder I designated (/home/cjspizz/boinc-dir). For some reason, it insisted on using /home/cjspizz instead.

    I found this script a while back but haven't tried it, mainly because I'm not sure where to define the variables "$BOINC_DIR" and "$CONF_DIR." Where do I define those, and do you think this script will work?

    Code:
    #!/bin/sh
    #
    # This script can be used to move the BOINC data directory from Debian's
    # default location in root '/var/lib/boinc-client' to a more sensible place,
    # like your Home directory.
    # Invoke it with the old data directory as it's only argument,
    # for example:
    #    $ move-new-boinc-dir.sh /var/lib/boinc-client
    #
    # 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
    
    
    OLD_DIR="$1"
    if [ -z "$OLD_DIR" ]; then
        echo "Error: Old BOINC directory not specified."
        exit 1
    elif [ ! -d "$OLD_DIR" ]; then
        echo "Error: $OLD_DIR does not exist or is not a directory."
        exit 1
    fi
    
    
    BOINC_DIR=/home/boinc-client
    CONF_DIR=/etc/boinc-client
    
    
    mv_conffile()
    {
        if [ ! -L "$BOINC_DIR/$1" ] && [ -f "$BOINC_DIR/$1" ]; then
            mv -f "$BOINC_DIR/$1" "$CONF_DIR/$1"
        fi
        ln -sf "$CONF_DIR/$1" "$BOINC_DIR/$1"
    }
    
    
    # Stop the BOINC core client.
    invoke-rc.d boinc-client stop
    
    
    # Copy the old BOINC directory to the new location.
    mkdir -p $BOINC_DIR || true
    cp -R -T "$OLD_DIR" $BOINC_DIR
    
    
    # Set the user boinc as the owner for
    # all files in /home/cjspizz/boinc-client.
    chown -R boinc:boinc $BOINC_DIR || true
    
    
    # Move old configuration files to /etc/boinc-client/ and
    # create symlinks for the BOINC core client.
    mv_conffile cc_config.xml
    mv_conffile global_prefs_override.xml
    mv_conffile gui_rpc_auth.cfg
    mv_conffile remote_hosts.cfg
    
    
    CA_FILE=/etc/ssl/certs/ca-certificates.crt
    CA_LINK="$BOINC_DIR/ca-bundle.crt"
    if [ ! -e $CA_LINK ] && [ -f $CA_FILE ]; then
        ln -sf $CA_FILE $CA_LINK
    fi
    
    
    # Start the BOINC core client again.
    invoke-rc.d boinc-client start

  7. #7
    Ambassador from TSBT scole of TSBT's Avatar
    Join Date
    May 8th, 2015
    Location
    Goldsboro, NC
    Posts
    1,009

    Re: Can I move boinc from linux root?

    Going to be messy in /home/cjspizz. Try /home/cjspizz/boinc then set the owner and permissions...

    Code:
    sudo chmod 777 -R /home/cjspizz/boinc
    sudo chown -R boinc:boinc /home/cjspizz/boinc

  8. #8
    Junior Member
    cjspizz's Avatar
    Join Date
    September 21st, 2019
    Location
    Waxhaw, NC
    Posts
    35

    Re: Can I move boinc from linux root?

    Yup, that's what I tried (/home/cjspizz/boinc-dir). It was boinc that wanted to make a mess in /home/cjspizz. There's another boinc-client script in /etc/default/ (it's the configuration script for the init script) that has the "BOINC_DIR=/var/lib/boinc-client" variable. I'm going to try changing that too and see if it helps. I'll report back, just in case others are interested.

Posting Permissions

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