More
referral
Increase your income with Hive. Invite your friends and earn real cryptocurrency!

HowTo: Mining Chia in Hive OS w/o GUI

Hello Fellows,

this is my first post here, please be kind, if I do something wrong, please tell me. :wink:
I have my hive running since some days now, with an single GTX 1070 and mining ETH.
Additional Card will come into it as soon I found one with price not to high…

This will be an Step-by-Step Guide, how I found out yesterday evening. It will be completely in Chia-CLI and terminal, so no GUI required. As I find out, you can do everything with the Chia-CLI what you can do with the GUI. However, I’m using the VNC Remote Access to have everything in the HiveOS itself. My HiveOS has an A10 APU, with 8GB of RAM, with an 1TB SSD and 4x4GB usual SATA Drives and currently at v0.6-203@210503.

Everything I wrote here can be found in chia-blockchain/wiki on GitHub, I just read a lot to find out how to do everything w/o GUI. So connect to your hive with VNC or SSh and do everything in terminal as root. I will be using the SSD as temp and the 4x4GB Drives as farming drives.

First of all you need to install chia-blockchan from github, this needs some packages:

apt-get install python3.7-venv python3.7-distutils python3.7-dev git lsb-release -y

Then we need to clone the githup repo in /usr/lib/:

cd /usr/lib/
git clone https://github.com/Chia-Network/chia-blockchain.git -b latest --recurse-submodules

After this is done we move into the chia directory and run the installer:

cd chia-blockchain
sh install.sh

This will install some additional packages and creates an Python3.7 venv. When the installation is complete we enter the venv with:

. ./activate

Now Chia needs to be initialized with:

chia init

Chia directory /root/.chia/mainnet
Can’t find private CA, creating a new one in /root/.chia/mainnet to generate TLS certificates
No keys are present in the keychain. Generate them with ‘chia keys generate’
To see your keys, run ‘chia keys show’

In my opinion it is saver when the farmer has its own wallet and keys and we then just send them to our main wallet after we farmed some chia. So we create our own wallet here with:

chia keys generate

It will create an new wallet and print out the 24 words menomonic for it.
We will now print out all the wallet information with:

chia keys show --show-mnemonic-seed

Be sure that you copy all of the output and store it on a save place with backup. With that information you can also add the wallet on an Chia GUI somewhere else.

That’s all with the preparation, when we now check the chia status we will get the information that no blockchan is currently available:

chia show -s

Searching for an initial chain
You may be able to expedite with ‘chia show -a host:port’ using a known node.
Blockchain has no blocks yet

So we start an farming node with farmer, harvester, a full node, and the wallet.

chia start farmer

Daemon not started yet
Starting daemon
chia_harvester: started
chia_farmer: started
chia_full_node: started
chia_wallet: started

Important, you need to start the farmer again, every time you restart Hive OS, or create an startup job for that, otherwise farming will not be done!
You can check the connections with:

chia show -c

Connections:
Type IP Ports NodeID Last Connect MiB Up|Dwn
WALLET 127.0.0.1 39012/8449 35d736bd… May 06 16:34:29 0.0|0.0
FARMER 127.0.0.1 39014/8447 820c4663… May 06 16:34:30 0.0|0.0

Check from time to time the status of the blockchain:

chia show -s

Current Blockchain Status: Not Synced. Peak height: 244053
Time: Fri May 07 2021 09:59:35 EEST Height: 244053
Estimated network space: 2.622 EiB
Current difficulty: 170
Current VDF sub_slot_iters: 110100480
Total iterations since the start of the blockchain: 790260095973
Height: | Hash:
244053 | 85f85b819ef994093863b6d35f7aef0eb682ec4ba9f6de34a9d80a798c6c3aa8
244052 | 856e80bd34647dacd9b89fa9e700846cc53916353e95e6427b188be77ecc69ef
244051 | 776453221688a580e8a7467ed51780374b6980fdf8e84c4afd1787c39ab75ea3
244050 | 8540ec1c6e4a58aef716ef7e1bbf6cfda556d287dccef2ce7c815c884654bf1d
244049 | 8d9ef826a4088315bf97162641a4e99cda17fed94cf8576f3b74eba47df8695d
244048 | 67e9299832b204d37f2251e996aa8166ee4fda0e25c3c0f1dc37e822d3c149dc
244047 | 7efe6e7c63963c1abe940d84d36238478e2e2d18c55faa622282085580d15ba5
244046 | 7671e0f47705497a20dc60c6beefdf79e88a9e187c5053de1d9eac78e82a84d8
244045 | 11098c6ac4bdaea132df065a5b599e36045b425094b8e0999f9446cb44a29507
244044 | 3ac9763b389ca68e8af69a03b487bf82504155c1e8d6816ab34ca3f05aa9ed1c

