Bitcoin Forum
May 08, 2024, 08:58:18 AM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1] 2 »  All
  Print  
Author Topic: [HowTo] Ubuntu 11.04 Desktop 32-bit mining install guide  (Read 14707 times)
Joema (OP)
Newbie
*
Offline Offline

Activity: 8
Merit: 0


View Profile
May 30, 2011, 06:12:57 AM
Last edit: June 08, 2011, 11:15:34 AM by Joema
 #1

To start GPU Bitcoin mining the following steps need to be completed:

Preparing the environment for installation.
Install the ATI Linux 32-bit Drivers (version 11.5)
Install the AMD Stream 32-bit SDK (version 2.4)
Install pyopencl (0.92)
Install python-jsonrpc

Install a Bitcoin client:
   - poclbm (recommended)
   - phoenix (version 1.48)


## Preparing the environment for installation.

A default installation of Ubuntu 11.04 32-bit is recommended.

Once installation is successful, and the system has been rebooted by the installer, login in and open a terminal window (Applications -> Accessories -> Terminal). Type or copy/paste the following:

Code:
cd ~
sudo apt-get update
sudo apt-get install python-setuptools python-numpy subversion g++ libboost-all-dev libqtgui4 openntpd

## Installing the ATI Linux 32-bit Drivers (version 11.5)

Code:
cd ~
sudo aptitude install dkms
wget http://www2.ati.com/drivers/linux/ati-driver-installer-11-5-x86.x86_64.run
sudo sh ati-driver-installer-11-5-x86.x86_64.run --buildpkg Ubuntu/natty
sudo dpkg -i *.deb
sudo apt-get -f install
sudo aticonfig -f --initial --adapter=all
sudo reboot

After the system has rebooted, login in and open a terminal window (Applications -> Accessories -> Terminal). Type or copy/paste the following:

## Verify installation of ATI drivers

Code:
cd ~
DISPLAY=:0 sudo fglrxinfo

## Installing the AMD Stream 32-bit SDK (version 2.4)

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

## Verify installation of OpenCL

Code:
cd ~/AMD-APP-SDK-v2.4-lnx32/bin/x86
./clinfo

## Installing pyopencl-0.92

Code:
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/
make
sudo make install

## Installing python-jsonrpc

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

## Installing a Bitcoin client (pick one of the following):

## Installing poclbm (recommended)

Code:
cd ~
sudo apt-get install git-core
git clone git://github.com/m0mchil/poclbm poclbm
chmod +x poclbm/poclbm.py

## Verify poclbm is installed correctly

Code:
cd ~
chmod +x poclbm/poclbm.py
cd poclbm/
./poclbm.py

You should see you GPU and CPU listed here, i.e.

Code:
[0] Juniper << --- your GPU
[1] Intel(R) Core(TM)2 Duo CPU E6750 @ 2.66GHz << --- your CPU

Note: The number in square brackets ([]) is the device id.

To start mining with poclbm (in a pool), you can try these settings:

Code:
./poclbm.py -d<device id> --host=<pool server> --port=<pool port> --user=<pool username> --pass=<pool password> -v -w128 -f 1

## Installing phoenix (version 1.48)
Code:
cd ~
wget http://svn3.xp-dev.com/svn/phoenix-miner/files/phoenix-1.48.tar.bz2
tar -jxvf phoenix*.bz2
chmod +x phoenix-1.48/phoenix.py

To start mining with phoenix (in a pool), you can try these settings:

Code:
phoenix-1.48/phoenix.py -u http://<pool username>:<pool password>@<pool server>:<pool port> -q 5 -k phatk VECTORS BFI_INT FASTLOOP AGGRESSION=4 DEVICE=<device id> WORKSIZE=128
------

Some gotchas:

2. If you are building a system from scratch, before installing ubuntu, make sure you have installed ALL of your graphics cards on your motherboard first. Otherwise you're going to run into some mess dealing with an xorg.conf file thing to get subsequently added cards up and running. Took my friends and I forever to figure that one out! Smiley


If you made us of this guide please send a donation to 1GGFpiLb9TVUGHK2qdd1xDbp8RwtBkaHDM
1715158698
Hero Member
*
Offline Offline

Posts: 1715158698

View Profile Personal Message (Offline)

Ignore
1715158698
Reply with quote  #2

1715158698
Report to moderator
1715158698
Hero Member
*
Offline Offline

Posts: 1715158698

View Profile Personal Message (Offline)

Ignore
1715158698
Reply with quote  #2

1715158698
Report to moderator
Each block is stacked on top of the previous one. Adding another block to the top makes all lower blocks more difficult to remove: there is more "weight" above each block. A transaction in a block 6 blocks deep (6 confirmations) will be very difficult to remove.
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction.
1715158698
Hero Member
*
Offline Offline

