How to: install older 6.x versions of BOINC in Ubuntu 18.04

Questions and Answers : Unix/Linux : How to: install older 6.x versions of BOINC in Ubuntu 18.04
Message board moderation

To post messages, you must log in.

AuthorMessage
Cosmic_Ocean
Avatar

Send message
Joined: 23 Dec 00
Posts: 3027
Credit: 13,516,867
RAC: 13
United States
Message 1994343 - Posted: 19 May 2019, 18:12:29 UTC

So I went through a whole pile of hair-pulling and frustration figuring this out, so I figured i'd share what i learned here for all 5 of you that may need something similar.


Backstory: I was migrating my data dir that i've had since 2007 on a machine that has gone from win2000 to openSuSE 11.1 to Server2003 and had been through 4 motherboards and CPUs in those 12 years.

So I started off with researching how to run a program as a system service in 18.04 and my eyes just kind of glazed-over because I didn't know what all I needed to put in the service definition file.

Idea! I'll just do a live-boot on another machine of 18.04, and then install boinc through the package manager, and then just copy the service file and make the necessary changes in it.. that'll work!

It didn't. There's at least one step that I'm not aware of, and I couldn't get it to work.



First and foremost, I'm not going to use 'sudo' in any of this--I don't use sudo, because I log in as root in terminals. The one time I use sudo in Ubuntu is: 'sudo passwd root' to set a password so I can log in.

Second: as with any manipulation and migration of BOINC, the standard practice is *always* recommended: all projects: no new tasks, global activity: suspend, network: suspend. Shut BOINC down, and NOW you can make a copy of your data dir that is ready for migration.

You do all those steps so that if something doesn't go right in the migration and you dump your cache or everything errors-out... you can try again and the servers won't know that you errored all of your tasks out.


So here's what I did to get 6.10.58 running as a service in Ubuntu 18.04.2 LTS:

apt install boinc-client
systemctl stop boinc-client

Next, in any non-important directory, you'll need to unpack an old client that you obtain from here: https://boinc.berkeley.edu/dl/ . In this case, I used "boinc_6.10.58_x86_64-pc-linux-gnu.sh"

wget https://boinc.berkeley.edu/dl/boinc_6.10.58_x86_64-pc-linux-gnu.sh
sh boinc_6.10.58_x86_64-pc-linux-gnu.sh

This will unpack into ~/BOINC/. You need two files from that: boinc and boinccmd.

You'll need to copy (cp) those from where they are, and overwrite the 7.x ones that were installed by the package manager, and they are located in /usr/bin
cp /root/BOINC/boinc /usr/bin
cp /root/BOINC/boinccmd /usr/bin


Now we're going to get into how to migrate your old host's data dir into here.

The data dir when you use the package manager to install 7.x is located in /var/lib/boinc-client. There is a symbolic link to a simpler location that is simply just /var/lib/boinc. You can 'cd' to either one, it doesn't matter.

In here, there are a couple of files that get stored in /etc/boinc-client and have symbolic links into /var/lib/boinc. These files are:

cc_config.xml
global_prefs_override.xml
gui_rpc_auth.cfg (plaintext password for remote connections through BOINC Manager)
remote_hosts.cfg (IP addresses or DNS hostnames of hosts that are allowed to remote connect)

And there is also:

ca_bundle.crt -> /etc/ssl/certs/ca-certificates.crt

From your old data directory that you're trying to migrate, you'll need to copy these things to their respective places.
cp /root/oldboinc/ca-bundle.crt /etc/ssl/certs/ca-certificates.crt
cp /root/oldboinc/cc_config.xml /etc/boinc-client/cc_config.xml
cp /root/oldboinc/global_prefs_override.xml /etc/boinc-client/global_prefs_override.xml
cp /root/oldboinc/gui_rpc_auth.cfg /etc/boinc-client/gui_rpc_auth.cfg
cp /root/oldboinc/remote_hosts.cfg /etc/boinc-client/remote_hosts.cfg

I also went ahead and just to prevent any permissions problems, I went ahead and did:
cd /etc/boinc-client
chown boinc.boinc *
chmod 666 *
cd /etc/ssl/certs
chown boinc.boinc ca-certificates.crt
chmod 666 ca-certificates.crt


Now it is time to copy only certain things from your old data folder over to /var/lib/boinc.

To avoid complications, I just used a GUI file manager to weed-out things that aren't needed [as i said, in my case, since i've migrated between windows and linux several times on this, my folder was quite messy with old scripts and service files from 2009 to make it run as a service in linux, so it was time for me to clean mine up]

you'll need basically the whole data folder, EXCEPT.. those 5 symbolic link files I mentioned just above. And remove the binary for 'boinc' and 'boinccmd' from the data folder, as well.

Once you've got that figured out in your oldboinc folder, it's time to move it all in.
cd /root/oldboinc
cp -R * /var/lib/boinc
cd /var/lib/boinc
chown -R boinc.boinc *


Now that all the data file stuff is done. You're good to go.

