Debian scrypt mining tutorial (AMD)

1. Install Debian Wheezy

Download Debian Wheezy from http://www.debian.org/CD/http-ftp/#stable and run the installation.

2. Install packages

Edit /etc/apt/sources.list and add contrib non-free to each line that starts with deb.
# sed -i 's/^deb .*/& contrib non-free/g' /etc/apt/sources.list
# apt-get update && apt-get upgrade
# apt-get install bzip2 fglrx-driver libcurl4-openssl-dev libncurses5-dev libudev-dev ntp screen unzip xdm xorg pkg-config libtool autoconf automake git-core firmware-linux-nonfree
# apt-get purge libfglrx

3. Install AMD Catalyst drivers

Download

Download amd-catalyst-13.11-beta-v9.4-linux-x86.x86_64.run.zip from http://support.amd.com/en-us/kb-articles/Pages/latest-linux-beta-driver.aspx

Download AMD-APP-SDK-v2.9-lnx64.tgz from http://developer.amd.com/tools-and-sdks/heterogeneous-computing/amd-accelerated-parallel-processing-app-sdk/downloads/

Download ADL_SDK_6.0.zip from http://developer.amd.com/tools-and-sdks/graphics-development/display-library-adl-sdk/

Install driver

# unzip amd-catalyst-13.11-beta-v9.4-linux-x86.x86_64.run.zip
# chmod +x amd-catalyst-13.11-beta-v9.4-linux-x86.x86_64.run
# ./amd-catalyst-13.11-beta-v9.4-linux-x86.x86_64.run --force
# aticonfig --adapter=all --initial

Install AMD APP SDK v2.9

# tar xfvz AMD-APP-SDK-v2.9-lnx32.tgz
# chmod +x Install-AMD-APP.sh
# ./Install-AMD-APP.sh

Update /etc/profile

Add the following lines to the bottom of /etc/profile
export DISPLAY=:0
export GPU_MAX_ALLOC_PERCENT=100
export GPU_USE_SYNC_OBJECTS=1
export XAUTHORITY=/.Xauthority

Reboot

# reboot

Extract ADL SDK 6.0

# unzip ADL_SDK_6.0.zip

4. Install sgminer

Download latest sgminer from git.
# git clone https://github.com/veox/sgminer.git
Copy ADL_SDK files to sgminer directory
# cp include/* sgminer/ADL_SDK/
Compile sgminer
# cd sgminer
# autoreconf -i
# CFLAGS="-O2 -Wall -march=native" ./configure
# make
# make install
Create configuration
# mkdir ~/.sgminer
Then edit ~/.sgminer/sgminer.conf with your configuration. Example configuration for 280x available here.

5. Starting sgminer

Start by starting a screen session if you have not already done so
# screen
If you have a screen session running you can instead reattach by running
# screen -rd
Start sgminer
# sgminer