Rise From Your Grave: Reviving The PiMiner

On a roll with Pi projects, my old Raspberry Pi bitcoin mining rig finally kicked the bucket. Cause of death: cooling fan failure, and according to my mining pool’s site, the last check in was over a month ago. It was one of my first Raspberry Pi projects I really worked on, down to modifying the original source material to work with a different screen, becoming my initial dive into Python (I’ll stick to C++, thank you very much). She’s been running for 2 years of operation managing a few Antminers and Eruptor miners, back before the initial Bitcoin boom. I don’t think the Raspbery Pi Foundation intended for a Pi to be powered continuously for so long, but even with all these issues, I removed the Pi from its custom enclosure, powered it on, and saw a glimmer of hope.

It’s time to rebuild the PiMiner.First thing is first: I do NOT want to buy new hardware… except maybe the fan (I’ll experiment with that later). In the past, I tried to use this VERY Pi to compile HiFi… but the problem was that I couldn’t get it to work fully for some weird reason. For whatever reason, this Pi only wants to use it’s 2GB SD card… not a problem really. I have been meaning to try something new anyway, as I experimented last time while doing my Days of Hifi on Pi posts.

For starters, I am using MINIBIAN, which is a VERY slimmed down variant of Raspbian. This is pretty much is identical to the Ubuntu image I found for the Pi2 and should be perfect for just the occasion. I bid farewell to the original image on the Pi (back when a 2GB card would cut it) and flashed on the newer, updated OS. I attempted to connect with MobaXTerm but… surprise! It doesn’t work for some odd reason… weird. PuTTY to the rescue! After resizing the partition and squaring things away, I went ahead and got to work.

My mining software of choice used to be CGMiner, but over time, it proved to be a hassle to keep updated, so I ditched it for BFGMiner, which did require more setup, but had better control in my opinion. Like many things, it doesn’t come pre-built for the Raspberry Pi, so we’ll have to compile it ourselves. This is thankfully not a complicated matter. We first grab the source code:

Next, we go ahead and run the giant apt-get of doom:

Quite a few packages this time around. Throw in your favorite text editor in as well while you are at it (mine is Nano, don’t judge me). After all that jazz, extract and configure.

We aren’t doing any fancy GPU mining, so default configure should be okay (unless you are following this as a tutorial, then you should check what kind of drivers you will need). If all is good, this should be the summary:

If all is well, get a screen going and run make.

This process doesn’t take a very long time but having screen is needed for operation (at least for operation where we can keep an eye on things). At default clock speeds, we are talking about 10 minutes tops. The cool part is we don’t even need to run install, since we can run it straight out of a fresh compile! I went ahead, grabbed one of the miners, and plugged it in directly… which was a bad idea, since the tiny capacitor on the Pi wasn’t thrilled with that choice.

A forced reboot later, I went ahead and setup all the information. Since I was using Antminers, they tended to be finicky with initial setup. I went ahead and pressed ‘m’ to enter Device Manager mode and pressed + to add a new device. The process has really become streamlined, as all I had to do was type ‘all’ and the scanner took care of the rest. Immediately the PiMiner got to work, which was great to see. In less than a half hour of work, the old Pi I knew and enjoyed was back up and running.

After examining everything, I also discovered the USB hub’s power supply was also not giving the juice it used to, so powering all the miners was not out of the question. Thankfully, I had a second Pi that I was going to shadowbox and decided that would be another simple miner until I resolve the HUB issues. It was a pretty fun experience getting my system back online and reviving what I thought was a dead project. It is also nice to know that a Pi can run for such a long and continuous time and that you can still get the Pi to operate on a minimal set up.

Leave a Reply

Your email address will not be published. Required fields are marked *

16 + one =