As long the Blockchain Status is not synced, you cannot continue. Wait for that, it will take long time, several hours, depending on your hardware and internet connection.
Continue only if you have that output:

Current Blockchain Status: Full Node Synced

So, the daemon will keep the blockchain synched, now we can continue to create the plots. In my case I have the temp directory on the SSD in /home/user/chia_tmp/ and the plots directory in /mnt/sdb1/chia_plots/ and will create two plot files with the size of 101.4GiB:

chia plots create -n 2 -k 32 -b 4000 -t /home/user/chia_tmp/ -d /mnt/sdb1/chia_plots/

2021-05-07T11:25:17.868 chia.plotting.create_plots : INFO Creating 2 plots of size 32, pool public key: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx farmer public key: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
2021-05-07T11:25:17.876 chia.plotting.create_plots : INFO Memo: xxxxxxxxxxxxxxxxxx
2021-05-07T11:25:17.876 chia.plotting.create_plots : INFO Starting plot 1/2
Starting plotting progress into temporary dirs: /home/user/chia_tmp and /home/user/chia_tmp
ID: xxxxxxxxxxxxxxxxxxxxxxxxxx
Plot size is: 32
Buffer size is: 4000MiB
Using 128 buckets
Using 2 threads of stripe size 65536
Starting phase 1/4: Forward Propagation into tmp files… Fri May 7 11:25:17 2021
Computing table 1
F1 complete, time: 303.163 seconds. CPU (131.95%) Fri May 7 11:30:21 2021
Computing table 2
Bucket 0 uniform sort. Ram: 3.847GiB, u_sort min: 0.563GiB, qs min: 0.281GiB.
Bucket 1 uniform sort. Ram: 3.847GiB, u_sort min: 1.125GiB, qs min: 0.281GiB.
Bucket 2 uniform sort. Ram: 3.847GiB, u_sort min: 0.563GiB, qs min: 0.281GiB.
Bucket 3 uniform sort. Ram: 3.847GiB, u_sort min: 0.563GiB, qs min: 0.281GiB.
Bucket 4 uniform sort. Ram: 3.847GiB, u_sort min: 1.125GiB, qs min: 0.281GiB.
Bucket 5 uniform sort. Ram: 3.847GiB, u_sort min: 0.563GiB, qs min: 0.281GiB.
Bucket 6 uniform sort. Ram: 3.847GiB, u_sort min: 1.125GiB, qs min: 0.281GiB.
Bucket 7 uniform sort. Ram: 3.847GiB, u_sort min: 0.563GiB, qs min: 0.281GiB.
Bucket 8 uniform sort. Ram: 3.847GiB, u_sort min: 0.563GiB, qs min: 0.281GiB.
Bucket 9 uniform sort. Ram: 3.847GiB, u_sort min: 0.563GiB, qs min: 0.281GiB.
Bucket 10 uniform sort. Ram: 3.847GiB, u_sort min: 0.563GiB, qs min: 0.281GiB.
…

Wait until it is finished this will take a long time, depending on your hardware. After this is done the plots are moved to the plots directory. The harvester should automatically harvest the plots then.
As my plots are still on creating I will continue here after they are ready, but you can also began like I did.

If you like that how-to, you can support me with an small amount of ETH or XCH, I would appreciate that! :+1:
ETH: 0x38dd254228a62ef4c49b08a06e56eabab14fd9ab
XCH: xch1etamhekyacpwhlnckmm9q20uehmlj4pgq259u5t62rdf3gdsl7tswcz90e
I’m still on the very early beginning of my mining career :wink:

