How to begin mining on Linux
This guide is adapted from /u/CryptoBadger's guide (found on the sidebar). I will spin up a VM and verify all instructions instead of judging this with memory and theory. If the guide needs to be adapted, I will change it in the upcoming few days.
Prerequisites
You have chosen a pool
You have chosen a mining application (Claymore/
EthminerEthminer support later, see below)You have an ethereum wallet
You are using Ubuntu 16.04 LTS (Desktop or Server)
Your OS sees all of your video cars
Setting up
Install and Enable SSH by opening terminal and typing the following:
sudo apt-get updatesudo apt-get install openssh-serverFrom this point you can choose to either proceed on the local machine, or remotely on a Windows machine using PuTTY
Create a new usergroup called
videoand append the current user to it by typing the following:sudo usermod -a -G video $LOGNAMEsudo reboot
Installing AMD Drivers
If you plan to use an AMD card in your rig, you will need to install the AMD drivers
Install the AMD drivers by typing the following:
cd ~/Downloads wget --referer=http://support.amd.com https://www2.ati.com/drivers/linux/ubuntu/amdgpu-pro-17.10-414273.tar.xz tar -Jxvf amdgpu-pro-17.10-414273.tar.xz cd amdgpu-pro-17.10-414273 ./amdgpu-pro-install -y
Installing Nvidia Drivers
If you plan to use an Nvidia card in your rig, you will need to install the Nvidia drivers
Install the Nvidia drivers by typing the following:
wget http://developer.download.nvidia.com/compute/cuda/repos/ubuntu1404/x86_64/cuda-repo-ubuntu1404_7.5-18_amd64.deb sudo dpkg -i cuda-repo-ubuntu1404_7.5-18_amd64.deb sudo apt-get -y install software-properties-common sudo apt-get update sudo apt-get install git cmake libcrypto++-dev libleveldb-dev libjsoncpp-dev libjsonrpccpp-dev libboost-all-dev libgmp-dev libreadline-dev libcurl4-gnutls-dev ocl-icd-libopencl1 opencl-headers mesa-common-dev libmicrohttpd-dev build-essential cuda -y
Installing Ethminer
Ethminer requires compiling the executable. I will elaborate on this in a future change, for now, please use Claymore.
Installing Claymore
Download v9.5 of Claymore and unpack it by typing the following
cd ~/Downloadswget https://github.com/nanopool/Claymore-Dual-Miner/releases/download/v9.5/Claymore.s.Dual.Ethereum.Decred_Siacoin_Lbry_Pascal.AMD.NVIDIA.GPU.Miner.v9.5.-.LINUX.tar.gzsudo mkdir /usr/local/claymore95sudo tar -xvf Claymore.s.Dual.Ethereum.Decred_Siacoin_Lbry_Pascal.AMD.NVIDIA.GPU.Miner.v9.5.-.LINUX.tar.gz -C /usr/local/claymore95
Create mining script
cd /usr/local/claymore95sudo chmod u+s ethdcrminer64sudo nano mine.shNano (a text editor) will open a blank file, you can configure it by following the next step.
Configuring Claymore
Paste the following into the new text file:
#!/bin/shexport GPU_FORCE_64BIT_PTR=0export GPU_MAX_HEAP_SIZE=100export GPU_USE_SYNC_OBJECTS=1export GPU_MAX_ALLOC_PERCENT=100export GPU_SINGLE_ALLOC_PERCENT=100./ethdcrminer64 -epool <Mining_Pool_Address> -ewal <Your_Ethereum_Wallet_Address>.<Friendly_Name_For_Computer> -epsw x -mode 1 -tt 68 -allpools 1Replace
<Mining_Pool_Address>with the address of your mining poolReplace
<Your_Ethereum_Wallet_Address>with your Ethereum wallet addressReplace
<Friendly_Name_For_Computer>with a name for your rig (e.g.: UbuntuMiner01)You will now need to exit out of Nano
Press CTRL+X
Type
YPress Enter until you return to the bash promp
Add executable permissions to the file
sudo chmod +x mine.sh
Configure auto-mine on startup
Install Screen
sudo apt install screen
Create a launcher script
cd ~sudo nano minestart.sh
In nano, you will need to paste the following (replace
USERNAMEwith your Ubuntu username)#!/bin/bashDEFAULT_DELAY=0if [ "x$1" = "x" -o "x$1" = "xnone" ]; thenDELAY=$DEFAULT_DELAYelseDELAY=$1fisleep $DELAYcd /usr/local/claymore95su USERNAME -c "screen -dmS ethm ./mine.sh"You will now need to exit out of Nano
Press CTRL+X
Type
YPress Enter until you return to the bash promp
Add executable permissions to the file by typing the following:
sudo chmod +x minestart.sh
Add
minestart.shto startupType the following:
sudo nano /etc/rc.localv
Find the line which reads
exit 0and type the following above that line (replaceUSERNAMEwith your Ubuntu username):/home/USERNAME/minestart.sh 15 &
This is it! Try it out by navigating to cd cd /usr/local/claymore95 and running ./mine.sh
Back | Back to Index | Next (How to begin mining on ethOS)
If this guide has helped you, please consider a donation:
BTC: 18HHZMpdVQZfJ6oUk1WEtH48tRLXW6DkrB
DASH: Xg3v45UiKZkvExSehZ4EJ9uEfgoCS53qsb
ETH: 0xFBd8982c60D0F93304915c33201655eF234C5aE9
GNT: 0x0504ea3a67624c7e60db2e89ed0781d16a27cef2
LTC: LLu9hnGWfgeyRqJtUow1Qugd3MaakLGBax
SIA: d03cc503a977f3b28acc361c174e9018dba7a8f9c2ecd9d070c7ad4d5ee9f4ed82fefa659d45
Steem: 2ecf0c65402ae386
STRAT: SZWvr7Kmc2j2JV1Jbwv5kvTNq4yzWBbjSd
XRP: ryRGuNZkDnrBKwNZKvdZsKRGKeoMb8TZP
ZCash: t1XQGkMkUA9cQQR1nz5CMLcVZimwBnKpBms