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.
THANKS and SOLUTION for small POOL-Problem:
Thank you for your super-guide!
It lasts four weeks to get all hardware (and still some gpu missing) and building the alu-case. Mounting and install was so fast, because of your very good explanation.
I want to add a solution that worked for me: following your guide to create geth-account and participating at https://ethermine.org/ I had a little problem: I was mining a half day (successfully “Shares found and accepted by pool”) and at https://ethermine.org/miners/%5Bmy-eth-adress%5D nothing happened – there were no signs of my miningactivity.
I thought a little bit and added a “0x” in front of my ether-adress.
And magically now I see results and its working.
Thank you again!
Every works out for me with the exception of the -tt command in claymore miner. I get an error message “Failed to set new fan speed, check if miner has root access!”
a search via google didnt seems to return instructions on how to give root access to amd drivers.
We give Claymore’s miner root privileges in step 6 with the “sudo chmod u+s ethdcrminer64” command. Try going back to your miner installation folder and entering that again.
It’s not super important to set a fan speed target unless you’re keeping your miner somewhere where you can hear it. I find that 68C is the best balance between keeping things relatively cool, while also keeping the miner quiet enough to not be offensive (at least, once it’s undervolted). But the default fan speed setting should be ok too, if noise isn’t an issue for you.
This hasn’t resolved the issue for me. I rebuilt 3 rigs with these instructions and I am having the same “failed to set new fan speed” regardless of how many times I follow step 6. Can you please advise? GPU temps average 75c-85c now.
“and things like GPU undervolting are trickier (but still possible via BIOS mods).”
Could you tell more detail about it? I use ubuntu and don’t know how to undervolt it. Thanks!
I cover how to undervolt (and overclock) via GPU BIOS mods in the 4th part of my guide, located here.
Thanks for all your work! It helped me get a small rig going! Any chance you might post instructions on how to mine ETC instead of ETH?
Claymore’s miner supports ETC mining, so I believe that the only thing you’d need to do is replace the pool in your mine.sh script (step 6) with whatever ETC pool you want to use.
>You should be able to SSH into your miner at any time and type miner to monitor the miner’s process
I was unable to get this monitor command to work.
Apart from that a smooth setup
What do you see when you type “miner” at the command prompt?
Hi there,
awesome guide, thank you!
For the longest time i see “Total Shares: 0”
I am assuming this isn’t going well? Any ideas?
You should see shares increasing over time, if they’re stuck at zero something is wrong. Can you take a screenshot of the output you see when Claymore starts up (everything from the initial launch to where you start seeing share messages)? You can use imgur.com to host your screenshot for free and link it here so we can take a look.
Thanks a ton CryptoBadger, it resolved itself. You are right, it took a bit of time.
Cheers!
Wow, it’s amazing. Thank You. I will try to build my rig with your advices.
Regarding Xubuntu version you’ve provided link for. This one is for AMD processor, if I understoof correctly. And if I have Intel processor shall I use 32-bit PC (i386) desktop image? Correct me if I am wrong.
The link in the guide is for all 64-bit processors (the .iso filename has ‘AMD’ in it, so it can be a bit confusing). Definitely don’t get the 32-bit version, as the mining software requires a 64-bit OS.
hoi i get following
./ethdcrminer64: error while loading shared libraries: libOpenCL.so.1: cannot open shared object file: No such file or directory
I didnt install amd pro driver
The last time i did i had to reinstall ubuntu. Driver from amd didnt work.
My card is a radeon rx 550
any solutions
thanks in advance
When you installed the AMD Pro GPU drivers, did you use the exact link in my guide (version 16.60, which was the latest when my guide was written, but I believe the RX 5xx series of GPUs had not yet been released)? Or did you download the latest version (17.10, which definitely does support your RX 550)?
If you haven’t tried the latest version of the driver yet, I’d give that a go. You’ll just need to substitute the latest version of the driver in the first section of step 4:
cd ~/Downloads
wget --referer=http://support.amd.com https://www2.ati.com/drivers/linux/ubuntu/amdgpu-pro-17.10-414273.tar.xz
tar -Jxvf amdgpu-pro-17.10-414273.tar.xz
cd amdgpu-pro-17.10-414273
./amdgpu-pro-install -y
Hoi. Thanks for the answer.
I tried the exact one mentioned above.
I also tried the newest one.
Same thing. After reboot Black screen. Gonna try ubuntu 17.04 now.
Maybe that works.
Grts Frank
I also get a black screen when rebooting after installing amd drivers. Tried both driver versions.
Where did you connect you display? In my case there are two options:
1) directly to motherboard VGA – internal graphic
2) to RX xxx card – PCI-E graphic
Before AMD dtriver installation I was connected to VGA on motherboard and BIOS setting preferred PCIE as a video output. Still I was getting picture on my display connected to motherboard. But as soon as I installed AMDGPU drivers and reboot Ubuntu only black screen is seen. I assume I should connect display to video card directly now but it does not support HDMI. Anyway OS boots up properly and after reboot I am able to ssh to rig and do all the activities remotely.
Are you plugging your monitor into one of your GPUs, or your motherboard? If you’re plugged into your motherboard, switch to one of your GPUs.
Hi,
I am also trying to install an RX 550 on linux (debian 9.0). I have succeeded to install the amdgpu-pro driver (17.10-450821) with some adjustments.
The “lsmod” shows the driver as loaded, “lspci -k” and shows that indeed the card has driver in use the amdgpu driver.
Claymore and ethminer are unable to detect my GPU. When I run “clinfo” there is one Platform with name “AMD Accelerated Parallel Processing” and it only has 1 device with type “CL_DEVICE_TYPE_CPU”, so only the CPU appears as available device.
Am I missing something?
PS: My motherboard has an integrated Intel graphics card which I use. I only intend to use the AMD GPU for the miner.
Hi CryptoBadger,
Could you please share some insite for how to control temperature of AMDGPU?
I am using Sapphire Nitro RX470 4G and it gives 21.77Mh/s but temperature is 70 degree C. Is it safe? What is the optimum working temperature range for thus GPU? Any tricks or hints how to control it?
70 degrees C is well within the card’s working temperature. Most cards can run up to 90 C. Nvidia even overclocks their cards until it hits around 90c
In step 6 of the guide, we actually set a temperature target of 68C when we create our mine.sh script (it’s normal for GPUs to fluctuate a few degrees from the target, so 70C is normal and absolutely fine). You can set any value you like by changing the “-tt 68” switch to another value (-tt stands for “temperature target”). Look for the line that starts with “./ethdcrminer64” in your mine.sh script and just change the two numbers after -tt near the end of the line. Be warned that lowering your temperature target will increase the speed of your GPU fans which could make your rig quite a bit louder (it’ll use a bit of extra power, too)!
Hi CryptoBadger,
first of all, thank you for this awesome guide! throw some beers for sure after my rig is up 🙂 I have a question tho, when we installing the xubuntu, are we right away plug 6 gpu? or using on board first and then after installing amd then plug all the PCIE, please let me know. thanks!
You can do it either way. I find it’s easiest to just plug in one GPU, and get everything working with a single card, and then power down and add the remaining GPUs. But it won’t mess anything up if you start with all 6 GPUs attached. I typically like to disable onboard video and anything else that I don’t plan to use on the motherboard, though.
Hi,
Do we have any recommendation about virual memory/swap size in Linux for mining? In Windows it has to be set to 16G.
You shouldn’t need to do anything if you’re running Linux – the OS does a good job of handling everything automatically.
Thanks for he guide. After I install the AMD-GPU PRO and reboot the screen freezes on a blank screen with the following message: /dev/sda1: clean, x num blocks
Any idea on what’s happening?
I haven’t had this happen to me, but it looks like other people have had the same issue – the message itself is normal, but obviously failing to continue the boot sequence afterwards is not. It seems to be related to a video driver issue in most cases. There are some things you can try in these first few Google results. Good luck!
I build a replica of Badger’s Litecoin mining rig a few years ago. It works a little slow for Ethereum, but if you don’t feel like spending money on new hardware, download Ubuntu 15.10 and use the litecoin mining guide on installing the video card drivers for linux (Windows will most likely work with any solution but I don’t have a hard drive for that machine and I never tested it). Install it on a USB 3.0 stick also or a hard drive. USB 2.0 will work, but very slow. You may get an error like X needs to be running or something on the last step to verify it’s working, but it’ll work. I also installed xrdp and mate desktop so I can log in with windows remote desktop and monitor things easier. Works great. The old MSI twin frozr III’s with the modified Badger bios settings do around 12 M/h per card with very light (about 10% on the core only) overclock. Claymore’s miner works great on the old litecoin miner also, and if you’re into zcash, silentarmy miner works best, but it’s not as profitable as ethereum right now.
Hello, first that anything I have to thank you because I followed your guide and it’s the closest I had to mining in my actual PC (AMD CPU FX-8350 on a Gigabyte 990FXA-UD3 R5, 8Gb RAM with Asus Geforce GTX 760 2Gb GPU).
Second, I have a big problem: apparently is related to the 2Gb in my GPU, I can run Claymore with the terminal commands:
cd /usr/local/claymore90
./mine.sh
But got 2 error messages:
“CUDA error – cannot allocate big buffer for DAG. Check readme.txt for possible solutions.”
“GPU 0, CUDA error 11 – cannot write buffer for DAG”
(the readme.txt file mentioned in error message doesn’t exist)
Tried using in the Claymore configuration the options:
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
but nothing changed… what can I do to run Claymore on my GTX760 2Gb video card?
Third: I can’t get running Claymore automatically on Xubuntu startup (in conjunction with the problem mentioned before, but I don’t care if this GPU not worth it because its low Hash rates/high power consumption, because it’s for learning purposes), tried your’s guide steps, and adding it to app startup, but it wont start automatically neither.
All that is important, because in my current PC maybe never work because GPU RAM limitations, but I plan to build a PC exclusively for mining. All this trouble is for learning before I purchase expensive new hardware that I can’t get working once assembled.
the startup scripts aren’t going to work for you in your mine.sh bash script defined in this guide doesn’t work. As for 2gb cards I’ve had issue defining all those environment variables in unix but not windows maybe give that a try?
What doesn’t work for you with the startup script? I followed the guide exactly as written and my rig starts mining automatically after power on.
The startup script simply doesn’t run when Xubuntu starts, no error message, no terminal windows, nothisg, it’s just like I never made a script for startup, and I repeated this guide’s steps 3 times, I know that if I don’t fix the 2Gb GPU issue Claymore never will run successfully, but at least it should open the terminal and show me the 2Gb related error messages.
You won’t see anything since Claymore is launched in the background as a screen process. You need to type “miner” at the prompt if you want to check on Claymore, just like CB wrote in his guide. Since your miner isn’t running properly, you’d need to time it just right to catch it starting up before it quits.
I don’t think your 2GB issue is fixable. According to the guide FAQ, you need a card with at least 3GB of memory to mine ether: http://www.cryptobadger.com/2017/05/build-ethereum-mining-rig-faq/#memory_limit
I know the easiest ways will be installing Windows or buy a preinstalled/preconfigured linux hard drive, but I’m a little paranoid about MS privacy in a mining pc, and the issues like wannacry make me think twice in using Windows… besides using a preinstalled linux drive takes the learning fun away. It’s good the extra incoming that you get from this machines, but for me is very important the learning experience.
Fuller, thanks for your answers, now I’m sure my problem is because the GPU RAM limitation, and not because I’m a complete linux disaster, I think that I’ll search for a reasonably priced RX580 to test (all are gone or are overpriced)
I am a complete newb, and have an Nvidia GTX1060… any advice on how to get this to work? I’ve tried 4 builds so far and error out (no sufficient gpu or cpu) each time
Do you have the right drivers installed? CB guide is fot ATI cards, for your nVidia card you must…
Check the current drivers in use:
lspci -vnn | grep -i VGA -A 12
In case you aren’t using the 375.66 nVidia drivers:
sudo add-apt-repository ppa:xorg-edgers/ppa -y
sudo apt-get update
sudo apt-get install nvidia-375
sudo usermod -a -G video $LOGNAME
sudo reboot
That’s how I installed the drivers for nVidia card
Hi. Thanks for this guide but I am having issues getting the gpus running. I used the latest update from AMD as well during step 4.
I have the following:
Motherboard: MSI Z170A M5
GPU (x3): AMD Radeon RX480
I have uninstalled and reinstalled with 1 and all 3 gpus but cannot get the motherboard to detect them. I have even removed the riser and tried to plug one in directly to the motherboard but it will still not show up in BIOS. When they are plugged in and I turn the computer on they turn on with it but do not get detected. Any help would be appreciated!
Thanks again!
Are you booting with a monitor connected to your primary video card? If so, do you see anything on the screen at all when you power on?
Possibly dumb question but do you have the PCIe power connector plugged into each video card? If you do, check your BIOS settings and verify that you’re not set to onboard video only.
Crypto you’re a legend.
I wanted to get into mining back when you could still gpu mine bitcoin but never did. (what an idiot) I saw your guide here and thought I’d give it a shot.
Never used linux before but I managed to set it all up albeit with one gpu just to see if i could do it. Well done bro you’re a legend. I’ll be using your affiliate links definitely. Sharing the love 🙂
Quick question if you’ve come up with this before
(Using an old GIGABYTE Gigabyte GA-MA790X-DS4 I had lying around and a single RX480 to test that I can actually do this. I’ve opted not to go for the headless solution but I’m running my monitor through the RX480’s HDMI. So everything runs like a charm, but I’m getting only 4MH/S from the single RX480 (GPU0)) I will be checking online but thought I’d ask if you’ve had this before.)
Can you post a link to a screenshot of Claymore running (from startup to where it starts mining)? Normally really low hashrates are caused by the OS throttling the GPU because no monitor is plugged in (which can be resolved with dummy plugs), but you have a monitor attached, so I’m not sure what’s going on.
I’m not a total Linux noob but new to mining. i have a brand new box with fresh copy of Unbuntu. I have an RX570 and from what I can see its not a popular card for mining. Its an ASUS oc edition. I’ve tried every driver I could find online and I can’t get my Mh/s to stay steady. IT will start at 22. 22 Mh/s then drop down to 7.986 Mh/s. is this normal or am I doing something wrong?
Definitely not normal. 22 Mh/s is normal for a stock card with factory BIOS, but it should continue hashing at that speed after startup, not drop down to ~7 MH/s. Do you have a monitor plugged into the card? Can you post a link to a screenshot of Claymore running (from startup to where it starts mining)?
����������������������������������������������������������������ͻ
� Claymore’s Dual ETH + DCR/SC/LBC/PASC GPU Miner v9.0 �
����������������������������������������������������������������ͼ
ETH: 6 pools are specified
Main Ethereum pool is us1.ethermine.org:4444
Catalyst 15.12 is REQUIRED for best performance and compatibility
At least 16 GB of Virtual Memory is required for multi-GPU systems
Make sure you defined GPU_MAX_ALLOC_PERCENT 100
Be careful with overclocking, use default clocks for first tests
Press “s” for current statistics, “0”..”9″ to turn on/off cards, “r” to reload pools
OpenCL initializing…
AMD Cards available: 1
GPU #0: Ellesmere, 4022 MB available, 32 compute units
POOL/SOLO version
GPU #0: algorithm ASM
No NVIDIA CUDA GPUs detected.
Total cards: 1
AMD ADL library not found.
ETH: Stratum – connecting to ‘us1.ethermine.org’ port 4444
ETHEREUM-ONLY MINING MODE ENABLED (-mode 1)
ETH: eth-proxy stratum mode
“-allpools” option is set, default pools can be used for devfee, check “Readme” file for details.
Watchdog enabled
Remote management (READ-ONLY MODE) is enabled on port 3333
ETH: Stratum – Connected (us1.ethermine.org:4444)
ETH: Authorized
Setting DAG epoch #127…
Setting DAG epoch #127 for GPU #0
Create GPU buffer for GPU #0
GPU 0 DAG creation time – 5690 ms
Setting DAG epoch #127 for GPU #0 done
ETH – Total Speed: 13.120 Mh/s, Total Shares: 283, Rejected: 0, Time: 20:22
ETH: GPU0 13.120 Mh/s
GPU0 t=58C fan=42%
ETH: 06/02/17-18:17:44 – SHARE FOUND – (GPU 0)
ETH: Share accepted (98 ms)!
GPU0 t=55C fan=42%
GPU0 t=58C fan=42%
ETH: 06/02/17-18:18:26 – New job from us1.ethermine.org:4444
ETH – Total Speed: 22.141 Mh/s, Total Shares: 284, Rejected: 0, Time: 20:24
ETH: GPU0 22.141 Mh/s
ETH: 06/02/17-18:18:41 – New job from us1.ethermine.org:4444
ETH – Total Speed: 22.141 Mh/s, Total Shares: 284, Rejected: 0, Time: 20:24
ETH: GPU0 22.141 Mh/s
GPU0 t=58C fan=42%
ETH: 06/02/17-18:18:55 – New job from us1.ethermine.org:4444
ETH – Total Speed: 22.145 Mh/s, Total Shares: 284, Rejected: 0, Time: 20:24
ETH: GPU0 22.145 Mh/s
ETH: 06/02/17-18:18:59 – New job from us1.ethermine.org:4444
ETH – Total Speed: 8.003 Mh/s, Total Shares: 284, Rejected: 0, Time: 20:24
ETH: GPU0 8.003 Mh/s
ETH: 06/02/17-18:19:00 – New job from us1.ethermine.org:4444
ETH – Total Speed: 22.139 Mh/s, Total Shares: 284, Rejected: 0, Time: 20:24
ETH: GPU0 22.139 Mh/s
ETH: 06/02/17-18:19:07 – New job from us1.ethermine.org:4444
ETH – Total Speed: 22.144 Mh/s, Total Shares: 284, Rejected: 0, Time: 20:24
ETH: GPU0 22.144 Mh/s
GPU0 t=55C fan=42%
ETH: 06/02/17-18:19:24 – New job from us1.ethermine.org:4444
ETH – Total Speed: 22.146 Mh/s, Total Shares: 284, Rejected: 0, Time: 20:25
ETH: GPU0 22.146 Mh/s
ETH: 06/02/17-18:19:32 – New job from us1.ethermine.org:4444
ETH – Total Speed: 22.143 Mh/s, Total Shares: 284, Rejected: 0, Time: 20:25
ETH: GPU0 22.143 Mh/s
GPU0 t=58C fan=42%
ETH: 06/02/17-18:19:48 – New job from us1.ethermine.org:4444
ETH – Total Speed: 22.147 Mh/s, Total Shares: 284, Rejected: 0, Time: 20:25
ETH: GPU0 22.147 Mh/s
ETH: 06/02/17-18:19:56 – New job from us1.ethermine.org:4444
ETH – Total Speed: 13.584 Mh/s, Total Shares: 284, Rejected: 0, Time: 20:25
ETH: GPU0 13.584 Mh/s
ETH: 06/02/17-18:20:07 – New job from us1.ethermine.org:4444
ETH – Total Speed: 18.493 Mh/s, Total Shares: 284, Rejected: 0, Time: 20:25
ETH: GPU0 18.493 Mh/s
Hey Badger, thanks so much for making this guide. Definitely the most comprehensive for getting started on Linux. I’m having a problem with Claymore though, I suspect it’s a driver issue but wanted your input. After installing the newest AMD GPU Pro 17.70 drivers on Ubuntu 16.04, on starting mine.sh, I’m hit with this:
AMD Cards available: 1
GPU #0: Tahiti, 3060 MB available, 14 compute units
POOL/SOLO version
Cannot build OpenCL program for GPU 0
Segmentation fault (core dumped)
Any help you could lend me would be amazing, as there’s very little about this particular error online. Thanks in advance.
A segfault error generally means that something is trying to access memory that it shouldn’t be. I haven’t run into anyone that’s had that issue yet. Have you tried another version of Claymore, and/or a previous driver version?
I have not, I will look into trying a different version of Claymore and trying whatever driver is listed for maximum compatibility. Thanks for the response!
Firstly thanks for such a great guide. I’ve built 2 rigs that work very well.
I’m now building my 3rd rig and have an issue with UEFI Safeboot.
Intel G1840
ASUS H81M-Plus
4x RX470 using powered risers
4GB DDR3
I’ve followed your intructions completely to install Xubuntu on a USB drive.
After I install the GPU Drivers I get a message saying I need to disable safeboot and to set a password. then I reboot per your instructions and the machine opens a new screen asking if I want to disable safeboot. If I do this then my machine will never boot into Xubunut, it keeps falling back to the BIOS saying I need to diable Safeboot in the BIOS compatibility settings… but I can’t because the option is greyed out.
Have you come across this?
OK so I fixed that by reinstalling the drivers and ignoring the disable UEFI safeboot message. I’ve also taken 2 GPUs off.
Ubuntu now boots…
but only if I have a monito connected and the MH/s is attrocious…
if I run mine.sh this is what I get…
FYI monitor is plugged into GPU0
AMD Cards available: 2
GPU #0: Ellesmere, 3974 MB available, 32 compute units
GPU #1: Ellesmere, 4051 MB available, 32 compute units
POOL/SOLO version
GPU #0: algorithm ASM
GPU #1: algorithm ASM
No NVIDIA CUDA GPUs detected.
Total cards: 2
AMD ADL library not found.
ETH: Stratum – connecting to ‘eu1.ethermine.org’ port 4444
ETH: Stratum – Connected (eu1.ethermine.org:4444)
ETH: Authorized
ETHEREUM-ONLY MINING MODE ENABLED (-mode 1)
ETH: eth-proxy stratum mode
“-allpools” option is set, default pools can be used for devfee, check “Readme” file for details.
Watchdog enabled
Remote management (READ-ONLY MODE) is enabled on port 3333
Setting DAG epoch #127…
Setting DAG epoch #127 for GPU #0
Create GPU buffer for GPU #0
Setting DAG epoch #127 for GPU #1
Create GPU buffer for GPU #1
GPU 1 DAG creation time – 6037 ms
Setting DAG epoch #127 for GPU #1 done
ETH: 06/03/17-00:54:10 – New job from eu1.ethermine.org:4444
ETH – Total Speed: 13.098 Mh/s, Total Shares: 0, Rejected: 0, Time: 00:00
ETH: GPU0 0.000 Mh/s, GPU1 13.098 Mh/s
GPU 0 DAG creation time – 15618 ms
Setting DAG epoch #127 for GPU #0 done
GPU0 t=67C fan=22%, GPU1 t=66C fan=22%
ETH: 06/03/17-00:54:46 – New job from eu1.ethermine.org:4444
ETH – Total Speed: 24.471 Mh/s, Total Shares: 0, Rejected: 0, Time: 00:00
ETH: GPU0 4.106 Mh/s, GPU1 20.365 Mh/s
ETH: 06/03/17-00:54:56 – New job from eu1.ethermine.org:4444
ETH – Total Speed: 24.467 Mh/s, Total Shares: 0, Rejected: 0, Time: 00:01
ETH: GPU0 4.107 Mh/s, GPU1 20.360 Mh/s
ETH: 06/03/17-00:55:01 – SHARE FOUND – (GPU 1)
ETH: Share accepted (26 ms)!
GPU0 t=67C fan=22%, GPU1 t=72C fan=32%
Hey great guide! Do you have any pro’s/con’s to using Ubuntu vs Xubuntu and Linux vs Ethos/Simplemining. I was originally going to go the Linus route per your guide, but so many people say the prebuilt OS’s are faster and easier to setup. What benefits do I have with a fresh linux install? I run OSX so comfortable in terminal and have setup some Raspberry Pis.
Equipment on route is two MSI Z170A Gaming M5 mobos with seven XFX 570s and 5 Sapphire Nitro (non+) 470s. Will have to undercurrent and adjust memory if I want to compete with the 480s and 580s out there. I run Win7 on my mac so can SCP BIOS to edit them.
Thanks for any feedback!
Well I’ve spent three hours trying to install Xubuntu from USB. Can boot to USB, hit enter on “Install Xubuntu” but it goes to a black screen and all USB shuts down.
Gone in circles reading hundreds of posts on the topic. NOMODESET flag doesn’t do anything. Played with every UEFI setting. Nothing is working. DIsappointed, looks like I have no choice but to use a preconfig’d OS…. 🙁
OMG…. Every guide said to enable UEFI… I decided to switch boot order of UEFI USB to 2nd and Legacy USB (BIOS) and now it goes to GUI Xubuntu install… Hopefully this helps someone else!
Adding to the misery… 12 hours later. Installed Xubuntu probably 5 times. It would work once then the MOBO would stop booting to it or acknowledging it existed. Grub started getting installed on the install-usb drive. It was a massive headache. Finally redid the entire thing again (Even the install USB) and everything worked! Removed the install drive and rebooted after install and it worked! But then I rebooted a second time and the drive wouldn’t even light up. It should up when I did Live CD from usb, but it refused to boot.
And then I found it… USB 3 ports are bad for bootable usb drives. I almost cried. Moved the stick to the USB2.0 and it all works. Man. Alive.
Hello, just got my new XFX RX-470P4S with 4Gb and tried again on my daily rig with a 990FXA-UD3 R5 mobo, it makes 22.***Mh/s stock settings and everything works as a charm!!!! now I can go and try to buy as many RX 580 as I can get, to make a full time mining machine, Cryptobadger: you’re the man!!! thanks for your tutorial and answering our questions, as long as there’s nothing updated in the crypto mining hardware out there.
Hi CryptoBadger,
This step by step guide has been very helpful. I made it through step 4, but am stuck when testing @ ‘./mine.sh’
Here’s the terminal output:
——————————————————————-
▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒ͻ
▒ Claymore’s Dual ETH + DCR/SC/LBC/PASC GPU Miner v9.0 ▒
▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒ͼ
ETH: 6 pools are specified
Main Ethereum pool is eth-us.dwarfpool.com:8008
No AMD cards in the list.
No NVIDIA CUDA GPUs detected.
No AMD OPENCL or NVIDIA CUDA GPUs found, exit
——————————————————————-
I did use the latest AMD Pro GPU drivers – version 17.10, which from release notes seems to support my RX 588: http://support.amd.com/en-us/kb-articles/Pages/AMDGPU-PRO-Driver-for-Linux-Release-Notes.aspx
Any sage words of advice for getting OpenCL, AMD Pro GPU drivers, and the RX588 to play nice?
Thank you.
Check again the procedure in step 4, looks like you haven’t installed the right AMD drivers and because that your RX580 isn’t recognized, change the 16.60 drivers for the latest ones:
cd ~/Downloads
wget –referer=http://support.amd.com https://www2.ati.com/drivers/linux/ubuntu/amdgpu-pro-17.10-414273.tar.xz
tar -Jxvf amdgpu-pro-17.10-414273.tar.xz
cd amdgpu-pro-17.10-414273
./amdgpu-pro-install -y
I recommend input line by line into terminal and watch the output of each one, in case of any error list it here.
I was able to solve myself. Followed a few different online threads to ensure appropriate power through MOBO and clearing of CMOS.
Proceeding with Step 7.
Thank you.
Can you tell me which threads you followed that resolved this? I’m having the same problem with my R9 290Xs…I followed this guide and they worked at first but now I’m getting the No AMD OpenCL…error. Thanks in advance!
Hi Badger, thanks man! i just setup my first linux miner 🙂
I have a question tho…. how do we specify the overclock settings? i tried to type it inside with the .mine, but didnt work… and try to put it in config didnt work also…. maybe I didnt put the right command? if you can help me with this overclock will be great! im using 9.4 btw. thanks!
The best way to overclock & undervolt in Linux is to write your clock speed & voltage settings directly to GPU BIOS. I have a tutorial here that outlines the process.
Hi Cryptobadger,
Thanks for your reply! I did mod my bios but somehow didn’t do the overclock without specifying the settings.. in windows it work when I specify it on the claymore files. Is there anyway we can specify the settings in xubuntu? Thanks!