Greetings Jack

8 Likes

In meanwhile my two plots were ready. Time per Plot ~10h with an SATA SSD.
You can now check your farm with:

chia farm summary

Farming status: Farming
Total chia farmed: 0.0
User transaction fees: 0.0
Block rewards: 0.0
Last height farmed: 0
Plot count: 2
Total size of plots: 202.744 GiB
Estimated network space: 2927.978 PiB
Expected time to win: 8 years and 8 months

So farmer is farming, in meanwhile you can create additional plots…
I have space for ~150 plots, lets see how the farming will work if they are full…

Hi I have installed Hive OS on my USB (128GB) , My Mining rig is already having an HDD, what are my options here?

The same, as long you have ~8GB RAM and your Harddisks are big and fast enough.
You just need one really fast SSD for plotting temp, minimum of 500GB and then slow drives for storing the plots, as big as you can…
You can also do it with usual drives, but then the plotting will took really long time…
Just specify the temp directory to your SSD and the plot directory to other Drive, if it’s full, change it to the next drive and so on… Every plot directory you specify will be added to the farmer config file automatically.

Hi,

How to configure to mine from different plot folders

I moved plots from another pc to rig’s hdd.

If you want to autostart your farmer, add this line to your /hive/etc/crontab.root

@reboot sleep 60; cd /usr/lib/chia-blockchain ; . ./activate ; chia start farmer

After a reboot my farmer runs, so this works for me.

4 Likes

I find solution;

type chia plots add -d and directory

like this: chia plots add -d /media/tarla/tarla_1_8TB/_tarla_1

1 Like

What you also may not forget is the TBW of your SSD. Usual SSD’s have an TBW of ~200-400TB, one k32 (101GB) plot consumes about 1,328TBW, so after ~150-300 Plots your SSD will be dead…
You can check your current TBW as described here: SSD Total Bytes Written (TBW) Calculator | virten.net

Dumb question potentially - Will it continue to create new plots over and over or will you have to manually run the command to create plots each time?

I tried running chia show -s but I got the message

Connection error. Check if full node rpc is running at 8555
This is normal if full node is still starting up

Any idea what this means? I’m not getting an output like the one you had with “Current Blockchain Status: Not Synced”

I tried this comment here and it worked.

1 Like

It depends on the “-n 2” option, in this case he stops after creating 2 plots, but if you have space for, let’s say 20 plots, then just specify “-n 20” and then it will create 20 plots and stop then. If something goes wrong, then only the last plot is gone, by the way…

Great tutorial bro! Just a few tips for those using mining pool like HPOOL:

  • There is no need to keep farmer running (and it’s forbidden too)
  • There is no need to run chia commands through venv (. ./activate)

/usr/lib/chia-blockchain/venv/bin/python /usr/lib/chia-blockchain/venv/bin/chia plots create -n 2 -k 32 -b 4000 -t /home/user/chia_tmp/ -d /mnt/sdb1/chia_plots/ will work just fine!

I will share my script for parallel plotting, that runs in background with full log generation. Remember to set the number of plots, memory size, number of threads and the properly sleep time (phase 1 time plus 30 minutes is enough).

#!/bin/bash
# =============================================
# Usage: /home/user/plots.sh > /dev/null 2>&1 &
# =============================================

/usr/lib/chia-blockchain/venv/bin/python /usr/lib/chia-blockchain/venv/bin/chia plots create -k 32 -n 10 -b 4096 -r 16 -t /home/user/chia_tmp/ -d /mnt/sdb1/chia_plots/ > /home/user/plot1.log 2>&1 &
sleep 120m
/usr/lib/chia-blockchain/venv/bin/python /usr/lib/chia-blockchain/venv/bin/chia plots create -k 32 -n 10 -b 4096 -r 16 -t /home/user/chia_tmp/ -d /mnt/sdb1/chia_plots/ > /home/user/plot2.log 2>&1 &

My current plotting setups:

  • HiveOS = Intel i3-7100, 8GB DDR4 and 500GB NVMe
  • Debian 10 = Intel Xeon D-2141I, 32GB DDR4 RAM and 500GB NVMe
  • Windows 10 = Intel i7 10750H, 16GB DDR4 RAM and 1TB NVMe
