If you have an extra computer around and would like to mine LBRY (LBC) but don't want to go through the effort of installing a virtual machine or creating a dual boot... This might be for you.
Here is an example situation: you have a extra computer but you don't want to mess with disks, formatting, dual booting and stuff like that. So what do you do? You create a live USB Ubuntu stick that you plug in the back and let it run for as long as you need it to. The only thing that you need from that computer is it's CPU power. If the computer needs to go back into it's original state, transfer the mined funds to a wallet that is more permanent and you are done. Unplug the USB and the computer will look like it has never been touched.
Now hit the little disk button and select your Ubuntu Image like below.
Now hit start and you will be seeing the next pop up.
In this case we are fine with the recommended setting. Now next we make the biggest life decision ever! Are you dedicated to wipe you entire usb schtick? Make sure you have made a backup before wiping this! You will lose all your data currently on it!
When it's finally done booting into your USB you should have screen in front of you like below. Long and behold the Ubuntu Installer!
Wait what? Install Ubuntu, that's not what we came for?! Noooo! We want to hit Try Ubuntu!
Woohoo! We are now running live Ubuntu desktop! Just remember, this is not installed on your local hard disk... It's running live from your USB stick! That means everything you do here will be erased once you shutdown. So don't make the mistake of rebooting! Phew, now that we've got our Ubuntu live running let's get to mining! This step is suprisingly quick! First of all, make sure you know how many processors you want to commit to the job. In Ubuntu we can easily see with System Monitor how many processors we have!
Oef! I guess I'm lucky.... But now get your sweet buns over to https://lbry.io/faq/mining-credits. But for reading pleasure I'll copy what they say over there in here.
Open your terminal either via the menu or via ctrl+alt+t and type the following commands:
wget https://s3.amazonaws.com/files.lbry.io/bins.zip
unzip bins.zip
./lbrycrdd -server -printtoconsole -gen -genproclimit=<number of proccessors you want to use>
./lbrycrdd -server -printtoconsole -gen -genproclimit=16rm -rf bins.zip lbry* ~/.lbry*. Note: this will delete your wallet and any credits you may have.
If you want to double check if you are indeed mining. Open up a new terminal and hit this command: ./lbrycrd-cli getgenerate. This should return true if you are indeed mining. Also your processor usage should be going through the roof!
But wait, you have been mining for over 4 hours now and you have no idea if you have cashed in any LBC yet?! Before you lose your cool, lets see how it looks when we have solved a block!
Shazam! We have found a block! But how do we check if we got it in our wallet already? We can use ./lbrycrd-cli getwalletinfo for that. Below you can see that we have 29 LBC in immature balance. This means that the reward is there, but still needs 100 confirmations to mature. Usually this will take 4 hours to actually transfer to your normal balance. Once it is in your balance, you can do with it what you want!
So now lets say you have those 29 coins confirmed and it doesn't list under immature_balance but under balance. How do we get the coins from the live Ubuntu to a more reliable place to store the coins? You can use:
./lbrycrd-cli sendtoaddress <ADDRESS> <AMOUNT> "<COMMENT>"
In example:
./lbrycrd-cli sendtoaddress bbAMzSkboLfWnqqrT6BoxVufbJcMjkzENr 20 "From Mining"
On your coin storage computer use ./lbrycrd-cli getnewaddress. This will create a new address on your storage computer. Use this address in the sendtoaddress command. Congratulations! You just transfered your mined coins to a more secure place!
gsettings set org.gnome.desktop.lockdown disable-lock-screen 'false'
next we will use command passwd to set a password for the current user. It will prompt for the current password, that is empty. So you can hit enter and continue filling in your new password. After this is done you can lock your screen! (windows button+ l). Just log back in and you see your miner at work!
#!/bin/bash
###Save this file as cashout.sh in the same dir as lbrycrd-cli and make it executable with 'chmod u+x cashout.sh'###
# Change YOURLBCADDRESSGOESHERE to your receiving LBC address
#get the balance of the wallet (won't include immature coins)
BAL="$(./lbrycrd-cli getbalance)"
#subtract .0002 to save some for tx fees
SENDBAL=$(bc <<< "${BAL}-0.0002")
#send the calculated amount to your address
./lbrycrd-cli sendtoaddress YOURLBRYADDRESSGOESHERE $SENDBAL
So after you have saved this file to cashout.sh we want to make this execute every 4 hours, we need to make a cron entry! So in the terminal do sudo nano /etc/crontab and add the following line to the end of the file:
* 4 * * * ubuntu /home/ubuntu/cashout.sh
Now restart the service with service cron restart. It should now send cash to the address in the cashout.sh file every 4 hours (if of course you have successfully mined coins). If this for some reason does not execute every 4 hours you can execute the file yourself by typing ./cashout.sh in the terminal.
Also if you are reading this in the future make sure to edit the cashout.sh file to accumulate for enough fees. Currently it subtracts .0002 for fees, but this could get higher in the future, so make sure you accomodate the appropriate fees!
THAT IS IT! Holy smokes we've covered a lot. But now we can finally mine, lay back and enjoy the sun. Happy mining!
Join the LBRY slack at LBRY.slack.com.
If you liked this article and would like to sign up for LBRY, you can use my referral and help me out a bit. http://lbry.io/get/?r=vRrE3
My LBRY donation address: bbAMzSkboLfWnqqrT6BoxVufbJcMjkzENr