Bitcoin mining, Ubuntu and ATI

It is a bit late creating a guide for mining Bitcoins using GPUs, with the block rewards halving on November 28 and the specialized mining hardware being brought online since January 31. But I’m going to do this anyway.

This guide is for creating an Ubuntu 12.10 (64bit) bitcoin miner, using an ATI graphics card.

Step 1: install Ubuntu
Go to Ubuntu.com and download a copy. Installing this should not be much of a problem.

Step 2: update
Because Ubuntu 12.10 is not exactly stable out of the box, you may want to update it as soon as possible, and before doing anything else. Open up a terminal window, and type the following:

sudo apt-get update
sudo apt-get upgrade

After this, reboot.

Step 3: install linux headersBecause the ATI drivers won’t install properly without the Linux headers being installed, we need to install those.

sudo apt-get install linux-headers-$(uname -r)

Step 4: Install the proprietary Catalyst drivers
Now that the Linux headers are installed, it’s time for the actual graphics drivers

wget http://www2.ati.com/drivers/linux/amd-driver-installer-catalyst-13.1-linux-x86.x86_64.zipunzip amd-driver-installer-catalyst-13.1-linux-x86.x86_64.zip
chmod +x amd-driver-installer-catalyst-13.1-linux-x86.x86_64.run
sudo ./amd-driver-installer-catalyst-13.1-linux-x86.x86_64.run

Step 5: download and install the AMD-APP-SDK

glxgears
glxgears is running!

Installing the drivers is not enough to run OpenCL applications. You need the APP SDK for that.
Go to http://developer.amd.com/tools

/heterogeneous-computing/amd-accelerated-parallel-processing-app-sdk/downloads/ to download the APP SDK. You’ll have to agree to some licence agreement, which makes it impossible to download it using wget.

tar -xzf AMD-APP-SDK-v2.8-lnx64.tgz
sudo ./Install-AMD-APP.sh

reboot

Step 6: install JDK6
Since we’re going to install a Java program, and we will need to build it, we need the JDK. In my opinion, JDK7 is still not stable enough, so we’ll be installing JDK6.

sudo add-apt-repository ppa:webupd8team/java
sudo apt-get update
sudo apt-get install oracle-java6-installer

Step 7: install git and maven
Before we can download and compile the miner, we need to install the programs that do that for us.

sudo apt-get install git
sudo apt-get install maven

Step 8: get DiabloMiner

cd ~
mkdir diablo
cd diablo
git clone https://github.com/Diablo-D3/DiabloMiner.git

The launch4j plugin has to be removed here.
The launch4j plugin has to be removed here.

Step 9: prepare to compile

The build process of DiabloMiner uses launch4j, which breaks the build on Linux. So we need to remove this. Open the pom.xml file, and remove the plugin launch4j

Step 10: compile

mvn install

Step 11: launch the miner

./DiabloMiner-Linux.sh –url http://ghyze_nl:123@de.btcguild.com:8332

DiabloMiner running
DiabloMiner should look like this

 

 

 

If you like this post, throw me a couple of mining shares..

OpenCL Bitcoin mining on Ubuntu 10.04 LTS

There are lots of guides for getting bitcoin openCL mining enabled on Ubuntu 10.10. But it’s also possible to get it working on 10.04 LTS.

Sorry for the messed up layout. But you’ll probably be copy/pasting anyway 😉

Step 1: Install PyOpenCL
Add ppa:fajran/opencl to Software Sources
Run the command

sudo apt-get install python-pyopencl

Step 2: Get Bitcoin and the OpenCL miner
Run the following script:

sudo apt-get install subversion
wget http://iweb.dl.sourceforge.net/project/bitcoin/Bitcoin/bitcoin-0.3.19/bitcoin-0.3.19-linux.tar.gz
tar xvf bitcoin-0.3.19-linux.tar.gz
svn checkout http://svn.json-rpc.org/trunk/python-jsonrpc
cd python-jsonrpc/
sudo python setup.py install
cd ..
mkdir .bitcoin
echo "rpcuser=un" > .bitcoin/bitcoin.conf
echo "rpcpassword=pw" >> .bitcoin/bitcoin.conf
wget --no-check-certificate https://github.com/m0mchil/poclbm/raw/master/BitcoinMiner.cl
wget --no-check-certificate https://github.com/m0mchil/poclbm/raw/master/BitcoinMiner.py
wget --no-check-certificate https://github.com/m0mchil/poclbm/raw/master/poclbm.py

Step 3: get sha256.py

wget --no-check-certificate https://github.com/m0mchil/poclbm/raw/master/sha256.py

Step 4: run!

~/bitcoin-0.3.19/bin/64/bitcoin -server&
python poclbm.py -d 0 --user un --pass pw

This also works for pooled mining

Sources:
http://wiki.tiker.net/PyOpenCL/Installation/Linux/Ubuntu
http://forum.bitcoin.org/?topic=2636