After the incident with the large block a few days ago, I had several of my Nebra miners offline or not syncing properly. The behavior ranged from the miner being offline, the diagnostics page only displaying a blank page or the “Helium API Not Available” In a previous post, I explained how the firmware works in detail and from that knowledge I was able to create a relatively simple fix for the Problem.

TLDR: Make a full EMMC Backup and delete the folder /docker/volumes/1804672_miner-storage/_data from the EMMC Partition resin-data

Disclaimer

Since we live in 2021, I feel obligated to point out that randomly modifying and deleting parts of your firmware may break your miner even more than it already is. Please act responsibly and don’t sue me if you turn your money printer into a paper weight. It is recommended to backup your EMMC (e.g. via dd) before you do any of this.

The Problem

You can skip this if you don’t care what’s wrong with the miner and only want a solution. The miner is running a Linux system that in turn runs multiple docker containers. One of them is serving the diagnostics page, another one is handling the actual helium mining. What I think happened is that the big block somehow crashed the helium mining container (because the miner ran out of RAM) and one of the databases that stores the blockchain got corrupted during the crash. Now when the mining container starts, it tries to repair the database and fails. So the solution is to remove the contents of the data container that stores the blockchain data. This forces the miner to do a fresh sync and work again.

Step 1: Get a proper OS

We need to modify an ext4 partition on the miners EMMC storage. Ext4 is only supported by Linux (and OSX?), not Windows. So if you don’t have a PC running Linux already, build something like an Ubuntu Linux live stick and boot from that

Step 2: Backup your EMMC

First we need to make a backup of the entire contents of your EMMC Flash. Don’t skip this, this will save your life if you somehow manage to turn your miner into a paperweight. Open your miner by ripping off the top cover (It’s only clipped in. No screws). Inside you will find multiple PCBs stacked ontop of each other. The upper blue PCB contains a slot for the EMMC chip which looks like a Micro SD Card with a tumor growing on it. Remove it and put it into a Micro SD reader on the PC that’s running Linux Now we need to find the device name of the EMMC so punch this into a terminal:

[fan4tix@linux-pc ~]$ sudo fdisk -l

Find the Disk that says Disk model: SD/MMC and note down the device name. In my case it’s /dev/sdb.

Now make sure you are in a directory where you have more than 32GB of free disk space (I recommend using your Windows boot drive when using a live Linux. Just mount it by clicking on it in the file explorer)

[fan4tix@linux-pc ~]$ cd /media/System # don't just blindly copy this, rtfm!

After that use dd to create an Image of the EMMC device. Again don’t just blindly copy this, understand what it does. Putting in the wrong output file might brick your miner or your PC.

[fan4tix@linux-pc System]$ sudo dd if=/dev/sdb status=progress bs=4M of=./nebra-backup.img # don't just blindly copy this, rtfm!

This reads the raw EMMC device and writes it to a file called backup.img. If you want to restore the Firmware, just swap the if and of path to read the image and output it to the device. Again, double check, that the EMMC device is correct or you could overwrite something like your system partition.

[fan4tix@linux-pc System]$ sudo dd if=./nebra-backup.img status=progress bs=4M of=/dev/sdb # don't just blindly copy this, rtfm!

Step 3: The actual fix

Now open the file explorer as root and find the partition called resin-data on the left sidepanel

[fan4tix@linux-pc ~]$ sudo nautilus

Note: It is important to start the file explorer as root. Otherwise you won’t be able to delete stuff

Navigate to resin-data/docker/volumes/1804672_miner-storage/. You should see a a folder called _data. You can now either delete the folders content entirely or just rename it to something like _data.old and create a new empty _data folder. Whatever you do, make sure an empty _data folder exists after you’re done or your miner still won’t work.

Now unmount your EMMC (eject button next to the resin-data label on the left) and put it back into your miner.

Conclusion

Hopefully your miner should sync now and print money again. I have performed this procedure with three miners already and it fixed all of them. This process could have easily been avoided if Nebra offered some sort of factory reset feature for their miners but for now this seems to be the easiest solution.