We use Raspberry Pi devices as little drive wiping stations. Getting BOINC installed on them was fairly straightforward using DietPi 64-bit version, but to reduce wear on the SD cards, we wanted BOINC to use a data directory located on a network share. Configuring this ended up being pretty frustrating, so the steps are copied here, hopefully you can get some use out of it. All of these commands should be run with sudo/as root.
-
-
- Install BOINC with a sudo apt install boinc
- If you are using an account manager, attach the boinc client with boinccmd –acct_mgr attach “https://bam.boincstats.com” username password followed by boinccmd –acct_mgr sync to sync it up
- Stop the BOINC service with service boinc-client stop
- mkdir /media/boincstorage/ #make your BOINC storage location
- mount -t cifs -o username=yourusername,password=”yourpassword”,uid=boinc //192.168.X.X/boincstorage /media/boincstorage & #mount your network share. Add this to /etc/rc.local to make it run at startup. You may need to do an apt install samba-tools for this to work
- nano /etc/default/boinc-client and make BOINC_DIR point to your new storage location (not entirely sure this step is needed)
- sudo cp -RL /var/lib/boinc-client/* /media/boincstorage/ #copy any existing BOINC data, WUs, etc to new network share
- rn /var/lib/boinc-client/* #delete old data to be sure BOINC isn’t using it
- do a systemctl edit boinc-client and add the following lines. This tells systemd to keep restarting the BOINC service every ten seconds, we do this because the network share may take a few seconds to mount at startup. This will keep trying to restart BOINC forever so just keep that in mind.
[Service]
Restart=always
RestartSec=10
StartLimitInterval=0
ExecStart=
ExecStart=/usr/bin/boinc –dir /media/boincstorage/ - Do a systemctl daemon-reload to tell systemd about your changes followed by a systemctl start boinc-client
- systemctl status boinc-client to verify that it’s running
-