I just set up my Ethereum mining rig!
I thought I would post the code I used!
It's super easy!
=============================================================
Install 16.04 LTS (I usually use a Usb stick. A simple google search will do.)
=============================================================
Set up a wallet at https://www.myetherwallet.com/
=============================================================
Find a mining pool!
I use https://ethermine.org
Choose a stratum server closest to you!
(We will use these later, you will be able to use ethermine to monitor your hash rate etc.)
North America (East): us1.ethermine.org:4444 or us1.ethermine.org:14444
North America (West): us2.ethermine.org:4444 or us2.ethermine.org:14444
Europe (France): eu1.ethermine.org:4444 or eu1.ethermine.org:14444
Asia: asia1.ethermine.org:4444 or asia1.ethermine.org:14444
=============================================================
Setting up
Install and Enable SSH by opening terminal and typing the following:
sudo apt-get update
sudo apt-get install openssh-server
From this point you can choose to either proceed on the local machine, or remotely on a Windows machine using PUTTY (I USE TEAMVIEWER! IT IS AWESOME AND EASY TO INSTALL)
Create a new usergroup called video and append the current user to it by typing the following:
sudo usermod -a -G video $LOGNAME
sudo reboot
=============================================================
Installing AMD Drivers
If you plan to use an AMD card in your rig, you will need to install the AMD drivers
Install the AMD drivers by typing the following:
cd ~/Downloads wget --referer=http://support.amd.com https://www2.ati.com/drivers/linux/ubuntu/amdgpu-pro-17.30-458935.tar.xz
tar -Jxvf amdgpu-pro-17.30-458935.tar.xz
cd amdgpu-pro-17.30-458935
./amdgpu-pro-install -y
=============================================================
After install type this command (MUST DO THIS)
./amdgpu-pro-install --px
This issue is caused when the AMD graphics card conflicts with the inbuilt or on-motherboard graphics driver. This command will first uninstall the previous installation and then reinstall with --px parameter.
=============================================================
INSTALL CLAYMORE MINER
Installing claymore requires compiling the executable.
Download v9.5 of Claymore and unpack it by typing the following
cd ~/Downloads wget https://github.com/nanopool/Claymore-Dual-Miner/releases/download/v9.5/Claymore.s.Dual.Ethereum.Decred_Siacoin_Lbry_Pascal.AMD.NVIDIA.GPU.Miner.v9.5.-.LINUX.tar.gz
sudo mkdir /usr/local/claymore95
sudo tar xvf Claymore.s.Dual.Ethereum.Decred_Siacoin_Lbry_Pascal.AMD.NVIDIA.GPU.Miner.v9.5.-.LINUX.tar.gz -C /usr/local/claymore95
CREATE MINING SCRIPT (THIS TELLS YOUR MINER WHAT TO MINE, WHAT POOL TO USE AND WHERE TO SEND YOUR EARNINGS)
cd /usr/local/claymore95
sudo chmod u+s ethdcrminer64
sudo nano mine.sh
Nano (a text editor) will open a blank file.
you can configure it by following the next step.
Paste the following into the new text file:
#!/bin/sh
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 -epool <Mining_Pool_Address> -ewal <Your_Ethereum_Wallet_Address>.<Friendly_Name_For_Computer> -epsw x -mode 1 -tt 68 -allpools 1
THE LAST LINE OF THE CODE NEEDS TO BE EDITED!
Replace <Mining_Pool_Address> with the stratum address we looked at at the top of the page.
Replace <Your_Ethereum_Wallet_Address> with your Ethereum wallet address
Replace <Friendly_Name_For_Computer> with a name for your rig (e.g.: UbuntuMiner01)
You will now need to exit out of Nano
Press CTRL+X
Type Y
Press Enter until you return to the bash promp
Add executable permissions to the file
sudo chmod +x mine.sh
===============UPDATE REQUIRED=========================
sudo apt update
sudo apt install ocl-icd-opencl-dev
=======================================================
NOW YOU CAN START YOUR MINER
cd /usr/local/claymore95
./mine.sh
=======================================================
You can always message me if you have issues I dont mind helping.
If you found this useful then you can donate to one of my wallets.
Zcash
t1VjWwuJwZaXmVGDrzG2pWeS5eUzrQcEa7B
Ethereum
0xBACbD62753C2Fb09AcB05c0aaAC040Dc1505bF31
Bitcoin
3Kxzm7HiBBJqpHBFdmPacjfQsvttydaGmp
Thank you for posting! I'm about to try this in Ubuntu 17.10 - I have one miner up and running Windows 10 and Awesome Miner. Now I am building a Linux GPU miner with similar hardware to compare any differences.
Easier than I thought. My Ubuntu mining is running smooth! A few things were ever so slight differences in 17.1, but it's all basically the same. GPU is mining at a similar hash rate as my Windows 10 miner. This one only has one GPU set up now since I literally got it up and running this morning. Have three more on deck to add, all AMD Rx series. Again, thanks for this write up, you're the only other guy I've found who's mining on Ubuntu.
NICE! I am glad you found it useful! I was going to throw win 10 on the testing rig and see about mining some other coins in preparation for the etherum fork that will end mining lol. If you come across anything Easy, Stable and profitable give me a comment or a message!
Indeed it is a good idea. I auto switch between Ethereum, and other equihash algorithms (Zcash, ZenCash, and Zclassic). Even mining bitcoin gold has been profitable lately. This year will see an explosion of alt coins, including Ethereum classic, so mining will still very much be a profitable thing in 2018, even after Ethereum goes to proof of stake. But mine it while you can and hang onto it!! Personally, though, I think the real one to pay attention to is EOS, which may someday overtake Ethereum (like the old tech startups in the 90s and 2000s) but I don't think it will just fade away into nothing.
YOU are the man Martico! I have all my cpu's mining xmr. They are just sitting there anyway. I also am hopeful for steam farming using my HDD's. Ive been looking around for something to mine to make use of those. They also are just sitting. I use ubuntu because I am familiar with it from the early days of bitcoin mining... The new coins however seem to only have windows miners. Which is a smart move from the developers. The main stream is more comfortable with windows. If you get time try to post some of your alt coin mining scripts!
Unfortunately, I ran this miner and it creates a lot more heat than my Windows miner. I shut it down when my cards were hitting 85° C - I was researching a method to undervolt the core clocks and overclock the memory. The only ways I found were rather cumbersome. So if you figure out a way to tweak the GPU settings in Ubuntu, let me know. Granted, I was running this miner on an inferior test circuit and I did not have a fan directed at it... but the difference was noticeable just placing your hand behind the GPUs. It kept my tech room warm this morning that's for sure!
getting an error when starting the miner
./mine.sh: 11: ./mine.sh: Syntax error: "(" unexpected
not sure what this could mean have went step by step thru this an double check everything any thoughts
You should delete the minestart.sh file you made with nano and re-create it. If that doesnt work take a screenshot of the error and post it in a comment and ill try to help troubleshoot it!
Thanks a lot for this, i had a problem with the new drivers and this command solved it with the 17.50 version "amdgpu-pro-install --opencl=legacy,rocm --headless"
Can you please help me with how to make a batch file that will run the mine.sh when the pc starts up.
I ran into an error with this:
./amdgpu-pro-install --px
And then I used the headless command as noted by dardann but then when I try to run ./mine.sh I get the following error below:
This pool (eth-us-west1.nanopool.org) does not support Ethereum addresses as login (or requires worker name in "Login.Worker" format) and cannot be used for devfee mining, therefore it is not supported.
However, you can mine on this pool if you specify "-allpools 1" option, default pools (different from this pool) will be used for devfee.
Please read "Readme" file for details.Pool eth-us-west1.nanopool.org removed from the list
ETH: 1 pool is specified
Main Ethereum pool is us2.ethermine.org:4444
AMD OpenCL platform not found
No NVIDIA CUDA GPUs detected.
No AMD OPENCL or NVIDIA CUDA GPUs found, exit
How do I fix this?
Can you post the command line you modified to point to your wallet and the pool... That is the issue... sounds lie you put something in the wrong spot...
Sorry for the delay in response guys!
Ive had an extremely busy month!
I got it figured out thanks. It also got it to mine but is there a way to monitor how much has it mined like a gui dashboard, or a stats page that tells you the average hash you are mining at etc.
I am using miningpoolhub and you can log into whatever coin you are mining (mine are always switching) and see the latest hash rate. This linux machine is not as customizable as Windows, but hopefully, I'll find a way to get Radeon Adrenalin loaded so I have the same GUI I'm used to in Windows. Anyway, here's my latest screen shot from the pool, and this is both of my rigs combined (10 GPUs - all Rx580 8GB and an experimental WX9100 with 16GB)
AWESOME! WELL DONE!!!!! That depends on the pool that you are using... if you use ethermine it gives you live stats etc. Just use your wallet address! Ill post some screenshots when i get home!
Hi Thank you for putting this neat tutorial. I followed the step on 16.04 ubuntu server (not desktop)
i have this error when i run mine.sh
./ethdcrminer64: error while loading shared libraries: libcurl.so.4: cannot open shared object file: No such file or directory
any clue??
hmmm.... Thats actually a new one... Im pretty good at troubleshooting the miner. Sounds like you missed a step... Post a screenshot for me to look at so i can check out the error.
Sorry for the delay in response guys!
Ive had an extremely busy month!
Thanks for the article. I'm a novice and just days into using Ubuntu 16.04. After the "./amdgpu-pro-install --px" command, Terminal reports "E: Unable to locate package xserver-xorg-video-modesetting-amdgpu-pro" . . . Is that normal? Should I go forward with the remainder of your instructions. BTW I used 17.50-511655 not the 17.30 version you referenced.
Hey hey! you might want to ask martico... He commented above... he is using the newest version of ubuntu and he got it to work!
As per DarDann in the very first post!
I had a problem with the new drivers and this command solved it with the 17.50 version "amdgpu-pro-install --opencl=legacy,rocm --headless"
This is a solid tip! thanks for posting! I might switch to 17.50 so it could come in handy later! give us an update on how ur miner is running when you have the time!
The rig is mining flawlessly! Under 17.50 and Claymore 10.