systemctl start boinc-client

And you should be successfully migrated. Check the messages tab to look for errors and complaints. If there are none, and you still have a cache of tasks, you can now do a global "run based on preferences" or "run always" and see if crunching resumes without throwing out errors. If crunching resumes just fine, you can then allow network comms. One project at a time, manually update them and again, keep an eye on the messages tab for errors and complaints. If none, you can start allowing new tasks on the projects again.


EXTRA: If you're like me and you want to keep your message log in a file for future searching/reference, there's some extra steps involved. For starters, my cc_config has:
<max_stdout_file_size>104857600</max_stdout_file_size>

(100 MiB). My log goes back to 21-Dec-2009 and is only ~35 MiB. Your mileage may vary.

In any case, we'll need to make a few small changes/tweaks to the service definition, so stop boinc, and use your preferred editor to open the service file.
systemctl stop boinc-client
<vim/nano/pico> /lib/systemd/system/boinc-client.service

There are three lines you'll need to add to the bottom of the [Service] section:
StandardOutput=syslog
StandardError=syslog
SyslogIdentifier=[BOINC]

Save the changes, and you'll need to make systemctl re-read the file:

systemctl daemon-reload

Don't start boinc back up yet.

Next:
cd /etc/rsyslog.d
touch 99-boinclog.conf
<vim/nano/pico> 99-boinclog.conf
:rawmsg,contains,"[BOINC]" /var/lib/boinc/stdoutdae.txt

Save and close.

systemctl restart rsyslog
systemctl start boinc-client

NOW, you're done. All of the messages from the messages tab in the client have been spewing into /var/log/syslog this whole time, and because they will now have [BOINC] on those lines because of the service identifier specified above, *any* lines containing [BOINC] in /var/log/syslog will now be APPENDED to the end of /var/lib/boinc/stdoutdae.txt so that you can search through that later if need-be.



I hope this helped at least one person. Maybe not for doing the exact full set of steps I did, but at least one portion of it maybe.
Linux laptop:
record uptime: 1511d 20h 19m (ended due to the power brick giving-up)
ID: 1994343 · Report as offensive
Profile Keith Myers Special Project $250 donor
Volunteer tester
Avatar

Send message
Joined: 29 Apr 01
Posts: 13164
Credit: 1,160,866,277
RAC: 1,873
United States
Message 1994367 - Posted: 19 May 2019, 22:23:50 UTC

Excellent Cosmic. I am probably going to do some moving on the RPiB3+ at some time.
Seti@Home classic workunits:20,676 CPU time:74,226 hours

A proud member of the OFA (Old Farts Association)
ID: 1994367 · Report as offensive
Profile Tom M
Volunteer tester

Send message
Joined: 28 Nov 02
Posts: 5124
Credit: 276,046,078
RAC: 462
Message 1994380 - Posted: 20 May 2019, 0:13:32 UTC

+1
A proud member of the OFA (Old Farts Association).
ID: 1994380 · Report as offensive
Cosmic_Ocean
Avatar

Send message
Joined: 23 Dec 00
Posts: 3027
Credit: 13,516,867
RAC: 13
United States
Message 1994382 - Posted: 20 May 2019, 0:19:27 UTC

Crap. I knew I was going to forget one step in the writeup.

You need to do:
chown syslog.adm /var/lib/boinc/stdoutdae.txt
chmod 666 /var/lib/boinc/stdoutdae.txt

This grants rsyslog the ability to use this file, as well as the boinc account, even though it doesn't seem that in Linux, or when it is a service, BOINC will even USE stdoutdae.txt

Another way around this would be to edit the syslog account permissions and ADD the 'boinc' group to it:
usermod -a -G boinc syslog

That would then make syslog a member of the 'boinc' group, and as long as stdoutdae.txt has rw-rw-r-- as its permissions, that would have worked.
Linux laptop:
record uptime: 1511d 20h 19m (ended due to the power brick giving-up)
ID: 1994382 · Report as offensive
Cosmic_Ocean
Avatar

Send message
Joined: 23 Dec 00
Posts: 3027
Credit: 13,516,867
RAC: 13
United States
Message 1994383 - Posted: 20 May 2019, 0:21:26 UTC

But yeah, this was all a very specific scenario that I doubt very many people will find themselves in. Most people are likely going to just install from the file manager and use that as-is, starting a whole new machine ID.

But I didn't want to use 7.x.. I wanted to use 6.10.58. TBH.. I'd prefer using 6.2.15, but as long as it is all still in the 6.x series, it's fine.
Linux laptop:
record uptime: 1511d 20h 19m (ended due to the power brick giving-up)
ID: 1994383 · Report as offensive

Questions and Answers : Unix/Linux : How to: install older 6.x versions of BOINC in Ubuntu 18.04


 
©2024 University of California
 
SETI@home and Astropulse are funded by grants from the National Science Foundation, NASA, and donations from SETI@home volunteers. AstroPulse is funded in part by the NSF through grant AST-0307956.