Posts: 1715158698

View Profile Personal Message (Offline)

Ignore
1715158698
Reply with quote  #2

1715158698
Report to moderator
1715158698
Hero Member
*
Offline Offline

Posts: 1715158698

View Profile Personal Message (Offline)

Ignore
1715158698
Reply with quote  #2

1715158698
Report to moderator
1715158698
Hero Member
*
Offline Offline

Posts: 1715158698

View Profile Personal Message (Offline)

Ignore
1715158698
Reply with quote  #2

1715158698
Report to moderator
CubedRoot
Sr. Member
****
Offline Offline

Activity: 291
Merit: 250


View Profile
May 30, 2011, 09:41:12 PM
 #2

Thanks for the guide. Going to try this on a fresh install.
CubedRoot
Sr. Member
****
Offline Offline

Activity: 291
Merit: 250


View Profile
May 31, 2011, 12:36:29 AM
 #3

This worked for me!  Mining at full hasrates on t 5850's

I have a questions.  When we installed AMD Stream, did the commands actually install that in the home dir of the current user?
Quote
## Installing the AMD Stream 32-bit SDK (version 2.4)
cd ~
wget http://download2-developer.amd.com/amd/APPSDK/AMD-APP-SDK-v2.4-lnx32.tgz
tar xvzf AMD-APP-SDK-v2.4-lnx32.tgz
echo export AMDAPPSDKROOT=${HOME}/AMD-APP-SDK-v2.4-lnx32/ >> ~/.bashrc
echo export AMDAPPSDKSAMPLESROOT=${HOME}/AMD-APP-SDK-v2.4-lnx32/ >> ~/.bashrc
echo 'export LD_LIBRARY_PATH=${AMDAPPSDKROOT}lib/x86:${LD_LIBRARY_PATH}' >> ~/.bashrc
source ~/.bashrc
sudo tar xvfz $AMDAPPSDKROOT/icd-registration.tgz -C /

I am just a little confused at the tar locations and the exports I guess.
SchizophrenicX
Member
**
Offline Offline

Activity: 112
Merit: 100

"I'm not psychic; I'm just damn good"


View Profile
May 31, 2011, 03:47:18 AM
 #4

Hi, is it possible to do all in one boot? Or do you have to reboot? I'm trying to get this to run as a script. I might be building 2 more rigs and I've never run Linux nor wrote scripts before -.-

Joema (OP)
Newbie
*
Offline Offline

Activity: 8
Merit: 0


View Profile
May 31, 2011, 05:40:07 AM
 #5

This worked for me!  Mining at full hasrates on t 5850's

I had a sneaking suspicion it would Smiley

I have a questions.  When we installed AMD Stream, did the commands actually install that in the home dir of the current user?

Yip, AMD stream is installed to the users home dir. This wont be a problem for single user systems, which I assumed would the vast majority.
Joema (OP)
Newbie
*
Offline Offline

Activity: 8
Merit: 0


View Profile
May 31, 2011, 05:46:44 AM
 #6

Hi, is it possible to do all in one boot? Or do you have to reboot? I'm trying to get this to run as a script. I might be building 2 more rigs and I've never run Linux nor wrote scripts before -.-

I've never tried doing it without a reboot.

One thing I don't like about scripts is that if there is an error the screen may whizz-by too fast which could leave you with a machine that doesnt want to boot or you with less hair from trying to figure out why something isnt working the way it should. In any case, you should be able to just copy/paste the large majority of the instructions.
SchizophrenicX
Member
**
Offline Offline

Activity: 112
Merit: 100

"I'm not psychic; I'm just damn good"


View Profile
May 31, 2011, 06:01:10 AM
 #7

Yea I see that the it's 32-bit install working too. I see that the two have vastly different commands. Why is that?

Anyway how do I write a script and run ? I'd like to try doing it

Joema (OP)
Newbie
*
Offline Offline

Activity: 8
Merit: 0


View Profile
May 31, 2011, 06:41:47 AM
 #8

Here are 2 scripts that complete this install as described above. They have been tested, but YMMV

step1.sh

Code:
#!/bin/bash

echo ""
echo "##### Preparing the environment for installation #####"
echo ""
sudo apt-get update -y
sudo apt-get install python-setuptools python-numpy subversion g++ libboost-all-dev libqtgui4 openntpd -y

echo ""
echo "##### Install the ATI Linux 32-bit Drivers (version 11.5) #####"
echo ""
cd ~
sudo aptitude install dkms -y
wget -c http://www2.ati.com/drivers/linux/ati-driver-installer-11-5-x86.x86_64.run
sudo sh ati-driver-installer-11-5-x86.x86_64.run --buildpkg Ubuntu/natty
sudo dpkg -i *.deb
sudo apt-get -f install
sudo aticonfig -f --initial --adapter=all
#sudo reboot
echo ""
echo ""
echo "This part of the installation is now complete. Please reboot the system before continuing."
echo ""
echo "You can accomplish this by issuing the command 'sudo reboot'"
echo ""
echo ""

