Search This Blog

Tuesday, September 24, 2013

Ubuntu Miner Guide

Please note: These instructions are for setting up a dedicated mining rig.



They effectively corrupt the integrity of your OS, so should ideally not be used for anything else.





ATI Drivers, AMD SDK and Other tools



Install Ubuntu on a system that can support ATI GPUs suitable for mining
See Mining hardware comparison

Load a clean install of Ubuntu Natty 11.04 64-bit Desktop. Installing Ubuntu is fairly easy, but beyond the scope of this document.


If you’re using a pre-existing install, proceed at your own risk.

Download: http://www.ubuntu.com/download/ubuntu/downloadBoot, login to the desktop, then open up a terminal window (ctrl+alt+t).


Remove NVidia crap. Update and Upgrade.

sudo apt-get remove nvidia-common
sudo apt-get update
sudo apt-get install aptitude
sudo aptitude dist-upgrade

Install some tools

sudo apt-get install python-setuptools python-numpy subversion g++ libboost-all-dev libqtgui4 openjdk-6-jre subversion git screen openssh-server

Download and install ATI Driver 11.6 for Linux 64bit. Enter ’1′ for the install option when prompted.

cd ~
wget http://www2.ati.com/drivers/linux/ati-driver-installer-11-6-x86.x86_64.run
chmod +x ati-driver-installer-11-6-x86.x86_64.run
sudo ./ati-driver-installer-11-6-x86.x86_64.run --force
sudo apt-get -f install
sudo cp /etc/X11/xorg.conf /etc/X11/xorg.conf.backup
sudo rm /etc/X11/xorg.conf
sudo aticonfig -f --initial --adapter=all
sudo reboot

Download and install AMD APP SDK 2.4 for Linux 64bit.

cd ~
wget http://download2-developer.amd.com/amd/APPSDK/AMD-APP-SDK-v2.4-lnx64.tgz
tar xvzf AMD-APP-SDK-v2.4-lnx64.tgz
echo export AMDAPPSDKROOT=${HOME}/AMD-APP-SDK-v2.4-lnx64/ >> ~/.bashrc
echo export AMDAPPSDKSAMPLESROOT=${HOME}/AMD-APP-SDK-v2.4-lnx64/ >> ~/.bashrc
echo 'export LD_LIBRARY_PATH=${AMDAPPSDKROOT}lib/x86_64:${LD_LIBRARY_PATH}' >> ~/.bashrc
source ~/.bashrc
cd /
sudo tar xfz $AMDAPPSDKROOT/icd-registration.tgz

Install python-jsonrpc

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

Download, Compile and Install pyopencl-0.92

cd ~
wget http://pypi.python.org/packages/source/p/pyopencl/pyopencl-0.92.tar.gz
tar xzvf pyopencl-0.92.tar.gz
cd pyopencl-0.92
./configure.py --cl-inc-dir=${AMDAPPSDKROOT}include --cl-lib-dir=${AMDAPPSDKROOT}lib/x86_64
make
sudo make install

Check that the ATI Driver is working

cd ~
DISPLAY=:0 sudo fglrxinfo

Check that OpenCL is working

cd ~
cd AMD-APP-SDK-v2.4-lnx64/bin/x86_64
./clinfo

Open port 22 for SSH. This is for remote admin later.

sudo ufw enable
sudo ufw allow 22


Uninstall ATI Drivers


As new releases of the ATI driver come out, you can uninstall the current version with the command below. You can re-install as described above.

sudo sh /usr/share/ati/amd-uninstall.sh


Mining Software


FIXME



Overclocking ATI GPUs


YOU WILL DAMAGE YOUR HARDWARE DOING THIS


List GPUs

aticonfig --lsa

Set Fan Speed. Change Display number for each GPU. The last number is the fanspeed, below we set fans to 100% on 3 GPUs.

export DISPLAY=:0.0; aticonfig --pplib-cmd "set fanspeed 0 100";
export DISPLAY=:0.1; aticonfig --pplib-cmd "set fanspeed 0 100";
export DISPLAY=:0.2; aticonfig --pplib-cmd "set fanspeed 0 100";

Enbable OverDrive

aticonfig --od-enable

Get Capabilities of your GPUs.

aticonfig --odgc --adapter=all

Set Clock for all GPUs. Set the first number to the highest ‘Configurable Peak Range’ of the Core (from previous step). Set the second number to the Lowest Configurable Peak Range of the Memory (from previous step). You will want to tweak these settings to your specific hardware. Cooling, PSU, Brand, Voodoo all have an affect. You can go over the peak ranges. Be careful here. Bad values will cause your PC to lockup, you can damage hardware etc.

aticonfig --odsc=840,1250 --adapter=all

Display the temperature of your GPUs

aticonfig --odgt --adapter=all

Show fan speed. Change Display number for each GPU. Here we show the fan speeds for 3 GPUs.

export DISPLAY=:0.0; aticonfig --pplib-cmd "get fanspeed 0";
export DISPLAY=:0.1; aticonfig --pplib-cmd "get fanspeed 0";
export DISPLAY=:0.2; aticonfig --pplib-cmd "get fanspeed 0";


Scripts



Miner Startup


Here’s an example of a script that simplifies starting your miners.

Create the script file, make it executable, open it for editing.

cd ~
touch eligius.sh
chmod +x eligius.sh
nano eligius.sh

Paste the following into eligius.sh. This example is for GPU 0. It sets the fan speed to 80%, enables Overclocking, sets the clock speeds and starts mining.

CHANGE the clock speeds to your specific hardware, the username for the miner login, and the -v and -w values to your hardware.

To Save the changes, ‘CTRL+x’ to exit, ‘y’ to save. ‘Enter’ to confirm.

cd ~/luke-jrs-poclbm
export DISPLAY=:0.0
aticonfig --pplib-cmd "set fanspeed 0 80"
aticonfig --od-enable
aticonfig --odsc=900,1000 --adapter=all
python poclbm.py -d0 -v -w128 YourBitCoinAddress:x@mining.eligius.st:8337

Run Script

cd ~
./eligius.sh




Guugll Search


http://www.guugll.eu/ubuntu-miner-guide/

No comments:

Post a Comment