Running VBox as user boinc on Gentoo Linux

Advanced search

Questions and Answers : Unix/Linux : Running VBox as user boinc on Gentoo Linux

Author Message
Send message
Joined: 21 Jan 15
Posts: 2
Credit: 27,346
RAC: 0
Message 1754 - Posted: 28 Jan 2015, 13:30:20 UTC

I have been interested in running ATLAS@Home and vLHC@Home on Gentoo Linux for quite a while. There were two main problems: 1) The version of BOINC for Gentoo is rather old, and 2) VirtualBox was practically impossible to set up for running as the BOINC user in the out-of-box configuration. I have managed to solve both of these problems!

To use a more recent version of the BOINC software on Gentoo, the solution is to use Layman and get boinc from the "seden" overlay. He has done the heavy lifting to get more recent version of BOINC working in the Gentoo portage environment. Using the overlay doesn't require hand tweaking of wxGTK or dealing with the complicated and misleading instructions from BOINC on building the software from scratch.

Second, the instructions from CERN for running vLHC and ATLAS generally have one set up BOINC to run either as a privleged user or as ones own account so that VBox will run successfully. This turn out not to be required. The boinc user can be easily configured to run BOINC directly, with only a few non-code tweaks to the Gentoo environment.

1) Modify the boinc user account to be a regular user account: a) Edit the /etc/password file to give the boinc user a home directory (generally the /var/lib/boinc location) and b) give it a real login shell such as /bin/bash or /bin/sh.

2) Add the boinc user to the vboxusers operational group so that it can run vbox as itself. (Use the vigr(1) command or equivalent.)

3) Modify the

startup script for OpenRC to change the su command to use a
option instead of a
option when starting the BOINC subsystem. This makes the BOINC software run as if it were a real logged-in user rather than as some sort of hybrid.

4) Add a
directory to the
directory selected for BOINC in step 1 so that VirtualBox has a more normal environment. VirtualBox will still place the virtual machines for ATLAS and vLHC in the
directory, but it won't complain at startup about there not being a .VirtualBox directory.

Of additional note: the
command will open project websits and such as user boinc so one might want to customize the browser used by the boinc user to your taste. [E.g.: set up google-chrome or firefox with settings that match your personal preferences.]

I have been running this way for two weeks now, and ATLAS@Home and vLHC@Home are working correctly on two different Gentoo installations. Enjoy.

Send message
Joined: 21 Jan 15
Posts: 2
Credit: 27,346
RAC: 0
Message 4505 - Posted: 21 May 2016, 2:50:44 UTC - in response to Message 1754.

Gentoo has caught up to a modern version of BOINC (7.6.31) and Atlas@Home is running in VirtualBox (5.0.20) quite well with the setup I previously described.

BUT, I would like to restrict the Atlas@Home project to only use 1 CPU at a time, leaving 3 other CPUs for other BOINC projects. In the BOINC directory there is a file which seems like I should be able to customize it for just using 1 CPU; however, each time I change it, it gets reloaded without the changes I want it to have.

Does anyone know of a way that I could limit the project to use 1 CPU while still allowing other BOINC tasks to run on the other 3 CPUs?

Ideally, I would like to be able to limit any particular project to running 1 task at a time while still allowing other projects to run on other CPUs.

Send message
Joined: 28 Jun 14
Posts: 21
Credit: 182,001
RAC: 0
Message 4508 - Posted: 21 May 2016, 14:26:13 UTC - in response to Message 4505.


You can restrict the number of tasks run per project or per task type using an app_config.xml file. There are number of posts in the forums that can easily be found using the search. There are different examples in those posts of the ways that the app_config.xml can be set up.

Hope that helps.

Questions and Answers : Unix/Linux : Running VBox as user boinc on Gentoo Linux