Ethereum mining rigs setup on Linux for the layman

in mining •  7 years ago  (edited)


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 🎉

Authors get paid when people like you upvote their post.
If you enjoyed what you read here, create your account today and start earning FREE STEEM!
Sort Order:  

Very short, to the point and informative! Well done!

Thank you @kiv - mining doesn't have to be hard right :)

Excellent post. Good and detailed instructions!

Thank you bud!

what!!!! this guide was awesome. I just wish I can a few extra bucks to throw at a mining rig!

@sleepingbear looks like the 1070 are back on market and selling for NORMAL price again. Rumor also says some miners are planning to back out because of the August 1st uncertainties. Expecting to see some discount on rigs on ebay soon.

That's good to hear. I was partial to the MSI RX480 cards myself ....sorta biased because I used them in my personal PC build :P

@qosh I wish i was good at the programming part as you are. I am lucky to have a friend who is good at that and i can support him on the financing and monitoring side of our project.
We just got another Radeon 580 to add to our third rig but those cards are now over $400 at Best Buy so making the investment not as good unless we wanted to sell complete rigs. I don't want to sell as i love mining but we may look at a redesign due to short supply of cards we need.

@krayzie29 its hard to track down efficient top of the line cards right now at normal price range. All my cards are veterans from the old days - didn't want to retire them. The R9 290X produce decent hashrate but uses a ton of power in comparison to newer cards - forced me to be creative and learn some new trick on tuning fans and some stuff.

BTW - I still envy your solar power rigs - I used the site you send me to calculate the amount of solar my area can generate and surprisingly it's quite a bit!!!! Maybe maybe next year, I'll have solar rigs like you

Yeah, solar can power a lot of things. It really just comes down to how much space you need for the panels. In a place like where i live, we don't need as many panels since we get some of the best sun in the world.
It's a misconception pushed by the fossil fuel industry that solar can't support the electrical needs of the people and is expensive. Yes, storage is an issue but my system supplements my utility thus no need for batteries.

FYI, Germany is the most solarized country in the world(though China is catching up fast if they have not already passed them) and Germany has the same sun resources as Alaska. Also remember that we get enough energy from the sun in one day on this planet to run everything for 7 years. If we could only learn to get 10-25% of that, this planet would have no energy issues and no need for carbon based fuels. I included a solar resource map to give you an idea of what solar energy looks like around the world.

That is AMAZING! I always learn something new about solar from you!! Fossil fuel propaganda was too good. Now we just need the solar technology to be more affordable 😛

To green energy rigs!

Sweet, i am glad i can help add the other side who actually has done it. Yes, imagine mining where you can negate the electricity cost? Solar panels have 25 year warrantees so meant to last. I have had my personal system almost 5 and a half years (the monitoring system is my weblink) and with my electric car, i have no need for carbon fuels. Cryptos and free energy for life, power to the people!

So you are literally printing money from your rigs without the cost of paper ✨

Yeah, my only issue is my Nissan Leaf only has a 105 mile range per charge so whenever i want to leave the city, i need to rent or borrow, but honestly, not a huge issue at all.

By the way, the cost of solar is going to be cheaper then coal this year. Another piece of propaganda from the pro-carbon folks. I worked in the industry from 2008-2013 and the priced dropped dramatically.
I personally paid $12,000 for my system, but got a 20 year financing at my local credit union and my monthly payment is $87. It eliminated a $50-60 a month electric bill and they PAY ME $40-$50 on a average per month for the credits i make. I have refrigerated air on my two story house so i'm no hermit :D
https://www.bloomberg.com/news/articles/2017-01-03/for-cheapest-power-on-earth-look-skyward-as-coal-falls-to-solar

$50-60 a month electric bill is before you start mining right? 🤑 so... by getting the system with financing, you actually get paid for having solar?!?!

Yup, i get a 1099 form from the electric company because they pay me more then $600 a year so i report that as INCOME from the electric company :oD

Are you ready to retire on solar yet? (just kidding)

Sorry, i should clarify within a decade will be cheaper but if the subsidies were eliminated for ALL energy in the US, solar is cheaper now.

https://thinkprogress.org/renewable-cheaper-than-coal-589e43113faf