Tuesday, December 5, 2017

Building a XMR-STAK miner on Ubuntu

Build:  Ubuntu 17.01
cpuminer:  yes
gpuminer:  AMD

Here's the quick steps all in one spot.  My build is based on getting the basics installed locally and then doing the rest from my desk

1.  Install Ubuntu 17.10
2. Boot up
3. Ctrl-alt-t   (opens a terminal window)

sudo apt-get install ssh

4.  Back at your desk...

ssh user@miner

5. I like using webmin on my boxes..so install this first

wget http://prdownloads.sourceforge.net/webadmin/webmin_1.860_all.deb
sudo apt-get install perl libnet-ssleay-perl openssl libauthen-pam-perl libpam-runtime libio-pty-perl apt-show-versions python
sudo dpkg --install webmin_1.860_all.deb

6.  Do some basic maintenance

sudo apt-get -y update
sudo apt-get -y upgrade
sudo apt-get autoclean
sudo apt-get autoremove

7.  Somehow transfer the AMD linux driver and AMD SDK.  I use the upload/download feature in webmin to move the files.  Download them from here:

AMD Pro beta miner linux driver:


8.  Install the AMD components:

tar -Jxvf amdgpu-pro-17.40-483984.tar.xz
sudo ./amdgpu-pro-17.40-483984/amdgpu-pro-install
tar -jxvf AMD-APP-SDKInstaller-v3.0.130.136-GA-linux64.tar.bz2
sudo ./AMD-APP-SDK-v3.0.130.136-GA-linux64.sh

sudo nano /etc/default/grub
edit the following line:
GRUB_CMDLINE_LINUX_DEFAULT="quiet splash amdgpu.vm_fragment_size=9"
sudo update-grub
sudo usermod -a -G video $LOGNAME

Fix a problem with sympolic links:

cd $AMDAPPSDKROOT/lib/x86_64
sudo ln -sf sdk/libOpenCL.so.1 libOpenCL.so

9. Install components for xmr-stak and compile

sudo apt install libmicrohttpd-dev libssl-dev cmake build-essential libhwloc-dev git
    git clone https://github.com/fireice-uk/xmr-stak.git
    mkdir xmr-stak/build
    cd xmr-stak/build
    cmake .. -DCUDA_ENABLE=OFF
    make install
cd ..
mkdir bin
cp ./build/bin/* ./bin

10. Run it!

or run it in the background!

nohup ./bin/xmr-stak &

------- Optional Extras ------------

Temperature sensor:

sudo apt-get install lm-sensors
sudo sensors-detect
sudo service kmod start

Was this helpful?  Consider sending a small thank you to me:

xmr:  43nmCDSy9NBeFhdQQJLb3n5gdPzJPWviq2jCviBkJPovC7uWJ7Dj76o6ruqAvKRfCfJza3ZDFdQpUhe19TfCVHA27awvfdd

Friday, October 30, 2015

Need to debug your dns performance?

Turn to this great peice of code from Google


Rather extensively tests and reports on dns performance.  Helps considerably as most applications can appear slow...when its really just latency related to DNS performance