As a part of my independent-studies at GWMSIST, I researched how to build cryptocurrency mining rigs; this blog is segmented into a two part-series tutorial which I’ve outlined below, beginning with the purchase of a parts list and Raspberry Pi set-up segueing into configuring the Bitcoin mining client with Minera; each part includes the corresponding YouTube screencast embedded directly beneath each segment- enjoy!
Part 1: Raspberry Pi Set-up and Installation
Required Components
- Raspberry Pi: CanaKit starter-pack recommended- available via Amazon.
- USB-mouse
- USB-keyboard
- SD-card reader.
- HDMI-cable
- Access to an external-monitor or LCD-television via HDMI.
- Physical / LAN-Internet connection.
YouTube Tutorial – Part 1
I provide a YouTube screencast for Raspberry Pi set-up and configuration introducing Bitcoin-mining as part-1 of a 2-series tutorial via YouTube.
Part 2: Minera Client Install
Required Components
- GekkoScience 2-Pac Compac USB Stick Bitcoin Miner (15gh/s) available via Amazon or eBay.
- If you’re attempting to maxmimize your env hash-rate beyond additional two ports provided by Raspberry Pi, I’ve only had success with industrial-grade external USB 20-port or 10-port hubs- also available for purchase at Amazonor eBay. 3.. Do not forget to purchase a USB powered-fan to cool any ennvironments supporting an external USB-hub- also available via Amazon or Ebay.
Minera Client Installation and Configuration
- After setting-up your Raspberry Pi environment, launch terminal and run
curl -o- https://raw.githubusercontent.com/getminera/minera/master/install_minera_ubuntu.sh | sudo bash
- Go to http://IP-address-of-your-local-mining-host/minera
- Download nmap and run
nmap -sP 10.0.0.0/24
to locate the Minera host-IP address.
- Download nmap and run
- In my case, my local-Minera URL is (http://10.0.1.102/minera). Upon access, enter the default username and password ‘minera’ (you’ll want to change this later in Settings > User for InfoSec).
- Go to Minera Settings > Open Terminal
- Again, enter default minera username and password if you haven’t already changed them yet.
- Minera configuration:
cd /var/www/minera/minera-bin/src
sudo mkdir -p git/vthoang; cd git/vthoang
sudo git clone https://github.com/vthoang/cgminer.git
cd cgminer
sudo apt-get install libusb-1.0-0-dev
sudo CFLAGS="-O2" ./autogen.sh --enable-gekko
sudo make -j 2
cp cgminer /var/www/minera/minera-bin/custom/cgminer-vthoang
cd /var/www/minera/minera-bin/custom
exit
- Return to minera-client homepage and select Settings > General
- Enable all radio-buttons featured in the Dashboard panels section to “On”.
- After creating your account at slushpool, In the “Pools Settings” section, enter your slushpool-url, username.workername, and pool-password (E.G. “stratum+tcp://stratum.slushpool.com:3333”, alexanderjsingleton.King, password)
- Under the “Custom miners” section slide radio-button to on (there should be a cgminer-vthoang flag-indictor next to the button).
- Within the “Local Miner Settings”, under the “Currently selected” dropdown-bar, select “[Custom Miner]cgminer-vthoang” and below that dropdown-bar, there is another- select “–Preconfigured miner options–“.
- Below that section there are two radio-buttons for “Enable logging” and “Append JSON conf (-c /var/www/minera/conf/miner_conf.json)”- slide them to “On.”
- In the Manual Options sections, input the optimal hash-frequency parameters for your miners (E.G. for GekkoScience multiple 2-Pac-sticks
--gekko-2pac-freq 150
OR if different sticks enter--gekko-compac-freq 200 --gekko-2pac-freq 150
). - Slide the last three features to “On”
- Autorestart if devices are possible dead.
- Miner Autorecover
- Miner superuser (root)
- Click Save & Restart
Return to the Dashboard- allow 5 minutes to compile and BOOM, you’re a regular Bitcoin lemming!
Adding Additional Hardware or Revising Parameters
Any hardware additions to an existing Raspberry Pi * Minera environment or any adjustments to the hardware parameters specified in Minera Settings > Manual-options do indeed require recompiling cgminer. In order to resolve, proceed with the following:
cd /var/www/minera
sudo nano build_miner.sh
- Scroll down to the cgminer config and append
--enable-blockerupter
so the entire line displaysCGMINER_CONFIG="--enable-avalon2 --enable-bflsc --enable-bitforce --enable-bitfury --enable-drillbit --enable-hashfast --enable-icarus --enable-klondike --enable-modminer --enable-blockerupter"
- Exit and Write.
- Run
sudo ./build_miner.sh all
- Upon compiling, exit from your host-session, unplug the antsticks, power-cycle the Raspberry Pi and then plug-in antsticks.
- Log-in to the Raspberry Pi and sign-in to Minera- you should see verifiable success displayed in the Minera Dashboard > Device Tree.
YouTube Tutorial – Part 2
I provide a YouTube screencast for Minera-client installation and configuration on Raspberry Pi utilizing GekkoScience-USB sticks as part-2 of a series tutorial via YouTube.
Bitcoin Tip-Jar: 35okcyN6NVjLXqLU6bp4aAUqaWccYMqBdb
Ethereum Tip-Jar: 0x56AFEe0116cfaA292bbbc491CB05d633E0aa3418