Ethereum mining rigs setup on Linux for the layman


So you wanted to start mining and put your spare computers and GPUs to work? Then you read/watch/replay the tutorials online and asked yourself, should I go with Linux or Windows? I'm a PC girl and have never use Linux 😵 before but I chose Linux for better performance (or simply because I'm greedy)

All my rigs are headless and controlled remotely after the initial setup. I enjoy monitoring them a far and making sure everything is working as planned. I make sure I use as little electricity as possible because my GPUs are the power hungry R9 290X. These GPUs also run hot to prevent fire hazard 😱 and extend the life of these mining veterans fan control is an important part of the setup.

Preparation

Things you'll need to setup a rig:

  • Build your rig
  • 16GB flash drive to install the operating system (I use Linux 14.01.01)
  • A monitor
  • A keyboard
  • Ethernet cable if your rig is not connected to the internet already
  • Make sure your circuit can support your rig

To start, unplug all your GPU from the rig before turning on your rig

This is to make sure the OS doesn't try to be cute and install drivers for you

Update the dist and packages

sudo apt-get dist-upgrade
sudo apt update

Get and set SSH

that way you'll be able to remote to the miners and don't need a monitor and keyboard to operate it anymore.

sudo apt-get install openssh-server
sudo service ssh status
sudo apt-get install curl

Turn off your rig and plug in all the GPUs and then we'll download the drivers

I'm using AMD Sapphire R9 290X so I will be using an AMD driver. If you have a GTX you'll have to research about which driver is best for you

sudo apt-get install fglrx
sudo apt-get install fglrx-updates fglrx-amdcccle-updates fglrx-updates-dev
sudo amdconfig --initial --adapter=all -f

sudo reboot

Now to download and install the miner software

for ethereum
cd ~/Downloads
wget https://github.com/nanopool/Claymore-Dual-Miner/releases/download/v9.6/Claymore.s.Dual.Ethereum.Decred_Siacoin_Lbry_Pascal.AMD.NVIDIA.GPU.Miner.v9.6.-.LINUX.tar.gz

sudo mkdir /usr/local/claymoreEth
sudo tar -xvf Claymore.s.Dual.Ethereum.Decred_Siacoin_Lbry_Pascal.AMD.NVIDIA.GPU.Miner.v9.6.-.LINUX.tar.gz -C /usr/local/claymoreEth

for zcash
cd ~/Downloads
wget https://github.com/nanopool/ClaymoreZECMiner/releases/download/v12.5/Claymore.s.ZCash.AMD.GPU.Miner.v12.5.-.LINUX.tar.gz

sudo mkdir /usr/local/claymoreZcash
sudo tar -xvf Claymore.s.ZCash.AMD.GPU.Miner.v12.5.-.LINUX.tar.gz -C /usr/local/claymoreZcash

Setting up the miner

for ethereum
cd /usr/local/claymoreEth
sudo chmod u+s ethdcrminer64
sudo nano mine.sh

#!/bin/sh
export GPU_FORCE_64BIT_PTR=0
export GPU_MAX_HEAP_SIZE=100
export GPU_USE_SYNC_OBJECTS=1
export GPU_MAX_ALLOC_PERCENT=100
export GPU_SINGLE_ALLOC_PERCENT=100
./ethdcrminer64

sudo chmod +x mine.sh
for zcash
cd /usr/local/claymoreZcash
sudo chmod u+s zecminer64
sudo nano mine.sh

#!/bin/sh
export GPU_MAX_ALLOC_PERCENT=100
./zecminer64

sudo chmod +x mine.sh

Checking the miner setup to make sure it works

./mine.sh

Update miner's config for pool mining

for ethereum
sudo nano config.txt

-zpool us2.ethermine.org:4444
-zwal [YOUR WALLET ADDRESS]
-epsw x
-mode 1
-eworker [RIGNAME]
-ftime 10
-tstop 80
-tt 73
-fanmin 70
-fanmax 80
-powlim -20 //this is how you undervolt your cards, we figure out this is our optimal number but you might want to play around with this value to find the best for your card.
for zcash
-zpool us1-zcash.flypool.org:3333
-zwal [YOUR WALLET.RIGNAME]
-zpsw x
-ftime 1
-tstop 80
-tt 75
-fanmin 75
-fanmax 80
-i 9
-powlim 28

Lets get Screen, so you can multi-task on linux

sudo apt install screen

Put your miner to run in Screen ( the following is my zcash example, substitute zminer with your ethereum miner for ethereum)

cd ~
sudo nano zminer_launcher.sh

#!/bin/bash
DEFAULT_DELAY=0
if [ "x$1" = "x" -o "x$1" = "xnone" ]; then
   DELAY=$DEFAULT_DELAY
else
   DELAY=$1
fi
sleep $DELAY
cd /usr/local/claymoreZcash
su ice -c "screen -dmS ethm ./mine.sh"

sudo chmod +x zminer_launcher.sh

Now I want the miner to run when I turn on the rig

cd ~
sudo nano /etc/rc.local

Add the following text, right above the line that reads “exit 0”: (note this example is for zcash)

/home/[YOUR USERNAME]/zminer_launcher.sh 15 &

sudo nano .bashrc

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

alias zminer='screen -x ethm'

sudo reboot

Your rig should restart and 15 seconds after restart, your miner should start running

I hope you find this tutorial helpful - I documented all my steps so I can repeat them easily :) If you find this post helpful or have a mining improvement idea for me, leave me a comment and upvote the post.

Happy mining, xoxo 🎉

H2
H3
H4
3 columns
2 columns
1 column
Join the conversation now
Logo
Center