Post
Topic
Board Mining (Altcoins)
Re: Official FutureBit Moonlander 2 Driver and Support Thread
by
pyroandy
on 26/04/2018, 12:04:25 UTC
...

Nice looking setup. Personally, I would only run 5 off that hub so you can run them full speed. If you only have on one hub then you could plug you Pi and extra fans into the hub too because they don't need that much power.  Have you tried to get bfgminer to run at startup? I am new to pi and Linux in general and have not been able to get it to work.

Nah I dont really need to been using pi's for years and they seldom crash, I use ssh and tmux to control it. that theres my trusty old pi2 with a broken hdmi out  Grin

I'm sure you know what ssh is tmux may be a mystery to you it allows you to run a program through ssh and it'll keep running even after you disconnect. its similair to screen but a bit more advanced/configurable

Yes, I tried screen but it was not getting me anywhere. Besides I just want it to autostart every time the pi boots up.

make sure screen is installed (sudo apt install screen)

create a file in your home directory with nano like this:

Code:
nano startup.sh

inside this file put something like this

Code:
cd /home/YOUR_PI_ACCOUNT_NAME/YOUR_BFGMINER_FOLDER_NAME
screen -dmS miner bash -c './start_moonlander.sh; exec bash'

then turn startup script to executible

Code:
sudo chmod +x startup.sh

and add this to crontab

Code:
sudo crontab -e

go down after all the ## and add this line

Code:
@reboot /home/YOUR_PI_ACCOUNT_NAME/startup.sh

then

Code:
sudo reboot

once rebooted just do

Code:
sudo screen -dr

and you should see bfgminer running. Press control then A then D at the same time to exit screen without terminating process.

That should do it  Wink

Thanks for your time putting these instructions together. I finally had a chance to try it last night and the miner starts every time I power up the pi. One last question, is there a way to automate the last step (sudo screen -dr) so the terminal with bfgminer comes up on the connected HDMI screen every time?