A Beginner’s Altcoin Mining Setup with AMD Radeon RX470s, Ubuntu, and Claymore Dual Miner

In previous posts I’ve mentioned that in addition to researching cryptocurrency, I also mine it.  This set off a small flurry of questions about the process of printing money with your computer.

1*kN-euZQpGTqcvB4O5KhSlw

Today I’ll begin the first in a series of posts about altcoin mining.

Buying the hardware

Before you can do any kind of set up, you obviously have to invest in the hardware.  There is a boatload of information out there.  We set out to mimic the Ethereum miners that currently exist as a baseline and plan to explore other hardware now that we’ve accomplished this task.

With mining, you’re building a computer from scratch.  This means you’ll need at the very least the following parts: a CPU, a motherboard, RAM, a HDD, a power supply, and in the case of a miner or gaming computer GPUs.

The community consensus for a baseline Ethereum mining rig is as follows:

All together, purchasing this gear, with all 6 GPUs the motherboard can handle, will end up costing you about $2000, and should net you a hash rate of around 120 MH/s.  If you mine Ethereum, this will make you around $200 per month, without doing anything, but keeping the miner running (which is actually more difficult than it sounds, more on this in another post).  However, I’d recommend to begin with you only purchase 1 GPU, to test with, making the initial investment only around $1000, but the hash rate only around 20 MH/s.

We came to this hardware consensus by doing a bit of research.  Here are a few resources we found useful during this research:

The OS

I’m not sure how necessary this is, but we had the OS installed on a SSD prior to the hardware installation (mostly because we were waiting for the hardware to arrive anyway).  Even if it isn’t necessary, it was a good way to test the hardware installation all the way through to OS boot.

We’re using Ubuntu as we’re planning on scaling beyond 1 miner and didn’t want to pay the licensing fee for Windows with every new miner.  As we’ll see in future posts, this is nice from a customization perspective as well.

There are plenty of tutorials available online for installing Ubuntu, here’s a link to the official one.  As usual, if you run into any snags during the process don’t hesitate to get in touch!

Assembling the Hardware

Great! All the hardware has finally arrived! now what?

I’m a software developer, so if you’re like me, the computer has always come assembled ready to be programmed.

52f21c5369111c889e0fe58442ae827d

This is where the resources mentioned above became useful.  We used buriedOne for info on the hardware set up, as well as EVGA’s official video.  If you’re lucky you won’t have any snags.  If you’re not lucky, the problems could be anywhere from a bad GPU, to a bad display monitor cable, to you shorting something with static while doing the install.  If you do have any problems, feel free to get in touch! I’d be happy to work through any issues or point you in the right direction.

The Driver

If you’ve made it to this point, your miner is now booting into Ubuntu, however, since the GPUs aren’t the integrated GPU, Ubuntu doesn’t know how to talk to them.  Because of this you need to install AMD’s drivers.  Since this information appeared to be pretty sparse online, I’ll go in depth rather than linking to other resources as I typically do.

First, I’d recommend you install ssh, as it might be useful to have remote access to the miner during installation in case you have any hardware issues.

Then go to AMD’s website and find the link to the Ubuntu download (AMDGPU-Pro Driver Version 17.30 for Ubuntu 16.04.3​) and download the driver.  Then go to this AMD tutorial explaining how to install the driver.  The steps should work, HOWEVER, during the step

./amdgpu-pro-install –y

We had to add the –compute flag, as such:


./amdgpu-pro-install --compute

 

Otherwise, on reboot and login, the Ubuntu desktop failed to load.

If you lose access to your mouse and/or keyboard, you can ssh into the miner and run the following command to get them back


sudo apt-get install --reinstall xserver-xorg-input-all

 

And finally, if you ever want to try a different driver, or have simply had enough with mining, you can run this:


amggpu-pro-uninstall

 

From anywhere in the terminal (it’s added to the path) to uninstall the drivers.

Verifying the Driver Install

After reboot you can run the following command to ensure that Ubuntu is in fact seeing the AMD GPU:


lspci -vnnn | perl -lne 'print if /^\d+\:.+(\[\S+\:\S+\])/' | grep VGA

 

You should see a line similar to:


01:00.0 VGA compatible controller [0300]: Advanced Micro Devices, Inc. [AMD/ATI] Device [1002:67df] (rev cf) (prog-if 00 [VGA controller])

For each GPU attached to the miner.

 

The Software

If Ubuntu is able to detect and use your GPUs, it’s time to start mining some coins!

The de facto mining software for ethereum is claymore’s dual miner so that’s what we’ll use for this tutorial.  This link (starting from Step 5) was immensely helpful for the initial set up, and we followed it as a baseline, but have since experimented with a set up that works better for us.  You can also set up dual mining using this link.

Congrats! now you’re mining Ethereum!  Making money while you sleep!  Printing money with your computer!

In the next mining post I’ll walk you through some software customizations we’ve made to our rig, as well as some explorations we’ve made into hardware alternatives to the baseline system.

 

 

 

Advertisements

One thought on “A Beginner’s Altcoin Mining Setup with AMD Radeon RX470s, Ubuntu, and Claymore Dual Miner

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s