3 Likes

I looked at the HPOOL Site, but I did’t get how to mine there, can you explain that a little bit?
And do you already have some rewards? With how many plots?

Hi,

This command not found for me. Can u help me?

can u share the file crontab.root?

1 Like

that is my script I use -t and -2 to separate Temp folder files

root@rig1:~/chia-blockchain# cat /home/chia/chia8.sh

#!/bin/bash
screen -d -m -S chia1 bash -c ‘cd /home/user/chia-blockchain && . ./activate && sleep 0h && chia plots create -k 32 -b 5000 -e -r 8 -u 128 -n 200 -t /mnt/chia-temp1/temp1 -2 /mnt/chia-temp1 -d /mnt/10tb-1 |tee /home/user/chialogs/chia1_1_.log’
screen -d -m -S chia2 bash -c ‘cd /home/user/chia-blockchain && . ./activate && sleep 1h && chia plots create -k 32 -b 5000 -e -r 8 -u 128 -n 200 -t /mnt/chiatest/temp2 -2 /mnt/chiatest -d /mnt/10tb-1 |tee /home/user/chialogs/chia1_2_.log’
screen -d -m -S chia3 bash -c ‘cd /home/user/chia-blockchain && . ./activate && sleep 2h && chia plots create -k 32 -b 5000 -e -r 8 -u 128 -n 200 -t /mnt/chiatest/temp3 -2 /mnt/chiatest -d /mnt/10tb-1 |tee /home/user/chialogs/chia1_3_.log’
#screen -d -m -S chia4 bash -c ‘cd /home/user/chia-blockchain && . ./activate && sleep 3h && chia plots create -k 32 -b 5000 -e -r 8 -u 128 -n 200 -t /mnt/chiatest/temp4 -2 /mnt/chiatest -d /mnt/10tb-1 |tee /home/user/chialogs/chia1_4_.log’
#screen -d -m -S chia5 bash -c ‘cd /home/user/chia-blockchain && . ./activate && sleep 4h && chia plots create -k 32 -b 5000 -e -r 8 -u 128 -n 200 -t /mnt/chiatest/temp5 -2 /mnt/chiatest -d /mnt/10tb-1 |tee /home/user/chialogs/chia1_5_.log’
#screen -d -m -S chia6 bash -c ‘cd /home/user/chia-blockchain && . ./activate && sleep 5h && chia plots create -k 32 -b 5000 -e -r 8 -u 128 -n 200 -t /mnt/chiatest/temp6 -2 /mnt/chiatest -d /mnt/10tb-1 |tee /home/user/chialogs/chia1_6_.log’
#screen -d -m -S chia7 bash -c ‘cd /home/user/chia-blockchain && . ./activate && sleep 6h && chia plots create -k 32 -b 5000 -e -r 8 -u 128 -n 200 -t /mnt/chiatest/temp7 -2 /mnt/chiatest -d /mnt/10tb-1 |tee /home/user/chialogs/chia1_7_.log’
#screen -d -m -S chia8 bash -c ‘cd /home/user/chia-blockchain && . ./activate && sleep 7h && chia plots create -k 32 -b 5000 -e -r 8 -u 128 -n 200 -t /mnt/chiatest/temp8 -2 /mnt/chiatest -d /mnt/10tb-1 |tee /home/user/chialogs/chia1_8_.log’

Hi,

does it mean that gpu mining keeps running while plotting, is there any affection to one another?

How i can load my mnemonic words ? and there are any way to install the GUI ?

I’ve been having issues with crontab. Is /hive/etc/crontab.root the right file? Also crontab is overwritten on updates.

1 Like

You seem to have experience and i find this tutorial only 80% helpfull. My gpu mining rigs have really slow cpu ddr and hdd’s so im plotting somewere else and want my riggs to farm the plotted files. Im not sure how to format drives (plotting is done in windows) and mount them correctly to hiveos linux. Also i would be great to have this running on startup (and possibly even exsist after i update hiveos). I really would appreciate if you could give a brief explanation on how to do mounting and farming in hiveos without the plotting part.