step2.sh

Code:
#!/bin/bash

echo ""
echo "##### Install the AMD Stream 32-bit SDK (version 2.4) #####"
echo ""
cd ~
wget -c http://download2-developer.amd.com/amd/APPSDK/AMD-APP-SDK-v2.4-lnx32.tgz
tar xvzf AMD-APP-SDK-v2.4-lnx32.tgz
echo export AMDAPPSDKROOT=${HOME}/AMD-APP-SDK-v2.4-lnx32/ >> ~/.bashrc
echo export AMDAPPSDKSAMPLESROOT=${HOME}/AMD-APP-SDK-v2.4-lnx32/ >> ~/.bashrc
echo export LD_LIBRARY_PATH=${AMDAPPSDKROOT}lib/x86:${LD_LIBRARY_PATH} >> ~/.bashrc
source ~/.bashrc
sudo tar xvfz $AMDAPPSDKROOT/icd-registration.tgz -C /

echo ""
echo "##### Install pyopencl (0.92) #####"
echo ""
cd ~
wget -c 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/
make
sudo make install

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

echo ""
echo "##### poclbm (recommended) #####"
echo ""
cd ~
sudo apt-get install git-core -y
git clone git://github.com/m0mchil/poclbm poclbm
chmod +x poclbm/poclbm.py

Found this useful, please consider a donation 1GGFpiLb9TVUGHK2qdd1xDbp8RwtBkaHDM
SchizophrenicX
Member
**
Offline Offline

Activity: 112
Merit: 100

"I'm not psychic; I'm just damn good"


View Profile
May 31, 2011, 07:14:03 AM
 #9

Wow awesome. How do I run the scripts?

Joema (OP)
Newbie
*
Offline Offline

Activity: 8
Merit: 0


View Profile
May 31, 2011, 08:24:33 AM
 #10

Wow awesome. How do I run the scripts?

from a terminal window run:

Code:
/bin/bash step1.sh

then after the reboot:

Code:
/bin/bash step2.sh
greatscott
Newbie
*
Offline Offline

Activity: 45
Merit: 0



View Profile
June 07, 2011, 04:11:18 PM
 #11

First off, thank you a TON for writing this Joema. Sent a small donation your way.

This is by far the best guide from starting this stuff from scratch that I've seen.

I want to add some notes, pseudo-corrections however.

1. Not being super well versed in linux, we found the following lines problematic:

Code:
1. echo export AMDAPPSDKROOT=${HOME}/AMD-APP-SDK-v2.4-lnx32/ >> ~/.bashrc
2. echo export AMDAPPSDKSAMPLESROOT=${HOME}/AMD-APP-SDK-v2.4-lnx32/ >> ~/.bashrc
3. echo 'export LD_LIBRARY_PATH=${AMDAPPSDKROOT}lib/x86:${LD_LIBRARY_PATH}' >> ~/.bashrc

where the variable AMDAPPSDKROOT doesn't get used for lines 2/3 (it just places AMDAPPSDKROOT in plain-text).

Your bashrc file should actually look like this: http://dl.dropbox.com/u/77754/bashrc (where "boss" is your user name).

2. If you are building a system from scratch, before installing ubuntu, make sure you have installed ALL of your graphics cards on your motherboard first. Otherwise you're going to run into some mess dealing with an xorg.conf file thing to get subsequently added cards up and running. Took my friends and I forever to figure that one out! Smiley


Felex
Newbie
*
Offline Offline

Activity: 7
Merit: 0


View Profile
June 07, 2011, 06:16:01 PM
 #12

Why do you recommend poclbm instead of phoenix?
brunoshady
Sr. Member
****
Offline Offline

Activity: 262
Merit: 250

Dubs Get


View Profile
June 07, 2011, 06:49:14 PM
 #13

any increase from windows to linux on hashs?

😆
Joema (OP)
Newbie
*
Offline Offline

Activity: 8
Merit: 0


View Profile
June 08, 2011, 11:14:15 AM
 #14

First off, thank you a TON for writing this Joema. Sent a small donation your way.

This is by far the best guide from starting this stuff from scratch that I've seen.

Thank you for the great feedback and donation Smiley


Code:
1. echo export AMDAPPSDKROOT=${HOME}/AMD-APP-SDK-v2.4-lnx32/ >> ~/.bashrc
2. echo export AMDAPPSDKSAMPLESROOT=${HOME}/AMD-APP-SDK-v2.4-lnx32/ >> ~/.bashrc
3. echo 'export LD_LIBRARY_PATH=${AMDAPPSDKROOT}lib/x86:${LD_LIBRARY_PATH}' >> ~/.bashrc

