This guide is adapted from /u/CryptoBadger ‘s guide. 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 update
sudo apt-get install openssh-server
- From 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
video
and append the current user to it by typing the following:sudo usermod -a -G video $LOGNAME
sudo 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 ~/Downloads
wget 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.gz
sudo mkdir /usr/local/claymore95
sudo 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/claymore95
sudo chmod u+s ethdcrminer64
sudo nano mine.sh
- Nano (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/sh
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
./ethdcrminer64 -epool <Mining_Pool_Address> -ewal <Your_Ethereum_Wallet_Address>.<Friendly_Name_For_Computer> -epsw x -mode 1 -tt 68 -allpools 1
- Replace
<Mining_Pool_Address>
with the address of your mining pool - Replace
<Your_Ethereum_Wallet_Address>
with your Ethereum wallet address - Replace
<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
Y
- Press 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
USERNAME
with your Ubuntu username)#!/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/claymore95
su USERNAME -c "screen -dmS ethm ./mine.sh"
- You will now need to exit out of Nano
- Press CTRL+X
- Type
Y
- Press 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.sh
to startup- Type the following:
sudo nano /etc/rc.local
v
- Find the line which reads
exit 0
and type the following above that line (replaceUSERNAME
with your Ubuntu username):/home/USERNAME/minestart.sh 15 &
- Type the following:
This is it! Try it out by navigating to cd cd /usr/local/claymore95
and running ./mine.sh