Logicalwebhost Cheatsheet

Linux & Open Source Cheatsheets & Howto's

Skip to: Content | Sidebar | Footer

bitcoin miner howto

Bitcoin is explained elsewhere, here I will do a howto on setting up a miner. My setup has 3 HD5830 ATI GPU graphics cards and is running on an AMD 64bit box on Ubuntu 10.10. There are lots of ways you can do this, but this worked for me. A lot of the details came from trial and error, as well as here here here and here. I’m just roughing this out, haven’t proofread it very well, so YMMV, but it should get you close. The main thing is I bounce between sudo and just su to root, for example I use a normal user to launch the ati installer because it needs a screen to do the gui install.

decent natty guide


install ubuntu 10.10 like normal

set up a user for bitcoin mining only, and select option to encrypt its home directory

check to see if ubuntu sees your graphics card(s)

lspci -v

if you don’t see something like “Display controller: ATI Technologies Inc Device…” it means ubuntu doesn’t see it, turn off the computer and re-seat the card, make sure the external card power connectors are connected and try it again.

Next, if you have the proprietary drivers enabled, you’ll have to disable them through System > Administration > Additional Drivers. After you disable them, you’ll have to reboot.

Enable Source Code in Ubuntu. System > Administration > Synaptic Package Manager. Settings > Repositories > ‘Ubuntu’ tab. Check the checkmark and then exit out of Synaptic.

install liqtgui4 after you update the package list

apt-get update && apt-get install libqtgui4 elinks

next you have to build the proprietary drivers from amd/ati, first download them from here and put them in /usr/src/, so from command line do:

cd /usr/src/
elinks http://support.amd.com/us/gpudownload/Pages/index.aspx

to set up your graphics card(s) driver(s), exit to your normal bitcoin user and run:

sudo sh /usr/src/ati-driver-installer-11-6-x86.x86_64.run

which should give you a gui installer, just follow the defaults, and it’ll tell you when it’s done. after it finishes, reboot and log back in as your bitcoin user. After it reboots, you should be able to detect your card(s) like:

:~$ fglrxinfo
display: :0.0  screen: 0
OpenGL vendor string: ATI Technologies Inc.
OpenGL renderer string: ATI Radeon HD 5800 Series  
OpenGL version string: 4.1.10834 Compatibility Profile Context

okay, now we have to get the SDK and registration from ATI, so become root again and do:

cd /opt
wget http://developer.amd.com/Downloads/ati-stream-sdk-v2.3-lnx64.tgz
tar xvfz ati-stream-sdk-v2.3-lnx64.tgz
cd /
wget http://developer.amd.com/Downloads/icd-registration.tgz
tar xfvz icd-registration.tgz
ls /etc/OpenCL/vendors/

exit root. now export this, and then add it to your .bashrc file at the end

export LD_LIBRARY_PATH=/opt/ati-stream-sdk-v2.3-lnx64/lib/x86_64/:$LD_LIBRARY_PATH
vi /home/bitcoinuseryousetup/.bashrc
      export LD_LIBRARY_PATH=/opt/ati-stream-sdk-v2.3-lnx64/lib/x86_64/:$LD_LIBRARY_PATH

now become root and check to see if your systems sees your card(s)

cd /opt/ati-stream-sdk-v2.3-lnx64/samples/opencl/bin/x86_64
      ./CLInfo |grep CL_DEVICE_TYPE_GPU

now compile and install pyopencl

cd /usr/src/
wget http://pypi.python.org/packages/source/p/pyopencl/pyopencl-0.92.tar.gz
tar xfvz pyopencl-0.92.tar.gz
cd /usr/src/pyopencl-0.92
apt-get install g++ libboost-all-dev subversion git-core python-numpy
./configure.py --cl-inc-dir=/opt/ati-stream-sdk-v2.3-lnx64/include/ --cl-lib-dir=/opt/ati-stream-sdk-v2.3-lnx64/lib/x86_64
make install

if there are no errors, then you’re done with this step. Now install bitcoin itself:

apt-add-repository ppa:stretch/bitcoin
apt-get update
apt-get install bitcoin

now download and install python-jsonrpc

cd /usr/src/
svn checkout http://svn.json-rpc.org/trunk/python-jsonrpc
cd python-jsonrpc
python setup.py install

now you have to go sign up for an account. You have to get your wallet ID first, which you get by running bitcoins at Applications -> Internet -> Bitcoin, and cut/paste the bitcoin address. Then go sign up for an account here

now go get the latest Phoenix miner, as of this writing, it’s 1.50. This will also get the phatk kernel, which is pretty fast

cd /usr/src/
mkdir phoenix-miner
cd phoenix-miner
svn checkout http://svn3.xp-dev.com/svn/phoenix-miner/

Write a comment

You need to login to post comments!