where the variable AMDAPPSDKROOT doesn't get used for lines 2/3 (it just places AMDAPPSDKROOT in plain-text).

I think I found the problem. It had to do with the single quotes in line 3 that caused issues. When I get a chance I will test the new instructions.

2. If you are building a system from scratch, before installing ubuntu, make sure you have installed ALL of your graphics cards on your motherboard first. Otherwise you're going to run into some mess dealing with an xorg.conf file thing to get subsequently added cards up and running. Took my friends and I forever to figure that one out! Smiley

Thanks for this. I'll add it to the original post so it doesnt get lost.
Joema (OP)
Newbie
*
Offline Offline

Activity: 8
Merit: 0


View Profile
June 08, 2011, 11:16:43 AM
 #15

Why do you recommend poclbm instead of phoenix?

I've found poclbm to give less stales and therefore better performance.
Joema (OP)
Newbie
*
Offline Offline

Activity: 8
Merit: 0


View Profile
June 08, 2011, 11:18:13 AM
 #16

any increase from windows to linux on hashs?

I pretty much run Linux exclusively, so I cant speak from personal experience. However, I have read reports that Linux does give a few extra Mhps.
greatscott
Newbie
*
Offline Offline

Activity: 45
Merit: 0



View Profile
June 08, 2011, 11:09:10 PM
 #17

has anyone had experience running poclbm-mod? https://en.bitcoin.it/wiki/Poclbm-mod - and if so, does anyone know if it works with any pool?
shelbydz
Newbie
*
Offline Offline

Activity: 8
Merit: 0


View Profile
September 22, 2011, 05:59:48 AM
 #18

Great guide. helped a ton.

I had 1 problem at the end when trying to run phoenix. I kept getting

Traceback (most recent call last):
  File "./phoenix.py", line 123, in <module>
    miner.start(options)
  File "/home/shelbydz/phoenix-1.48/Miner.py", line 75, in start
    self.kernel = self.options.makeKernel(KernelInterface(self))
  File "./phoenix.py", line 111, in makeKernel
    kernelModule = imp.load_module(module, file, filename, smt)
  File "kernels/phatk/__init__.py", line 23, in <module>
    import pyopencl as cl
  File "/usr/local/lib/python2.7/dist-packages/pyopencl-0.92-py2.7-linux-i686.egg/pyopencl/__init__.py", line 3, in <module>
    import pyopencl._cl as _cl
ImportError: libOpenCL.so.1: cannot open shared object file: No such file or directory

Everything built fine and installed fine. Doing research, it SEEMs that phoenix cannot find my SDK Library (which is exactly what is entered above). Any thoughts? I spent all night on this? I was able to get poclbm running (and at the same hash rate as before, so I'm pleased for now).

thanks for the great guide and the help.
ZodiacDragon84
Sr. Member
****
Offline Offline

Activity: 266
Merit: 250


The king and the pawn go in the same box @ endgame


View Profile
January 20, 2012, 05:28:07 AM
Last edit: January 21, 2012, 04:25:21 AM by ZodiacDragon84
 #19

edit:

## Installing python-jsonrpc

Code:

cd ~
svn checkout http://svn.json-rpc.org/trunk/python-jsonrpc
cd python-jsonrpc/
sudo python setup.py install
 
An error is thrown when trying to connect to the url. upon manually checking the url in browser, confirmed that link is dead. I am going to try installing from the instructions at this url and let every one know the results.

http://json-rpc.org/wiki/python-json-rpc

Looking for a quick easy mining solution? Check out
www.bitminter.com

See my trader rep at Bitcoinfeedback.com
!
check_status
Full Member
***
Offline Offline

Activity: 196
Merit: 100


Web Dev, Db Admin, Computer Technician


View Profile
February 25, 2012, 05:14:29 AM
 #20

In the section:

## Installing the ATI Linux 32-bit Drivers (version 11.5)

Code:
wget http://www2.ati.com/drivers/linux/ati-driver-installer-11-5-x86.x86_64.run
sudo sh ati-driver-installer-11-5-x86.x86_64.run --buildpkg Ubuntu/natty

Does this build the 11.5 driver or does it build the driver of the card for the system it's built on?
I built this on a system I don't intend it for, that has an x1950. It used an AMD 8.861 to build, ??fglrx_8.861??.deb. Was planning on just copying the .deb over to the other system.

For Bitcoin to be a true global currency the value of BTC needs always to rise.
If BTC became the global currency & money supply = 100 Trillion then ⊅1.00 BTC = $4,761,904.76.
P2Pool Server List | How To's and Guides Mega List |  1EndfedSryGUZK9sPrdvxHntYzv2EBexGA
Pages: [1] 2 »  All
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!