bitcoin
Really verbose instructions on Bitcoin mining with Ubuntu 11.04 Natty Narwhal
This is simply a log of what I did to my machine while I was getting mining working. It will probably cause your computer to catch fire. If you think fire is fun to look at, then proceed with reading or even following these instructions.
I like to have more use for my computers than just mining, like sitting down at it to use a web browser, so this is not a headless configuration.
I installed the ubuntu-11.04-dvd-amd64.iso.torrent version of Ubuntu onto an AMD-core tower with /boot, encrypted swap, and encrypted / in three primary partitions using the text installer. The packages I picked were the Ubuntu Desktop group (default) and OpenSSH server.
When it booted, I removed 2 Gnome workspaces for a total of 2 and then installed all the updates recommended by the Update Manager GUI. While waiting for the updates to download and install, I installed the following firefox addons:
https://addons.mozilla.org/en-US/firefox/addon/duck-duck-go-ssl-search-p...
https://www.eff.org/https-everywhere/
https://addons.mozilla.org/en-US/firefox/addon/adblock-plus/
https://addons.mozilla.org/en-US/firefox/addon/betterprivacy/
https://www.torproject.org/torbutton/
https://addons.mozilla.org/en-US/firefox/addon/force-tls/
https://addons.mozilla.org/en-US/firefox/addon/beef-taco-targeted-advert...
https://addons.mozilla.org/en-US/firefox/addon/lazarus-form-recovery/
https://addons.mozilla.org/en-us/firefox/addon/invisiblehand/
https://addons.mozilla.org/en-US/firefox/addon/retailmenot/
https://addons.mozilla.org/en-US/firefox/addon/downthemall/
I did not install the restricted video drivers recommended by Ubuntu for my Radeon 6790.
Reboot. Wasn't requested, but just making sure updates are happy.
In System - Preferences - Appearance, I switched to Radiance.
In Synaptic Package manager, I added the Canonical Partners repo and allowed statistical information.
In Firefox, I un-checked to block web attacks and forgeries and told sites I don't want to be tracked.
sudo apt-get install libqtgui4
sudo apt-get install python-setuptools python-numpy subversion g++ libboost-all-dev
sudo apt-get install dkms libc6-i386 lib32gcc1
cd ~/Download
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 rebootcd ~
mkdir bitcoin
cd bitcoin
wget http://downloads.sourceforge.net/project/bitcoin/Bitcoin/bitcoin-0.3.23/...
tar xzvf bitcoin-0.3.23-linux.tar.gz
mkdir -p ~/.bitcoin
echo "rpcuser=user" >> ~/.bitcoin/bitcoin.conf
echo "rpcpassword=password" >> ~/.bitcoin/bitcoin.confApparently the python-jsonrpc build makes links inside the SVN checkout directory, so put it where you actually want it.
cd ~
svn checkout http://svn.json-rpc.org/trunk/python-jsonrpc
cd python-jsonrpc/
sudo python setup.py installcd ~
wget http://download2-developer.amd.com/amd/APPSDK/AMD-APP-SDK-v2.4-lnx64.tgz
tar xzvf 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.tgzcd ~
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 installwget http://svn3.xp-dev.com/svn/phoenix-miner/files/phoenix-1.50.tar.bz2
tar xvf phoenix*.bz2sudo touch /usr/local/bin/startminer.sh
sudo chmod 755 /usr/local/bin/startminer.sh
sudo gedit /usr/local/bin/startminer.shHOMEDIR=/home/david
MINERSERV=api.bitcoin.cz:8332
MINERUSER=username.machine${1}
MINERPASS=password${1}
export AMDAPPSDKROOT=${HOMEDIR}/AMD-APP-SDK-v2.4-lnx64/
export AMDAPPSDKSAMPLESROOT=${HOMEDIR}/AMD-APP-SDK-v2.4-lnx64/
export LD_LIBRARY_PATH=${AMDAPPSDKROOT}lib/x86_64:${LD_LIBRARY_PATH}
DISPLAY=:0 aticonfig --od-enable --adapter=all
DISPLAY=:0 aticonfig --od-setclocks=850,1050 --adapter=${1}
cd ${HOMEDIR}/phoenix-1.50
echo "Starting Miner: ${1}"
${HOMEDIR}/phoenix-1.50/phoenix.py -u http://${MINERUSER}:${MINERPASS}@${MINERSERV} -k phatk VECTORS FASTLOOP BFI_INT AGGRESSION=6 DEVICE=${1}I did confirm that phatk is faster on my Radeon HD 6790 than poclbm. Aggression 7 is usable, but you can notice a difference in the responsiveness of the desktop. Setting the clock at 930 didn't crash the system, but made windows draw incorrectly, which didn't resolve until I took it back down to 850 (840 is the default). Memory changes made no big difference.
My understanding to do solo mining is that if I run bitcoind from the official bitcoin package, I'd be able to use the credentials I setup in the .bitcoin directory to do localhost mining on a second GPU. Then I could have one GPU in a pool, and a second doing the lone search for a full prize 50 block.
Reference material:
http://forum.bitcoin.org/index.php?topic=9239.0
http://forum.bitcoin.org/index.php?topic=7514.0;topicseen
http://sectio-aurea.blogspot.com/2011/05/bitcoin-mining-on-ubuntu-1104-n...
