In this second installment of our DIY Ethereum mining guide, we’ll look at how to install and configure Linux to setup your rig as an automated, remotely-manageable appliance. Don’t be dissuaded if you’ve never used Linux before—our step-by-step guide makes it simple!
Why Linux over Windows? First, it’s free—and saving ~$100 on the operating system is a big plus when you’re trying to maximize profitability. Other reasons include lesser hardware requirements (Linux is perfectly happy running from a USB stick plugged into ancient hardware!), simpler remote administration capabilities, and oftentimes better stability. The downside of running Linux is that video driver support isn’t on the same level as Windows, and things like GPU undervolting are trickier (but still possible via BIOS mods).
If you missed the hardware portion of our guide, make sure to check it out first. Otherwise, read on.
Build an Ethereum Mining Rig, part 2: Linux Setup
The following is heavily adapted from my original 2013 Litecoin mining guide, updated for the latest Xubuntu LTS version, the new AMDGPU-PRO drivers, and necessary ethereum mining software (all up-to-date as of 11/29/2017). If you’re a bit nervous because you’ve a complete Linux newbie, don’t be. Simply follow the step-by-step instructions exactly as they’re written, and you’ll be fine. Even if you’ve never done anything like this before, you should be up and running in roughly an hour.
Step 1: Configure BIOS settings
Before we even get to Linux, let’s take a minute to make sure that your mining computer’s BIOS settings are in order. Power on your computer, and press the “delete” key a few times immediately after power on. You should end up in the BIOS configuration area. Do the following, then save & exit:
- Change power options so that the computer automatically turns itself on whenever power is restored. The reason for this is two-fold: first, it’ll make sure that your miner automatically starts up after a power outage. Second, it makes powering the computer on much easier if you don’t happen to have a power switch connected to the motherboard.
- Make sure that your USB stick is first in the boot-up order (you may need to have a USB stick attached).
- Disable all components that you don’t plan to use. This may save a little bit of power, and since your miner will likely be running 24/7, it’ll add up. For me, that meant disabling onboard audio, one of the SATA controllers, the USB 3.0 ports (I only had a 2.0 USB stick), the Firewire port, and the serial port.
- If you’re running a lot of GPUs (4+), additional tweaks might be necessary to ensure that they’re all recognized by the OS. Exact tweaks vary by motherboard, but setting the PCIe speed to Gen1 is usually a good place to start. No need to change anything now, but make a mental note that you may need to come back and play around a bit if all of your GPUs don’t show up in the OS later.
Step 2: Install Xubuntu Desktop on your miner
Xubuntu is a lightweight version of Ubuntu, a popular Linux distribution. Most other distros should work just fine, but be aware that the GPU drivers require the presence of Xorg, which means server distros that don’t have a GUI will not work properly.
- Xubuntu 16.04.3 is the latest LTS release at the time of this guide, so that is what I recommend you use. You can download it here.
- You’ll need to either write the installation ISO image to a USB stick (highly recommended), or burn it to a DVD. If you use a DVD, you’ll need to temporarily hook up a DVD drive to your mining rig for the installation (make sure you temporarily enable your SATA controller if you disabled it in step 1!).
- Once you have the installation media prepared, you’re ready to install Xubuntu to your miner’s boot device (whether it’s an SSD, mechanical harddrive, or another blank USB stick). Boot using your new installation media (make sure it’s first in your miner’s BIOS boot order list). The Xubuntu installer should appear.
- Follow the prompts, and make sure to click the “auto-login” box on the last step of the installer (otherwise, all of the default options are fine).
- When the installation is complete, you should automatically boot into the Xubuntu desktop. Make sure to remove your installation media.
Step 3: Install SSH and package updates
At the Xubuntu desktop, press CTRL+ALT+T to open a terminal window.
- Install SSH by typing:
sudo apt-get install openssh-server
With SSH installed, you can unplug the keyboard/mouse/monitor from your miner, and complete the rest of the installation from your desktop computer. Simply download Putty onto your desktop, run it, and enter the IP address of your mining rig (type ifconfig at the Xubuntu terminal to find your miner’s address if you don’t know it—it will probably look like 192.168.0.x). That should bring up a remote terminal session to your miner, which is more or less just like sitting at the keyboard in front of it.
If you plan to manage your mining rig remotely over the internet, you’ll need to forward port 22 on your router to your miner. Make sure that you use a strong Xubuntu password!
Setup should be pretty quick from this point, as now you can simply copy text from this webpage (highlight it and press CTRL+C) and then paste it into your Putty session by simply right-clicking anywhere inside the Putty window. I highly recommend that you complete the remainder of the guide in this manner, as it eliminates the risk of typos!
- Install package updates by typing (or copying & pasting via right-click into Putty) the following command:
sudo apt-get dist-upgrade
Step 4: Install AMDGPU-PRO drivers
Next up, we’ll install AMD’s video drivers. AMD has special blockchain compute drivers available for mining that give far superior performance compared to their standard drivers, so that’s what we’ll be using (version 17.40, which is the latest as of 11/29/2017).
- Type the following commands (press “enter” and wait for the operation to complete at the end of each line):
cd ~/Downloads wget --referer=http://support.amd.com https://www2.ati.com/drivers/linux/beta/ubuntu/amdgpu-pro-17.40-483984.tar.xz tar -Jxvf amdgpu-pro-17.40-483984.tar.xz cd amdgpu-pro-17.40-483984 ./amdgpu-pro-install -y
- Some of these steps may take a minute or two to complete. When the installation is complete, type the following:
sudo usermod -a -G video $LOGNAME
- Next we need to install and configure the ROCm component:
sudo apt install -y rocm-amdgpu-pro echo 'export LLVM_BIN=/opt/amdgpu-pro/bin' | sudo tee /etc/profile.d/amdgpu-pro.sh
- Finally we need to enable large page support, which will dramatically improve mining performance. Type the following to open your grub file in nano for editing:
sudo nano /etc/default/grub
- Find the line that reads GRUB_CMDLINE_LINUX_DEFAULT=”quiet splash”. Modify it to:
GRUB_CMDLINE_LINUX_DEFAULT="quiet splash amdgpu.vm_fragment_size=9"
- Save the file and quit nano by pressing CTRL+X and then answering (Y)es to save the changes. When you’re finished, update grub and reboot:
sudo update-grub sudo reboot
The final command will reboot your rig, which will cause you to immediately lose your SSH (Putty) connection. Wait a few seconds to give the computer a chance to boot, and then re-establish a new connection via Putty, and re-login.
Step 5: Install Ethereum software
(Note: you may skip step 5 entirely if you already have an ethereum wallet address that you intend to use!)
Next up, we’ll install the Ethereum software that will let us create a new wallet address. We’ll need this to store the coins we receive from mining.
- Type the following to install the necessary ethereum packages:
sudo add-apt-repository ppa:ethereum/ethereum sudo apt-get update sudo apt-get install ethereum geth
- Now it’s time to create your Ethereum wallet address:
geth account new
You’ll be prompted to enter a password, and then to confirm it (use a strong password!). The output will be a long string between two curly braces { }. That’s your new wallet address—make a note of it (highlight it within Putty to copy it to your clipboard).
Important: The combination of the password you just used to create this address *and* the associated encrypted key file is what gives you control over your new wallet address. If you lose either of these, you’ve also lost control of your wallet and all of the coins associated with it—and there is literally nothing that anyone will be able to do to help you. Remember your password, and keep multiple backups of your key file(s)!
Your key file(s) are stored in the ~/.ethereum/keystore directory. Copy the entire /keystore folder someplace safe to backup your wallet (backups are covered in more detail here—don’t forget to make multiple backups and keep them in a secure offline location!).
If you forget your wallet address, you can type geth account list to see your addresses and the location of their key files.
Step 6: Install Claymore’s Ethereum miner
There are several options as far as mining software, and I’ve experimented with all of the popular ones. I think Claymore’s miner is the best option, even if it does have two fairly significant downsides: it’s closed-source, and it’s not free (~1% of your mining time benefits the creator of the miner).
Two alternatives are the stock ethereum miner (ethminer) and Genoil’s fork of the stock miner. They’re both open-source and free, but they have pretty crippling downsides.
The stock ethminer is much slower than Claymore’s miner (by a margin of over 5% on my test rig). In addition, ethminer creates the Ethereum DAG file on disk instead of in GPU memory, which is slow and uses a lot of space (and if you’re running off a USB stick, all those writes may eventually wear it out).
Genoil’s fork seems to be nearly as fast as Claymore’s, and it doesn’t use physical disk space for the DAG, but it’s not stable (at least not for me). It often crashes, especially on startup (whereas I have yet to see a single crash on Claymore’s miner after nearly a week of full-time mining). The author abandoned development months ago, so improvements are unlikely.
So, explanation aside, here is how to setup Claymore’s miner:
- First return to your downloads directory and grab the latest version (10.2 as of 11/29/2017). I’m pulling the file directly from the author’s Google Drive repository, if the link is broken check here for a newer release or updated link):
cd ~/Downloads sudo apt install curl curl -L -o claymore_10.2_miner.tar.gz https://drive.google.com/uc?id=1t25SK0lk2osr32GH623rR8aG2_qvZds9
- Then create a new directory for it, and unpack it there:
sudo mkdir /usr/local/claymore10.2 sudo tar -xvf claymore_10.2_miner.tar.gz -C /usr/local/claymore10.2
- Then let’s head over to the installation directory and create a startup script. Note that commands 2-5 below just clean up the installation directory a bit by removing an intermediary directory that was included in the original tar archive:
cd /usr/local/claymore10.2 cd Clay* sudo mv * /usr/local/claymore10.2 cd .. sudo rm -r Clay* sudo chown root:root ethdcrminer64 sudo chmod 755 ethdcrminer64 sudo chmod u+s ethdcrminer64 sudo nano mine.sh
- Nano will open a new blank text file; enter the following into it:
#!/bin/sh export GPU_MAX_ALLOC_PERCENT=100 ./ethdcrminer64 -epool eth-us-east1.nanopool.org:9999 -ewal YOUR_WALLET_ADDRESS/Miner01 -epsw x -mode 1 -allpools 1 -tt 68
Where it says YOUR_WALLET_ADDRESS, use the address you created in step 5 (you’ll need to put “0x” in front of it). The “Miner01” following your address can be changed to any friendly label that you want to give your miner (only important if you plan to run multiple rigs). It’s easiest to copy the last line from my guide into something like notepad, then replace YOUR_WALLET_ADDRESS with your actual address there, and then copy the finished line into putty via right-click to get everything into nano without typos.
- Save the file and quit nano by pressing CTRL+X and then answering (Y)es to save the changes, then enter the following to give your new script execute permission:
sudo chmod +x mine.sh
Note that I’m using nanopool.org as the mining pool here. I’ve tried a few, and it seems to be a top pick, but feel free to pick your own pool. Most don’t require registration, and simply payout to whatever wallet address you supply whenever a certain threshold is met (usually whenever you accumulate 1+ ETH). Assuming you stick with Nanopool, you’ll be able to check on your miner’s status by going to this URL after you start mining: https://eth.nanopool.org/account/[YOUR WALLET ADDRESS]
- Now is a good time to test things. You can fire up your miner by typing:
./mine.sh
You should see the Claymore miner start up. It’ll take a minute or two before it actually starts mining, but it should get there eventually. When you see a scrolling log of outputs that includes non-zero hashrates (expect hashrates in the low to mid 20s for unoptimized GPUs), you’re good to go. If the script fails to start, or you see errors, make sure that you’ve created the script exactly as outlined in the guide.
Press CTRL+C to exit the miner when you’re satisfied that it’s working.
Step 7: Create auto-start scripts
We’re almost done! We want to set up our rigs 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.
- First, install screen:
sudo apt install screen
- Then type the following to create a new script in your home directory and open it in nano:
cd ~
sudo nano miner_launcher.sh
- Enter the following text into the editor (substitute your actual Xubuntu username for YOUR_XUBUNTU_USERNAME where necessary!):
#!/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/claymore10.2 su YOUR_XUBUNTU_USERNAME -c "screen -dmS ethm ./mine.sh"
- Save and quit nano (CTRL+X), 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_XUBUNTU_USERNAME/miner_launcher.sh 15 &
Then save and quit out of nano (CTRL+X).
Step 8: Create an alias to easily check on the Claymore miner process
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 hashrates & GPU temperatures, 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 miner='screen -x ethm'
- Save and quit out of nano.
That’s it—you’re done! You’ll probably want to run a full test now. The easiest way to do that is to close your Putty session and power down your miner. Turn it back on and the following should happen:
- Your miner should boot into Xubuntu. This may take up to a minute, depending on the speed of your boot device (it’ll be much faster on an SSD).
- 15 seconds after Xubuntu has loaded, the Claymore miner will automatically start and begin mining. You might notice the fans on your GPUs spin up a bit when this happens.
- You should be able to SSH into your miner at any time and type miner to monitor the miner’s process. To close the screen (but keep the miner running), press CTRL+A, then CTRL+D.
- If you ever need to start the Claymore miner manually (because you quit out of it, or kill it, etc), simply type ~/miner_launcher.sh
(update 1/15/2018: **IMPORTANT** please read this if your hashrate is lower than expected!)
Congratulations—you have your own headless linux ethereum miner!
The next section of this guide covers setup under Windows, and then we’ll take a look at optimizing miner settings for better performance.
Great guide! Best I’ve found so far.
One little thing; when I reboot my rig, and type “miner” in putty, it says:
‘There is no screen to be attached matching ethm’
It seems as if the miner_launcher.sh won’t auto-start.
(I’ve tried to repeat the steps a number of times, both copying and writing my self)
Any ideas on how to fix this?
Thanks!
Andy, Sweden
Are you typing the up address into putty first? Can you copy and paste your putty screen here, so we can see the error?
USER:~$ miner
There is no screen to be attached matching ethm.
USER:~$ ~/miner_launcher.sh
USER:~$ miner
*starts as it should*
So, I need to start the miner manually, then the Alias work..
Andy I was getting the same message because my miner was not starting during auto startup. Ended up having the wrong computer name (dhurrr) lol. Open terminal and type ‘whoami’ This will give you your username. FTR when I open terminal it reads ‘user@rig1’ I thought rig1 was my username but its actually user lol. The fault message makes sense because the miner never starts so you cant attach to the screen.
Thanks for the tutorial. Successfully have my four Sapphire Nitro+ RX580 8G cards running, with putty for remote control. Running 24×7 without an issue in xubuntu 16.04 for almost a month. However, here is a naive question: not all my four cards give the same hash rate: Two running a bit higher then the rest: 27.9, 24.4Mh/s versus 22 Mh/s. More information to help anyone would like to offer a help: Two cards are directly connected to the motherboard by PCI-e x16 slots and other two are connected by x2 risers. Two of them are purchased brand new with the other two are purchased used. Two cards are powered by a 850W PSU that also powers up CPU, motherboard and 4x 120mm cooling fans; the other two cards are powered by a 550W PSU as a single source.Since I am away from the miner now so cannot plug and play each single card for more details. My question is, can anyone give a general estimate of what is probably the reason for difference in hash rate of same type of cards.
GPU bios are not modified.
Hello,
first thanks for this guide! All is working fine when i install.
So i had one problem, when i first time start claymorminer all works fine. Then i reboot my rig and always one or two cards getting 0MHs. Its not always the same cards.
This is my setup
6x RX470 MSI Gaming X 4GB
ASrock H81 Pro BTC
8GB RAM
This setup works fine on Windows
in the Log file i see that the Setting DAG epoch of this cards is not done!
Logfile first start:
12:42:02:627 c154d700 GPU2 DAG creation time – 4837 ms
12:42:02:628 c154d700 Setting DAG epoch #161 for GPU2 done
12:42:02:632 b6ffd700 GPU4 DAG creation time – 4840 ms
12:42:02:632 b6ffd700 Setting DAG epoch #161 for GPU4 done
12:42:02:648 b57fa700 GPU5 DAG creation time – 4854 ms
12:42:02:648 b57fa700 Setting DAG epoch #161 for GPU5 done
12:42:02:652 c1d4e700 GPU1 DAG creation time – 4859 ms
12:42:02:652 c1d4e700 Setting DAG epoch #161 for GPU1 done
12:42:02:653 c2d50700 GPU0 DAG creation time – 4905 ms
12:42:02:653 c2d50700 Setting DAG epoch #161 for GPU0 done
12:42:02:669 b7fff700 GPU3 DAG creation time – 4827 ms
12:42:02:669 b7fff700 Setting DAG epoch #161 for GPU3 done
Logfile other starts:
12:47:34:264 963fa700 GPU0 DAG creation time – 4878 ms
12:47:34:264 963fa700 Setting DAG epoch #161 for GPU0 done
12:47:34:290 827fc700 GPU4 DAG creation time – 4853 ms
12:47:34:290 827fc700 Setting DAG epoch #161 for GPU4 done
12:47:34:291 83fff700 GPU2 DAG creation time – 4856 ms
12:47:34:291 83fff700 Setting DAG epoch #161 for GPU2 done
12:47:34:318 95bf9700 GPU1 DAG creation time – 4881 ms
12:47:34:318 95bf9700 Setting DAG epoch #161 for GPU1 done
12:47:34:340 837fe700 GPU3 DAG creation time – 4852 ms
12:47:34:340 837fe700 Setting DAG epoch #161 for GPU3 done
can someone help me?
Thanks!
Elme, Germany
Many thanks Cryptobadger,
I originally built a rig from your first guide about 2-3 years ago just to see if I could do it. Got it running, ran it for 2-3 months and then said “ah this cryptocurrency is bound to be a fad”. Well that was stupid. So I brought up the old rig for the holidays looked at it and said how the heck did I ever do something with that. But with your latest paint-by-numbers guide we have success! I am mining ethereum with three r9 290s, incidentally each 290 is getting about 26.5 mH per the claymore miner reading, is that much/any slower than the new RX 570s? Also for people such as myself who don’t have a job/formal background in electronics or programming, just follow the instructions as the Sensai laid them out. I tried to get clever and say, well I am just going to use a bootable USB thumbdrive with persistent memory. That cost me a day, you can’t upgrade the distro, (it crashes) w/o an upgraded distro you don’t have the libraries needed to install the AMD-PRO drivers. I have a fourth gpu but the riser broke when I took it out of storage and this is really why I am writing to go over the whole GPU/PSU/riser set-up. This is a bit confusing to me and poking around the internet seems to be an area of frustration for others as well. So I am going to go over this as simply and stupidly as I can and if I am wrong or off base it would be great if you correct me. I may be making up some terminology as I go along but I think you will see what I am getting at. So first with a riser/GPU/PSU there is the power supply 1) to the riser and 2) to the GPU. Both of these need to be connected. Concerning 1) power supply to the riser, one does NOT want to run from the PSU to a SATA (the thin, thin sandwich) connector to the riser, one wants to run either from the six pin outlet on the PSU to a 4 pin Molex on the riser, or, six pin PSU outlet to six pin riser connector. As concerns power to the GPU, there is on the GPU what I will call the 8pin-6pin connection, I take it both the 8 pin and 6 pins need to be connected for the GPU to be powered. On the other end of 8-6 cable I usually see an 8 pin connector that I plug into the PSU, I think however that I sometimes see cables that go from the 8pin-6pin GPU end to a 6 pin connector to the PSU. The PSU outlets say things like “SATA” and Peripheral” with the six pin outlets. Can one of these six pin PSU outlets also power a GPU? Reason I ask is, on my 850 Watt PSU, I have 4 eight pin PSU outlets which can power 4 GPUs. I have six PCIe’s (I think that is the term) slots on my motherboard so if I can power a GPU from a six pin SATA/peripheral PSU outlet I can potentially go to 5 or 6 GPUs with this power supply. Sorry for all the questions it is just that this is the area where people are posting videos of melted wires and information seems a bit sketchy even on the internet. Any thoughts/guidance very much appreciated. I find it really cool just to be running a computer off a thumb drive let alone now mining ethereum with it. Again thanks for the guide!
Hey Paul, those R9 290s are actually pretty good for mining, even today – their main drawback is the large amount of power they consume when compared with more modern GPUs. ~26 MH/s is pretty typical, but if you’re feeling adventurous they can be pushed up to 30 MH/s or so with some tweaks – I don’t have any of my own but if you Google a bit you should be able to find some settings that work.
It sounds like you’re mostly correct with regard to powering everything. You definitely want to throw away those PCIe-SATA adapters that come with many risers; they’re unsafe – connect the risers directly to your PSU via 6-pin PCIe or molex cables. Yes, if your GPUs have both 8-pin and 6-pin PCIe connectors, you’ll need to power both from your PSU. The labels on your PSU are important: don’t try to use one of the SATA/peripheral outlets on your PSU to power a GPU – it won’t work.
With your 850 watt PSU, you can probably safely power three R9 290s – those cards are serious power hogs. If you want to utilize more of your motherboards PCIe slots for more GPUs, you can either upgrade to a larger PSU (which is what I typically recommend) or add a second PSU for the extra cards (if you go this route, just be careful, as it’s possible to destroy components if you distribute power incorrectly over multiple PSUs).
Good luck and happy mining!
Hey Cryptobadger thank you for taking the time to respond. I feel more comfortable with hooking up gpus/risers/PSU now. That is one area where a return on investment could go up in smoke. I also just put my hands on the connections once the thing has been running for awhile though as well and nothing seems overly hot.
I seemed to have spoke a little too soon about the (complete) success part though. My rig has been crashing every two/four hours or so with a “temperature thread” error. At first I thought it was because I couldn’t control the fans in CM 10.2. Finally figured a way to blast the fans and problem still happened. Poking around the web I found this may be an actual bug with CM 10.2 and 10.3 (or it may be a hardware problem on my part). So I have restarted from scratch and will try CM 9.8. Hopefully that will be more stable and will allow me to control the fans from within Claymore.
From there part of the roadmap is 1) learn how to dual mine (10% raise from a line of code!) 2) learn how to overclock the 290s, nother raise. 3) Build a 6 GPU 570x machine. The computer store down the road from me is always sold out on these but when they get them in twice a week they sell them for =~ $250, So try to pick up six over the next month. Will be sure to check in again when I have made progress on the new rig, or, hopefully not, if I just throw in the towel because I can’t get anything to run for more than a few hours.
Happy New Year
There’s a better way to install the AMDGPU-PRO drivers using the following command:-
amdgpu-pro-install –opencl=legacy,rocm –headless
See https://math.dartmouth.edu/%7Esarunas/amdgpu.html
This will allow you to skip installing the desktop environment and use Putty to access the machine.
THX Sniffit! This i serched so long! I know this form Windows.
Love this website and your great tutorial. I have been using this site for a while now and refer it to others every chance I get.
I wanted to add some new information to help others in their quest for crpto.
Here is the instruction to install amd gpu pro 17.50
cd ~/Downloads
wget –referer=http://support.amd.com https://www2.ati.com/drivers/linux/ubuntu/amdgpu-pro-17.50-511655.tar.xz
tar -Jxvf amdgpu-pro-17.50-511655.tar.xz
cd amdgpu-pro-17.50-511655
./amdgpu-pro-install -y –opencl=legacy
sudo usermod -a -G video $LOGNAME
sudo reboot
I hope this helps someone out. Large page support is enabled by default so no need to update or change grub.
Cheers
Thanks for the info about the latest 17.5 driver. If we have already setup the previous blockchain driver version, is there any performance gain/benefit to installing this latest 17.5 version? Have you noticed any difference (assuming you were using the previous version)? Thanks
I haven’t noticed a difference, but the Rocm component and large page support is included in the stack. So, half of the extra steps has been eliminated. I did upgrade from 17.40. I actually just reinstalled operating system from scratch, it was cleaner that way.
Thanks for guide! You lay this process out very well.
After the reboot on step 4 I cannot login to Ubuntu. It’s stuck in the login page loop where the screen just refreshes after entering the password. I’m running Ubuntu 16.04.
This is my second go at this. The first time around, the ROCm install and configure step within step 4 gave me a not found error. After I rebooted I was in this same login loop. I tried a few solutions I found online but it ended up screwing the whole OS install up so I reinstalled Ubuntu and started fresh.
Does anyone have an idea on how to fix the loop without blowing up my OS install?
What kind of graphic card do you have?
I’m using 3 RX570s for the mining on a biostar tb250 motherboard. I just found this in the Ubuntu forums that I’m trying out.
————————
Press Ctrl+Alt+F1 to open the shell. Now you can login and navigate to the amdgpu setup folder.
Now type this:
./amdgpu-pro-install –px
And hit return.
This issue arises, when the AMD graphics card conflicts with the inbuilt or on-motherboard graphics driver. The command above will first uninstall the previous installation and then reinstall with –px parameter.
————————
using ./amdgpu-pro-install –compute ended up fixing it.
No way around it. That is the only way it will work. You have to either press F2,F3,F4,F5 to login via command prompt. Trust me, when you have more than 10 gpu’s there is absolutely no way around that problem. Follow the guide and login either remotely or directly but only via command prompt.
Hold CTRL,ALT, then press F2 or F3 or F4.
The GPUs aren’t getting recognized at all. I’ve tried going through the amdgpu install steps again but I think the –compute switch I used hosed it up for some reason. I’m going to start from scratch again but this time I’ll SSH into it from another computer to do the setup.
I’m getting this error
./ethdcrminer64: error while loading shared libraries: libOpenCL.so.1: cannot open shared object file: No such file or directory
I went through this guide using the 17.50 drivers after doing my GPUs not being recognized the first time around.
I ended up reinstalling the driver without rebooting and now claymore fires up!! Thanks for a great tutorial to get me started. Now to figure out why my third card isn’t getting recognized and push these 570s over the 17mh/s they’re getting right now.
What did you do exactly – can you kindly tell me? As i have same ERror
Make sure every time you copy and paste that the line is executed properly. Be on the lookout for incompleted executions. I was blindly cutting and pasting without verifying at first too. when in doubt go the the directory by (changing directory) cd /usr/local/claymore10.2 and then trying to run the (shell) file mine.sh or any other commands from the directory. if you aren’t in the directory you may not be able to locate or run the files needed. if the cd doesn’t work then you didn’t install the xubuntu properly. type “ls” to see if you are in the right directory.
the installation doesn’t make errors we do.
if interested read the post.
https://bitcointalk.org/index.php?topic=1433925.0
It has all the commands that can be used in the line listed above >>
./ethdcrminer64 -epool eth-us-east1.nanopool.org:9999 -ewal YOUR_WALLET_ADDRESS/Miner01 -epsw x -mode 1 -allpools 1 -tt 68
wouldn’t necessarily suggest using them, but good for understanding.
Thanks Tony, I’ll look at it!
Daniel, and Chaff
I had the same issue. Ended up installing the 17.50 drivers which gave me the same error. (./ethdcrminer64: error while loading shared libraries: libOpenCL.so.1: cannot open shared object file: No such file or directory) Then found this
pre Vega10
Install the Complete Graphics and Compute stack
./amdgpu-pro-install -y –opencl=legacy
Once this legacy was installed all my problems went away. Not a Linux guru so I can’t really say thats all I did…but I did spend hours on it and pretty sure this did it. To the newbs, including myself. Make sure you’re in the right directory cd /usr/local/claymore10.xxx when you download the compute stack.
TY CRYPTOBADGER for everything on this site.
Hi. Need some help. ON command “./mine.sh” getting this: “./ethdcminer64: 1:ethdcminer64: Unterminated quoted string”. Checked modified files,all OK. File ethdcminer64 is in machine code , not possible to find missing quotation mark. Any idea?
Pentium. Gigabyte-H110-D2A, Nvidia GTX1060 6GB, on Xubuntu
Maybe try reinstalling claymore?
Thank You. Re-installed several times. Problem was in confusing names of Claymore files, so I was installing 32bit program on 64bit outfit, thinking “..i386..” means for Pentium. Got “..AMD64..” file and it works for few days now. :o)
Thank for this great guide and I have been able to run my 6 rx570 cards the first time, but if I close the original terminal in which all the code was entered I can’t mine again. A couple of times I entered steps 4 and 6 and worked again. The auto start never worked for me. The rig boots into Ubuntu and the miner doesn’t start. After a few failed attempts I starting getting error -38 – cannot write buffer for DAG so I stater the process the beginning by installing xubunto again.
Am I missing something? How do I start the miner manually?
Thank you
Can mount /dev/loop … blah blah blah error. not so fun
Default Windows XP extract pos didn’t properly build bootable. use https://rufus.akeo.ie/ to build proper bootable drive.
Thanks for the great guide it was extremely helpful getting up and running. My h/w (GA-H110-D3A, 2xRX580)setup is very similar and humming along but on reboots xUbuntu gives /usr/lib/xorg/Xorg crash reports which I can cancel and continues working. Using the integrated Intel video for the desktop. With multiple GPU is this typical for a mining setup?
xorg.conf only shows the Intel video configured.
Thanks.
Do we put our email in the mine.sh file? I’m having trouble on the nanopool website settings. Doesn’t recognize my email. Thanks
Try:
./ethdcrminer64 -epool eth-us-east1.nanopool.org:9999 -ewal [WALLET_ADDESS].Miner01/[EMAIL@EMAIL.COM] -epsw x -mode 1 -ftime 10
Thank you for this guide! I was able to get a 3 gpu system up and running fairly painlessly. I am having 1 issue I can’t seem to work out. Originally, it ran at about 24Mh/s with all the settings matching your guide. However, after an hour or so, it would crash, and xubuntu would say I was out of hd space. There were 2 log files in the 22GB range. After some digging, I found it was a pcie bus error essentially spamming the log file. I added “pci=noaer” to GRUB_CMDLINE_LINUX_DEFAULT=”quiet splash amdgpu.vm_fragment_size=9″ to make it GRUB_CMDLINE_LINUX_DEFAULT=”quiet splash pic=noaer amdgpu.vm_fragment_size=9″
When I rebooted, it said something along the lines of amd drivers could not be loaded. I fired up the miner, and was at 18Mh/s. So, I changed the line to
GRUB_CMDLINE_LINUX_DEFAULT=”quiet splash amdgpu.vm_fragment_size=9 pci=noaer”
This had no effect on the speed. So I redid all of Step 4, with no change in hash rate. (I kept the GRUB.. line as shown above. Anybody have any suggestions?
I have 4 rigs running.
3 rigs have 4x RX470
1 rig has 5x RX580
I updated the rigs to run with latest mining AMD drivers just before Christmas and enjoyed a 25% boost.
Yesterday after Linux updates were installed and rigs rebooted I have lost hashing power on 3/4 rigs. All by the same proportion.
Any idea what might be going on?
Tried reinstalling claymore and video drivers again but it didn’t help.
For clarity the MH/s has dropped equally on all cards
So on the two RX470 rigs hash power for each card has dropped from 20 MH/s to 16 MH/s per card and on the RX580 rig the drop was from 23 MH/s to 18 MH/s
All card are factory settings. No Flashing of any kind.
Ideas?
Oh man… This is not a fun situation…
When you say it loaded “updates” what updates did it install exactly? Just a security update? or a full kernel upgrade?
Personally, I am ignoring all system updates for now. You can change your system update manager settings so that they do not automatically install.
Having said the above, I’m not sure why your hashrate would have dropped so much but it definitely sounds like the “updates” messed up your driver. Can you confirm the version of your AMD driver now compared to before?
Also… your hashrates look a little low but that’s because you are using factory settings. You should definitely look into optimizing so you get better rates with less power. Otherwise you are just wasting time and money.
Sorry, this probably isn’t much help. If you can’t figure it out in a couple of hours you should probably just do a full reinstall of Xubuntu and the drivers as per this excellent guide.
HTH
Thanks for the moral support at least!
I’m already on the full reinstall on one of ubuntu now although I seem to be having trouble getting the MOBO to pickup the bootable USB now…
Anyway the drivers are exactly as per this guide. Last drivers were from whatever this guide said in May 2017… that’s how long I’ve left them.
All I noticed was that updates were available yesterday. applied them without rebooting. no problem. Then used putty this morning to check and 3/4 rigs needed a reboot as it said system restart required. Then Boom.
Side note: I realise the hashing power could be higher with mods, but tbh I’m not happy tinkering and don’t have a wondows machine i can just plug my GPU’s into
So after fully reinstalling on one of my rigs following this guide meticulously.. still getting 16MH/s per GPU…
Completely baffled
Same has happened for me. I shutdown my rig last night, restarted this morning at the hashrate has dropped from 26 to 19.
Any ideas on why or the fix?
Cheers,
Chris
I have the same problem. Is there a way to reverse the drop in hash rate?
All:
https://www.reddit.com/r/EtherMining/comments/7pqjxg/5mhs_drop_on_every_card_today_any_ideas_why/
Take a look at this. I tried this morning, with no success. I’m going to do a full reinstall this weekend with updates blocked to see if that restores my hashrate.
Good catch. My rig never crashes but just need to install new GPUs today so shut it down and then it happened. His solution works for me. Back to fire.
Hi
Many thanks for the excellent instruction guide, best I have found on the web by far. I have just gotten into Mining ETH on Nanopool, rig config below….
ASUS 19GPU Mining Rig
2xRx580s
4xRx570s
Claymore Miner mining ETH
I had it all set up working great and even received my first 0.2 ETH (circa $250) from nano pool. Then I spotted your dual-mining guide and thought i would be clever and tried to follow it to mine ETH + DCR. Then I hit a big problem and the whole lot stopped working. I tried to recover my steps and got to the following step at the end of step 6:
Now is a good time to test things. You can fire up your miner by typing:
./mine.sh
I then have the following error in the Xubuntu Terminal window..
./mine.sh: 3: ./mine.sh: /ethdcrminer64: not found
Can you help please as it is driving me mental trying to fix it.
Many thanks
Peter
cd /usr/local/claymore10.2
cd /usr/local/claymore10.2
Thanks Tony / Anon
I have typed in as you say but I am not sure what the steps are after that – can you confirm please?
Appreciated
Peter
Thanks
Followed most of the steps again and now got it working
Cheers
P
I’m already on the full reinstall on one of ubuntu now although I seem to be having trouble getting the MOBO to pickup the bootable USB now…
Anyway the drivers are exactly as per this guide. Last drivers were from whatever this guide said in May 2017… that’s how long I’ve left them.
All I noticed was that updates were available yesterday. applied them without rebooting. no problem. Then used putty this morning to check and 3/4 rigs needed a reboot as it said system restart required. Then Boom.
Side note: I realise the hashing power could be higher with mods, but tbh I’m not happy tinkering and don’t have a wondows machine i can just plug my GPU’s into.
Hello!
Thank you for this guide, appreciated very much.
I have a question: My rig is a 2 x 12 GPUs (RX580) system. Whatever i do, i cant get past 6 GPUs running.
I am new to Linux, since it is said, that Ubuntu and co. supports easily 12/13 amd graphic cards, which is nearly impossible on Windows.
So after installing (X)Ubuntu, i´ve managed, thanks to this guide, to install the driver.
The problem is, that if i connect more than 6 GPUs, the system hangs off after rebooting.
Something like “/dev/sda1: clean, 220240/30269440 file, 2971359/121076736 blocks”.
Nothing happens, but if i manually press the off button on the motherboard, the Ubuntu UI flashes for a short time and turn off the system..
It could be anything, i know..but maybe someone experienced something similar and can give me a tip or 2.
Thank you in advance
Eno
Motherboard:
AsRock BTC+ H110 Pro with 13 slots
Intel SSD (80 GB)
Tried Xubuntu and Ubuntu both 16.04
Have you tried reviewing ASRock micro site?
https://www.asrock.com/microsite/H110ProBTC+/
Same problem. Difference is mine runs a Asus Prime z270a mobo.
Hi Eno,
I have found out how it works. Feel free to give it a try.
I assume your system can be brought to the stage you mentioned as “Something like “/dev/sda1: clean, 220240/30269440 file, 2971359/121076736 blocks”.” Then you can press ctrl+alt+F2 and xubuntu should ask for your username and password to login. GUI seems being disabled if more than 6 GPUs are running simutaneously. I have 7 rx580s running now. Hope it helps.
Stepped into the office today and checked on my rig (H110 BTC MOBO and 6 STRIX RX570 GPUs) which are factory bios and got 22.0 each since first install.. it looked like Xubuntu rebooted recently. On my terminal screen, it said reboot was needed (though it was still mining at 22.0 X 6) so I rebooted, and when the miner started – it was only hashing ~17.0 per GPU. I’ve tried everything from reinstalling the AMD-Pro drivers to simply rebooting multiple times. The tems and fans are good, everything appears good, but INSTANTLY upon reboot my GPUs slowed to 17 each – about a 5.0 reduction per card. Cannot figure out what to do next. Any ideas? I’m a noob.
This is probably the issue that you’re experiencing. Just follow the instructions to remove the update and you should be good to go.
THANK YOU!!
Will try and advise 😉
WORKED!
Just sent you $20 of ETH beer money – not just for helping out with my issue, but for your whole informative site… Thanks again!
Thanks for the beer fund donation – it’s much appreciated!
Hey Steve,
I had the same problem today. The following solution works for me.
All:
https://www.reddit.com/r/EtherMining/comments/7pqjxg/5mhs_drop_on_every_card_today_any_ideas_why/
Take a look at this. I tried this morning, with no success. I’m going to do a full reinstall this weekend with updates blocked to see if that restores my hashrate.
All Credit goes to Jim
My 6 GPU (Strix RX570) is back up and chugging along. I’ve started an 8 GPU build using a mixed set of GTX 1070 GPUs (4 PNY 3fan GTX 1070s, a PYN Blower 1070, and an MSI 1070 – still need to buy 2 more). First 6X Rig I attempted using the ASUS B250 19GPU MOBO, and had endless issues getting Xubuntu to install. I switched to a Asrock H110 MOBO and it worked instantly. I am going to attempt the 8 1070 GPU rig on the B250 again and try a few things to attempt to get it running (using 2 Thermaltake 850W Platinum PSUs). Will let you know how it goes, but a few questions:
1) Can I use the same basic commands as your original tutorial, except with a link for the Nvidia drivers instead of the AMD?
2) Do you have the command line/link for the latest 1070 drivers for Linux? (I do have some examples I found by googling, but I trust you more than my research!)
3) Is there any other software or scrips I need for claymore miner when using Nvidia cards versus ASUS?
I’m a bit nervous about using the B250 MOBO again. Major issues related to the Bios (locking up when changing settings etc). I’m going to try putting only one GPU directly on the MOBO “long” PCI slot this time to get the drivers loaded before adding additional GPUs and hope that helps.
I’m NOT a computer guy at all – I switched to Mac years ago, but I have a aerospace engineering background and am a pretty fast learner. This has been quite a learning experience and I’m enjoying this new hobby. I GREATLY appreciate your help and this website!! Will provide more beer money once this other rig is going, as I’m sure I’m going to be banging my head against the wall in a matter of days 😉
Thanks for this guide! I have the same questions as Steve re: using nvidia instead of AMD. My nvidia setup is good, can overclock etc; do we still need to follow your AMD steps?
Yup, for Nvidia GPUs you’ll just skip step 4 of my guide and just install Nvidia drivers instead. I don’t have an Nvidia-based rig, so I haven’t run through the process myself, but these instructions look good to me. You shouldn’t need to change anything as far as the Claymore scripts go (unless you’re dual-mining, in which case you’ll need to tweak your -dcri switch parameter, as the optimal values for AMD and Nvidia GPUs are different).
Thanks! So the current nvidia drivers are nvidia-387 and I’ve also installed cuda after a few hurdles.
In my brief 30 minute test, Claymore shows about 10% better hash rate but the stats on nanopool seem far less rewarding than what I’ve been seeing running etherminer / ethermine.org
And the payout minimum seems to be 4X as much, not insurmountable but mining along at 100mh/s who knows what ETH will be worth by then?
hmm may have spoken too soon, my nanopool stats jumped about a bit, now I can’t tell which is better.. but I’m guessing at least 2 weeks to earn a 0.2 ETH payout at ~ 100mh/s
more dumb noob questiosn (sorry for the blog spam and thanks for your help!)
*) I assume I could point claymore to ethermine (since I saw the dev fee pointed there!) and seeing as Claymore gives better hash rate than etherminer, it would hence be more profitable using claymore than etherminer?
*) Given a constant hash rate, are some pools more profitable than others? I know there are pool fees but beyond that, are they all on the same playing field, or do some have advantages over others?
thank you badger!!!
I think you’re confusing 2 different things. Ethermine is a pool, similar to Nanopool. Ethminer is a miner, similar to claymore.
1) I’ve now tested both ethermine and Nanopool, they seem to be pretty close to the same, but Nanopool possibly pays slightly better. (Hard to say, since both trials weren’t running simultaneously) I seem to find more shares/hour on ethermine, but it appears they pay less per share. Two things I do like about ethermine so far: they pay the transaction fee when eth is transferred to your wallet (Nanopool May too, I just can’t find it on their page), and no matter your payout settings, if you haven’t received a payout in 7 days, and your balance is above .01, you will get paid. I don’t know that you can go wrong with either.
2) there is a good breakdown of the different miners on this page, but I think the recommended miner is claymore.
You’re right, it is confusing! I got the ethminer software from the ethermine page, but I see what you mean.
This is exactly the kind of information I’m looking for. I’ve been running on ethermine and lately started trying nicehash, which seems great when it works since the payout threshholds are nice and low and the graphs are sweet, but tends to flatline for hours here and there with no explanation and lots of people on reddit complaining it’s down…
Now I’m running some tests, mine on ethermine for 2 hours, see how many ETH it earns, then on nanopool for 2 hours and compare. Trouble is I’m spreading around earnings that will take my rig forever to earn the payouts. Need to find a good one and stick with it for a few weeks.
well in case you’re curious here are my results running 2.5 hours on each, amazingly close:
ethminer on ethermine, reported hashrate ~ 98 mh/s, produced 0.00130 ETH over 150 minutes
claymore on nanopool, reported hashrate ~ 109 mh/s, produced 0.00131282 over 150 minutes
I know these won’t stay constant but assuming they do, about 16 days to get a payout (0.2 ETH) on nano and given the 1/4th minimum payout (0.05 ETH), about 4 days on ethermine.
I have two rigs both were running happily for the past three months until yesterday. I installed the latest system updates on both rigs and after a reboot they both started having driver issues. One box is stuck in a login loop, the other is getting segmentation faults during claymore startup.
I decided to re-install xubuntu from scratch of the rig getting segmentation faults. I used this guide and am still getting segmentation faults. Any ideas on how I can trouble shoot this?
Thanks
Hi Matthew,
I had the same problem. Everything ran smoothly until the last reboot. I have 8x rx570 cards. Hashrate dropped from 27 to 19 per card.
See this thread: https://www.reddit.com/r/EtherMining/comments/7pqjxg/5mhs_drop_on_every_card_today_any_ideas_why/
If you have amdgpu-driver you need to execute:
sudo apt-get remove linux-image-4.13.0-26-generic && sudo apt autoremove -y
sudo update-grub
Credit goes to ItsFlavius, the author of the post. Thanks man for being so smart.
I ran those commands and then rebooted. Still getting the same error:
Segmentation fault (core dumped)
It is working now. In addition to removing the 4.13.0-26 kernel, I also did the following:
1) uninstall 17.40 amdgpu po by running “amdgpu-pro-uninstall”
2) install 17.50 by running
– “wget –referer=http://support.amd.com https://www2.ati.com/drivers/linux/ubuntu/amdgpu-pro-17.50-511655.tar.xz”
– “tar -Jxvf amdgpu-pro-17.50-511655.tar.xz”
– “cd amdgpu-pro-17.50-511655”
– “./amdgpu-pro-install -y –opencl=legacy”
3) Remove any custom grub edits made previously for 17.40 and update grub
4) Reboot
Mining is back up and running at full speed.
Happy news.
Do you see any hashrate improvements with the new 17.50 driver?
There doesn’t appear to be any hashrate improvements with the 17.50 driver. I’m getting the same hash rate as I did with 17.40 with my RX580s.
I set up everything as written in the article and cannot get over 4Mh/s. Do you have any ideas? I use rx 570 GPU.
I had similar problem during overclocking the GPU memory timing and undervolting. When my GPU memory was tweaked too high the hashrate dropped to 6MH/s. Also be sure the GPU Core clock is set +/- to 1150Mhz. Low GPU Core clock also causes the hash rate is low! The best way how to overclock, undervolt and to be sure the GPU can mine properly for me was => temporarily boot Windows, run any tweaking software (does not matter which vendor your GPU is, I have good experience with Sapphire TriXX app), in parallel run HWiNFO and its Sensors. There you need to check GPU Memory Errors. This counter starts incrementing rapidly in case the memory clock is too high and/or voltage is too low even you still do not see any artefacts on the screen! Some tweaking guides says after seeing artefacts on the screen “go back to previous values when you did not see them” but this is not correct. Even you do not see anything bad on the screen the GPU memory can be set behind its limits and only the sensors truly reports the memory errors. From my experience it’s good even the error counter increases let’s say in ones per minute. With such setting you can mine with average 24-26MH/s on RX570.
great guide, highhly appreciated!
over the weekend did buil my first rig:
mobo + CPU: MSI z370 gaming + i3 3.7
RAM: 8 GB
GPU: 2 x RX580 (last in the shop)
did use debian, driver v. 17.4
after 6 h of steady operations can see the following:
hash rate 45 average
power consumption on the wall: current 415 w/h
the results a somhow dissapointing.
Questions:
– MSI board has crypto currency option in BIOS, enabling above 4GB RAM size, but unlocking it just stops the boot ptocess. Any ideas?
– what to tweek in BIOS setting for PCIx? Speed, version, etc?
– What can we done to optimize drives in Linux? There is already 17.5, but delete the old drives seems like a huge pain
– What to do to optimize power consumption?
Hey everyone,
I am having issue and don’t know how to fix it. Tried reinstalling amd-pro drives several times, different versions, does not fix. Using R290x GPU, as far as I know it should be supported. Here is error:
amdgpu_device_initialize: DRM version is 2.50.0 but this driver is only compatible with 3.x.x.
Segmentation fault (core dumped)
Thank you for time helping me!
Hello sir,
Thank you for the great guide.
I had a small doubt which i guess lot of them out there still have it.
Please do solve this.
What would be the command line for nvidia GPUs be:
GRUB_CMDLINE_LINUX_DEFAULT=”quiet splash amdgpu.vm_fragment_size=9″
I see that it says, amd, what would be the command for nvidia.
Thanks in advance.
Another noob question, if you don’t mind.
I followed all your instructions and my rig is up and running @26Mh/s happily. But as you said, I wanted to backup my wallet data from
~/.ethereum/keystore directory
As I am running the session from Putty, so the monitor which I have connected to the rig isn’t detecting any input signal. So there is no way that I can access the files from the machine directly. I did some digging in the internet and couldn’t find the way to access the same via terminal(putty) as well.
Please help me access the the keystore either via putty or by connecting the monitor.
Thanks in advance!
You need to use something like scp to move the files from the Linux machine to elsewhere. A link to get you started. Happy mining!
https://superuser.com/questions/414803/how-to-scp-from-linux-server-to-windows-client