The guide shows you how to set up a headless Vertcoin Miner on Ubuntu 13.10

Vertcoin is different in that it uses N-Scrypt so it requires a different set up then other alt-coins

part 1:

########################################################

sudo su

apt-get update && apt-get upgrade -y && apt-get install -y build-essential gcc make cmake mc python-dev subversion git bzip2 unzip xorg python2.7 python-numpy python-scipy libcurl4-openssl-dev libncurses5-dev pkg-config automake yasm libtool libboost-all-dev python-setuptools

cd ~

mkdir download

cd download

wget –referer http://support.amd.com/en-us/kb-articles/Pages/latest-linux-beta-driver.aspx http://www2.ati.com/drivers/beta/amd-catalyst-13.11-betaV9.95-linux-x86.x86_64.zip

unzip amd-catalyst-13.11-betaV9.95-linux-x86.x86_64.zip

rm amd-catalyst-13.11-betaV9.95-linux-x86.x86_64.zip

chmod +x amd-catalyst-13.11-betaV9.95-linux-x86.x86_64.run

./amd-catalyst-13.11-betaV9.95-linux-x86.x86_64.run –force

aticonfig –adapter=all –initial

reboot

part 2:

############################################################

sudo su

pico /etc/init.d/xinit

~~~~~copy & paste~~~~~

#!/bin/bash

# standard functions library

. /lib/lsb/init-functions

# Start the xinit

start() {

# Start xinit on background and redirect stdout and stderr to log file

echo “Starting xinit”

xinit &> /var/log/xinit.log &

}

# Restart the xinit

stop() {

echo “Stopping xinit”

killall xinit

}

### main logic ###

case “$1” in

start)

start

;;

stop)

stop

;;

status)

status xinit

;;

restart|reload|condrestart)

stop

start

;;

*)

echo $”Usage: $0 {start|stop|restart|reload|status}”

exit 1

esac

exit 0

~~~~~copy & paste~~~~~

chmod +x /etc/init.d/xinit

update-rc.d xinit defaults 90

export DISPLAY=:0

echo export DISPLAY=:0 >> ~/.bashrc

aticonfig –adapter=all –initial

reboot

Test if correct:

export DISPLAY=:0

sudo aticonfig –adapter=all –odgt

fglrxinfo

output should be sth like:

Adapter 0 – AMD Radeon R9 200 Series

Sensor 0: Temperature – 48.00 C

Adapter 1 – AMD Radeon R9 200 Series

Sensor 0: Temperature – 47.00 C

display: :0 screen: 0

OpenGL vendor string: Advanced Micro Devices, Inc.

OpenGL renderer string: AMD Radeon R9 200 Series

OpenGL version string: 4.3.12614 Compatibility Profile Context 13.25.18

display: :0 screen: 1

OpenGL vendor string: Advanced Micro Devices, Inc.

OpenGL renderer string: AMD Radeon R9 200 Series

OpenGL version string: 4.3.12614 Compatibility Profile Context 13.25.18

part 3:

#########################################################

download amd app sdk and ADL

cd ~/Downloads

curl -o amd-app-sdk.tgz http://blog.truepps.com/downloads/AMD/AMD-APP-SDK-v2.9-lnx64.tgz

#change to SDK directory

cd ~/Downloads/AMD-APP-SDK

#uncompress sdk package

tar -xf amd-app-sdk.tgz

#install SDK

sudo ./Install-AMD-APP.sh

#reboot!

sudo reboot

cd ~/download/

wget https://pypi.python.org/packages/source/p/pyopencl/pyopencl-2013.2.tar.gz

sudo tar zxfv pyopencl-2013.2.tar.gz -C /opt

cd /opt/pyopencl-2013.2/

sudo sh -c ‘echo “/opt/AMDAPP/lib/x86_64/” >> /etc/ld.so.conf.d/local.conf’

sudo ./configure.py –cl-inc-dir=/opt/AMDAPP/include/ –cl-lib-dir=/opt/AMDAPP/lib/x86_64

sudo ldconfig

source ~/.bashrc

make -j3

sudo make install

cd ~/download/

wget https://eclipsemc.com/files/python-jsonrpc.tar.gz

sudo tar xvfz python-jsonrpc.tar.gz -C /opt

cd /opt/python-jsonrpc/

sudo python setup.py install

#Download ADL_SDK_6.0.zip from TruePPS server

cd ..

curl -o ADL_SDK.zip http://blog.truepps.com/downloads/AMD/ADL_SDK_6.0.zip

unzip ADL_SDK.zip -d /opt/AMD-ADL/

cd ~/

git clone https://github.com/Bufius/vertminer-gpu.git

cp /opt/AMD-ADL/include/* ~/vertminer-gpu/ADL_SDK/

cd vertminer-gpu

./autogen.sh

./configure

sudo make install

cd ~/

Part 4:

We’re almost done—now we just need to create a few simple scripts to control vertminer.

cd ..

Type the following to create a new file with nano, a Linux text editor:

sudo nano mine_vertcoins.sh

Type the following into nano (note where the places you need to substitute your own usernames!) :

#!/bin/sh

export DISPLAY=:0

export GPU_MAX_ALLOC_PERCENT=100

export GPU_USE_SYNC_OBJECTS=1

cd /home/YOUR_UBUNTU_USERNAME/vertminer0.5.3/vertminer-gpu

vertminer –nscrypt -I 15 –thread-concurrency 21712 -o stratum+tcp://eu.bitcrush.info:3444 -u USERNAME -p PASSWORD

Save the file and quit nano, then enter the following:

sudo chmod +x mine_vertcoins.sh

Remember to put in your username and password! Also, this is where you put in all your settings (i.e gpu-engine, gpu-memclock, gpu-fan, etc…)

Part 5: Create auto-start scripts

We want vertminer to automatically start mining whenever the rig is powered on. That way, we keep mining losses to a minimum whenever a power outage occurs, and we don’t have to worry about manually starting it back up in other situations.

Type the following to create a new script and open it in nano:

sudo nano miner_launcher.sh

Enter the following text into the editor (substitute your ubuntu username where shown!):

#!/bin/bash

DEFAULT_DELAY=0

if [ “x$1” = “x” -o “x$1” = “xnone” ]; then

DELAY=$DEFAULT_DELAY

else

DELAY=$1

fi

sleep $DELAY

su YOUR_UBUNTU_USERNAME -c “screen -dmS cgm /home/YOUR_UBUNTU_USERNAME/mine_vertcoins.sh“

Save and quit nano, and then type:

sudo chmod +x miner_launcher.sh

Now we need to call our new script during startup; we do that by adding it to /etc/rc.local. Type the following to open /etc/rc.local in nano:

sudo nano /etc/rc.local

Add the following text, right above the line that reads “exit 0″ (substitute your own username!):

/home/YOUR_UBUNTU_USERNAME/miner_launcher.sh 30 &

Part 6: Create an alias to easily check on vertminer

We’re essentially done at this point, but you’ll probably want to manually SSH into your miner from time to time to manually check on your GPU temperatures & hashrates, etc. Creating an alias will make that easy.

Type:

sudo nano .bashrc

Scroll to the end of the file, and then add this text above the line that reads “# enable programmable completion…”

alias cgm=’screen -x cgm’

Save and quit out of nano.

That’s it—you’re done! You’ll probably want to test everything now. The easiest way to do that is to close your Putty session and power down your miner. Turn it back on and log into your machine using SSH, type in “cgm”.