Ethereum/Installation
(→Install and Configure Ethminer) |
|||
| Line 119: | Line 119: | ||
Now that we have everything needed to mine, lets install and configure the miner. | Now that we have everything needed to mine, lets install and configure the miner. | ||
<nowiki>~$ sudo apt-get install -y ethminer</nowiki> | <nowiki>~$ sudo apt-get install -y ethminer</nowiki> | ||
| + | List all opencl detected devices. you may need to know the deviceID. | ||
| + | <nowiki>~$ ethminer --list-devices | ||
| + | [OPENCL]: | ||
| + | Listing OpenCL devices. | ||
| + | FORMAT: [deviceID] deviceName | ||
| + | [0] Ellesmere | ||
| + | CL_DEVICE_TYPE: GPU | ||
| + | CL_DEVICE_GLOBAL_MEM_SIZE: 4281331712 | ||
| + | CL_DEVICE_MAX_MEM_ALLOC_SIZE: 3417204326 | ||
| + | CL_DEVICE_MAX_WORK_GROUP_SIZE: 256 | ||
| + | </nowiki> | ||
Run a benchmark to test your card. This will take a little while. | Run a benchmark to test your card. This will take a little while. | ||
<nowiki>~$ ethminer -M -G</nowiki> | <nowiki>~$ ethminer -M -G</nowiki> | ||
Revision as of 04:52, 11 December 2017
Contents |
Overview
In the below article i'll be covering how to configure an Ethereum deployment on Ubuntu. Out of the available linux resources out there, Debian based are well supported by Ethereum developers, with some even setting up a repository so software can be easily obtained.
Regarding Redhat based solutions, most everything I've seen requires you to download the source, compile and make yourself, which is not ideal for any solution long term that you plan on keeping up to date.
With the above mentioned, this article will be based on the latest Ubuntu server build, which at the time of this writing is 16.04.3 LTS.
My main reference article.
Initial Hardware Setup
As a personal rule, I always start with the most basic configuration and slowly build upon it, step by step, rather than just installing everything at once. In my experience, this has helped me overcome issues as they are easier to identify this way.
With that said, I would first recommend setting up your system in the most basic functional configuration possible. My beginning config was this:
Installed:
- Power supply - EVGA 1k watt PS
- Intel Mainboard - AS Rock H81 Pro BTC (with onboard video through HDMI)
- Intel Processor - 2.9Ghz Pentium
- CPU heatsink/fan
- ThumbDrive - Toshiba 16GB USB 2.0
OS Installation
I've chosen to use a thumbdrive as my hard disk. I do not think that disk speed will affect performance, so i've gone with the cheapest solution i can find that I think will work, an 8GB Sandisk drive straight from China. Mine cost $2.84 shipped, but I see others just like it for $2.99 and some mini 8GB versions (sit almost flush with the USB port) for $1.49 shipped.
Again, I've used Ubuntu Server x64 16.04.3 for the operating system. Make sure to download the right ISO, mine was almost 900MB.
USB Installation
Assuming you are working from a Debain based machine (Ubuntu, Mint, etc), you can download unetbootin from the repos in order to install Ubuntu onto the USB drive.
~$ sudo apt-get update && sudo apt-get install unetbootin -y
If you wanted to check and make sure it was available in your repos, run a quick search
~$ sudo apt-cache search unetbootin
With unetbootin installed, you can use the GUI to write the ISO to the Flash Drive.
Alternatively, if unetbootin fails (which it did for me, the USB was not bootable), you can see if your distribution has its own USB creator. Thankfully Mint had USB Image Writer and I used that to create the bootable USB.
NOTE: you may need to use (2) thumb drives to pull this off. (1) will contain the installation media, the other will be used for the Operating system to be installed to.
BIOS Configuration suggestions
Below are some BIOS configuration suggestions. I'm not going to show you how to change them or what all of the helpful ones might be because there are simply too many different types of BIOS solutions out there, however, the list below is fairly generic.
- Set correct date/time
- Set Boot config so your USB is first.
- disable sound card
- set auto power in if AC is lost
- disable onboard RAID
- disable full screen logo
- change halt on to no errors (you want it to boot without stopping)
- quick boot enabled (no memory checking)
- disable boot up seek floppy
OS Configuration
Setup DHCP
~$ sudo vim /etc/network/interfaces Add: #dhcp - enp3s0=nic auto enp3s0 iface enp3s0 inet dhcp
Update and upgrade all packages
~$ sudo apt-get update && sudo apt-get upgrade -y
Install sshd
~$ sudo apt-get install ssh -y
Configure sshd. This is a basic, low security, setup working over port 22 and password authentication. It is not meant for a device serving ssh connections to the internet.
~$ sudo vim /etc/ssh/ssh_config Uncomment: PasswordAuthentication yes Port 22
Video Card Installation
With a base OS configured, I decided to go ahead and install the first video card (test card).
Hardware installed:
- AMD Radeon RX580 4GB
- PCI-e Riser (USB)
NOTE: Depending on your motherboard, you may have to configure the BIOS to use the onboard video instead of the PCIe Graphics card in order to run headless (ie. no monitor plugged it). If you do not, you mainboard may look for a monitor to be plugged in before it will allow the system to boot.
With the video card installed and the system powered on, let's make sure the system sees the video card.
~$ lspci -v | grep -A 10 AMD | grep -A 10 VGA 02:00.0 VGA compatible controller: Advanced Micro Devices, Inc. [AMD/ATI] Device 67df (rev e7) (prog-if 00 [VGA controller]) Subsystem: Tul Corporation / PowerColor Device 2378 Flags: fast devsel, IRQ 11 Memory at e0000000 (64-bit, prefetchable) [disabled] [size=256M] Memory at f0000000 (64-bit, prefetchable) [disabled] [size=2M] I/O ports at e000 [disabled] [size=256] Memory at f0200000 (32-bit, non-prefetchable) [disabled] [size=256K] Expansion ROM at f0240000 [disabled] [size=128K] Capabilities: <access denied>
We can see that the video card is seen and has a location of 02:00.0.
VGA Configuration
At the time of this writing, AMD has released beta drivers specifically made for mining. You can view them here: http://support.amd.com/en-us/kb-articles/Pages/AMDGPU-Pro-Beta-Mining-Driver-for-Linux-Release-Notes.aspx.
I'll be using the latest drivers as of 12/11/2017, which are 17.40.
Download and extract the drivers to /opt/amdgpu-pro-17.40-483984. referer reference
~$ wget -O /tmp/amdgpu-pro-17.40-483984.tar.xz --referer=http://support.amd.com https://www2.ati.com/drivers/linux/beta/ubuntu/amdgpu-pro-17.40-483984.tar.xz ~$ sudo tar -Jxvf /tmp/amdgpu-pro-17.40-483984.tar.xz -C /opt/
Install the drivers. This will take a few minutes, mine took almost 30.
~$ /opt/amdgpu-pro-17.40-483984/amdgpu-pro-install -y
Set some needed group membersip
~$ sudo usermod -a -G video $LOGNAME
Download and configure ROCm
~$ sudo apt install -y rocm-amdgpu-pro ~$ echo 'export LLVM_BIN=/opt/amdgpu-pro/bin' | sudo tee /etc/profile.d/amdgpu-pro.sh
Enable large page support NOTE: needed for improved mining performance
~$ sudo vim /etc/default/grub Change: GRUB_CMDLINE_LINUX_DEFAULT="" To: GRUB_CMDLINE_LINUX_DEFAULT="quiet splash amdgpu.vm_fragment_size=9"
Update grub and reboot
~$ sudo update-grub && sudo reboot
Ethereum Wallet Creation
If you already have an Ethereum wallet, you can skip this step. Otherwise, if you want to create a wallet (or one specific for mining, follow these instructions.
Add repo, update repo cache, download and install packages.
~$ sudo add-apt-repository -y ppa:ethereum/ethereum ~$ sudo apt-get update ~$ sudo apt-get install software-properties-common ethereum geth -y
Create the new wallet
~$ geth account new
You'll be prompted to specify a password. Remember this, you will need it to access your wallet.
Also, when the wallet is created, the keystore will be deposited here: ~/.ethereum/keystore
NOTE: It is very important that you remember your password and keep a copy of the keystore in a secure location. (but maybe not together). BOTH of these are needed for you to access your wallet. Without either of them, you cannot access your wallet and all the associated coins are lost.
Install and Configure Ethminer
Now that we have everything needed to mine, lets install and configure the miner.
~$ sudo apt-get install -y ethminer
List all opencl detected devices. you may need to know the deviceID.
~$ ethminer --list-devices [OPENCL]: Listing OpenCL devices. FORMAT: [deviceID] deviceName [0] Ellesmere CL_DEVICE_TYPE: GPU CL_DEVICE_GLOBAL_MEM_SIZE: 4281331712 CL_DEVICE_MAX_MEM_ALLOC_SIZE: 3417204326 CL_DEVICE_MAX_WORK_GROUP_SIZE: 256
Run a benchmark to test your card. This will take a little while.
~$ ethminer -M -G