Bitcoin Forum
May 04, 2024, 05:39:57 AM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1] 2 3 4 5 »  All
  Print  
Author Topic: Raspberry Pi / cgminer for your BFL BitForce  (Read 20609 times)
crazydownloaded (OP)
Full Member
***
Offline Offline

Activity: 148
Merit: 100

Crazy!


View Profile
December 02, 2012, 04:47:22 PM
Last edit: December 23, 2012, 03:27:57 PM by crazydownloaded
 #1

Hi Everybody,

I feature a mining rig away from home, based on BFL products. To control them, I bought some Raspberry Pi (only one is needed to control them all, but buying 2 allow me to have spare parts available).
I created an image that I'm releasing today for this purpose.
I started with the official Raspberry Debian Wheezy image that I configured to fit my mining needs.
You can also create your own, I've logged everything I did on http://pastebin.com/2J8BDHRB

You can download the image here: http://rapidshare.com/files/3214579155/2012.12.22%20-%20debian%20wheezy%20configured%20-%20public.zip or here: http://dl.free.fr/hmpSyVjcg
Just write it to a SD Card the normal way (with win32diskimager-binary or so, as described on http://www.raspberrypi.org/downloads)
New in v2012.12.08: Added btc to "dialout" group to let him access ttyUSB devices, corrected default cgminer.conf, corrected "double launch at startup" because of the software watchdog
New in v2012.12.22: rpi-update runned to update to latest firmware, added support for icarus/modminer/ztex

! Password for root, pi and btc users is "berry" (and not "raspberry" !)
! The image is for a 4 GB card (or +), even if it would fit on a 2GB card, sorry about that -- I cannot find any 2GB card and I don't know how to shrink the image back... hopefully, you can configure your own system using the pastebin steps Smiley
! I've included my mining configuration (in /home/btc/cgminer.conf) for testing purposes (plug your devices to test the system, and change things if you like it), so don't forget to replace them with your own!
! I don't have my BFL devices to test the system (!!!), so feel free to tell me any bug so I can correct the image and the pastbin
! I'm using "testing" sources (in /etc/apt/sources.list), stable is always too conservative for me on Debian
! CGminer only enabled for bitforce, if you want to enable other devices you need to modify compilation option in the /root/Update.sh script then run it to upgrade cgminer

+ cgminer launched at startup
+ Logging with "btc" user will automatically show you the cgminer screen, press CTRL+A then D to go back to shell
+ root and pi features config files in their own directory as links to btc's config files, so it's easy to change them
+ Security upgrades are automatically installed (apticron)
+ cgminer miner is started on a "screen" so you can always see what's happening on cgminer my typing "screen -r btc/cgminer"
+ if cgminer exits, the screen is kept for 5 minutes so you can see what's wrong
+ Features an "Update.sh" script (in /root) that upgrades your cgminer to the latest version, run it regularly to keep your cgminer up to date; the script also runs "aptitude update" to update your packages list, so you can run "aptitude dist-upgrade" right after if needed
+ Features 3 watchdogs :
+++ Hardware watchdog, if system is totally freezed (I'm away from my mining rig, so I'm not here to "reboot" the system if it fails!)
+++ Software watchdog, that feeds the hardware watchdog and reboot the system if cpu usage too high (max-load-15 = 18)
+++ Software watchdog, that looks if cgminer is running and restart it if not (logs restarts to /tmp/) (check is every minute)


Remember:
- Launch raspi-config to change timezone (Europe/Paris by default), locale (en_US/UTF8 by default) or expanding the filesystem to fit your card
- Change password for root, pi and btc ("passwd", "passwd pi", "passwd btc")
- Put your mining pools informations into cgminer.conf (in /home/btc/, /home/pi/ or /root/, they are all the same file)
- Regularly run "Update.sh" and "aptitude dist-upgrade"


PS: Sorry for possible english mistakes - i'm not a native Cheesy

Est. February 2012
1714801197
Hero Member
*
Offline Offline

Posts: 1714801197

View Profile Personal Message (Offline)

Ignore
1714801197
Reply with quote  #2

1714801197
Report to moderator
Once a transaction has 6 confirmations, it is extremely unlikely that an attacker without at least 50% of the network's computation power would be able to reverse it.
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction.
1714801197
Hero Member
*
Offline Offline

Posts: 1714801197

View Profile Personal Message (Offline)

Ignore
1714801197
Reply with quote  #2

1714801197
Report to moderator
1714801197
Hero Member
*
Offline Offline

Posts: 1714801197

View Profile Personal Message (Offline)

Ignore
1714801197
Reply with quote  #2

1714801197
Report to moderator
1714801197
Hero Member
*
Offline Offline

Posts: 1714801197

View Profile Personal Message (Offline)

Ignore
1714801197
Reply with quote  #2

1714801197
Report to moderator
Elxiliath
Member
**
Offline Offline

Activity: 66
Merit: 10



View Profile
December 02, 2012, 06:37:05 PM
 #2

Nice, this would definitely save me having to use my laptop to run one of these miners, plus i've been meaning to get a raspberry pi and bfl single.

YinCoin YangCoin ☯☯First Ever POS/POW Alternator! Multipool! ☯ ☯ http://yinyangpool.com/ 
https://bitcointalk.org/index.php?topic=623937
Bwincoin - 100% Free POS. BL5cYJHSEvjPo19GQa3z7Z3cCEbBY9iCee
cypherdoc
Legendary
*
Offline Offline

Activity: 1764
Merit: 1002



View Profile
December 02, 2012, 06:42:13 PM
 #3

i would love a setup like this but my linux skills are almost non-existent.  i looked at your pastebin and almost barfed.
crazydownloaded (OP)
Full Member
***
Offline Offline

Activity: 148
Merit: 100

Crazy!


View Profile
December 02, 2012, 08:48:22 PM
 #4

cypherdoc > very easy, simply write the image to a sd card, plug your bfl/ethernet/power to your raspberry then ssh your device (maybe the most complicated part... download putty http://the.earth.li/~sgtatham/putty/latest/x86/putty.exe, type in the IP of the raspberry, login: root, password: berry), then type "nano cgminer.conf", change the parameters to match your mining pools (it's like a regular text editor without mouse), then ctrl+w), then type "reboot" and that's it Smiley

when you want to check how is cgminer doing, use putty, ip of the raspberry, login "btc" and password "berry" and cgminer magically appears.

the pastebin is here only for reference, if you don't trust my image or want to set up your own system, so you're not stuck with me.

If you don't have a raspberry:
http://www.farnell.com/pi/ or http://www.rs-components.com/raspberrypi
You'll also need few compatible full size SD cards (so you can test systems easily and have spare -- prefer class 10 cards, their speed is worth it!), a SD card reader, a power adapter and (optionnaly) a case.

Compatibles things can be found here: http://elinux.org/RPi_VerifiedPeripherals (scroll down to see hardware).

Est. February 2012
cypherdoc
Legendary
*
Offline Offline

Activity: 1764
Merit: 1002



View Profile
December 02, 2012, 09:07:35 PM
 #5

cypherdoc > very easy, simply write the image to a sd card, plug your bfl/ethernet/power to your raspberry then ssh your device (maybe the most complicated part... download putty http://the.earth.li/~sgtatham/putty/latest/x86/putty.exe, type in the IP of the raspberry, login: root, password: berry), then type "nano cgminer.conf", change the parameters to match your mining pools (it's like a regular text editor without mouse), then ctrl+w), then type "reboot" and that's it Smiley

when you want to check how is cgminer doing, use putty, ip of the raspberry, login "btc" and password "berry" and cgminer magically appears.

the pastebin is here only for reference, if you don't trust my image or want to set up your own system, so you're not stuck with me.

If you don't have a raspberry:
http://www.farnell.com/pi/ or http://www.rs-components.com/raspberrypi
You'll also need few compatible full size SD cards (so you can test systems easily and have spare -- prefer class 10 cards, their speed is worth it!), a SD card reader, a power adapter and (optionnaly) a case.

Compatibles things can be found here: http://elinux.org/RPi_VerifiedPeripherals (scroll down to see hardware).

could this be used to power asic's and if so how many max would u say?
crazydownloaded (OP)
Full Member
***
Offline Offline

Activity: 148
Merit: 100

Crazy!


View Profile
December 02, 2012, 09:42:30 PM
Last edit: December 02, 2012, 09:59:37 PM by crazydownloaded
 #6

With an appropriate usb hub (or maybe a few of them), as many as you like.
I guess you think to Jalapeno which is USB powered, right? Price per GH/s is very bad for those units...

I'll prefer Singles SC (which have a standalone power unit), that have more or less the same price per GH/s as the new Mining Rig SC but is way better in case something goes wrong (it's unlikely that all the SC units goes wrong, way less likely than an entire Mining Rig fails) + price is much more reasonable and you can grow your rig as you earn the BTC...

BitForce Jalapeno   4,50 GH/s   5 W     26,02 €/GH/s
BitForce Little Single SC   30,00 GH/s   30 W    17,00 €/GH/s
BitForce Single SC   60,00 GH/s   60 W    17,01 €/GH/s
BitForce Mini Rig SC   1 500,00 GH/s   1 500 W   15,66 €/GH/s

Est. February 2012
bcpokey
Hero Member
*****
Offline Offline

Activity: 602
Merit: 500



View Profile
December 03, 2012, 12:14:42 AM
 #7

Before I reply I want to say Thank You for writing this long guide and making an Image as well for users. I'm sure it will come in handy for many users now and in the future as they struggle to configure their low power, control devices. Good man.

The flip (complaining) side is how this always seems to happen to me. I recently picked up a Pi for fun and profits (yesterday really), and quickly realized I had forgotten everything about linux. So I set about the arduous task of re-learning linux commands, and how to update and expand the install to get all the programs and whatnot I want on it, and I started nice and early in the morning. And you go and release this in the afternoon, centralizing all the things I would have needed to pick up Tongue

End rant, thanks again Smiley
bitcoindaddy
Hero Member
*****
Offline Offline

Activity: 481
Merit: 500


View Profile
December 03, 2012, 01:07:25 AM
 #8

Thanks crazydownloaded.  Even though I consider myself a linux expert, I always learn new things when I look at other people's stuff.
Morblias
Hero Member
*****
Offline Offline

Activity: 576
Merit: 500


View Profile
December 03, 2012, 02:18:04 PM
 #9

Thank you for this! Been meaning to set my RPi up and get everything configured before ASICs ship.

Tips / Donations accepted: 1Morb18DsDHNEv6TeQXBdba872ZSpiK9fY
heavyb
Full Member
***
Offline Offline

Activity: 217
Merit: 100



View Profile WWW
December 03, 2012, 05:10:57 PM
 #10

Thank you for this!

crazydownloaded (OP)
Full Member
***
Offline Offline

Activity: 148
Merit: 100

Crazy!


View Profile
December 03, 2012, 08:05:12 PM
 #11

Did anyone had the occasion to test the image?
Is everything working fine for you?

Thanks Smiley

Est. February 2012
Fcx35x10
Full Member
***
Offline Offline

Activity: 210
Merit: 100


View Profile
December 04, 2012, 12:43:41 AM
 #12

I need to go out and buy another SD card before I can give this a try Smiley Thanks for sharing, saves us rpi users some time. I should have this tested by the end of the week
mentalove
Newbie
*
Offline Offline

Activity: 27
Merit: 0


View Profile
December 04, 2012, 12:56:16 AM
 #13

wow thank you so much. i will be referring back to this page when my pi finally comes. which better be soon or i'll be sad Smiley
fpf
Newbie
*
Offline Offline

Activity: 20
Merit: 0


View Profile
December 08, 2012, 02:47:39 PM
 #14

Feedback for this image:

- The User BTC didn't/doesn't have the needed privileges required to open /dev/ttyUSBx
(had to manually add him to the dialout group)

- Something is/was wrong with the cgminer.conf file, had to create a new one.

If I log on with the User BTC (within the first 5 minutes after bootup) I will not end up at the cgminer screen.
Reason: There will be 2 active screen threads - the first start of cgminer fails but the "sleep 300" in the bash file will keep the screen another 5 minutes...

I still have some random restarts or hangs - reason unknown.

FPF
crazydownloaded (OP)
Full Member
***
Offline Offline

Activity: 148
Merit: 100

Crazy!


View Profile
December 08, 2012, 03:17:52 PM
 #15

Thanks fpf for your feedback, I'll try to make the changes asap.

Est. February 2012
crazydownloaded (OP)
Full Member
***
Offline Offline

Activity: 148
Merit: 100

Crazy!


View Profile
December 08, 2012, 04:34:38 PM
 #16

I just made the changes Smiley
The image is very stable for me, do you have temperature issues?
Does the watchdogs does their jobs? (ie you don't have to do anything, it reboot by itself when blocked?)

Thanks.

Est. February 2012
fpf
Newbie
*
Offline Offline

Activity: 20
Merit: 0


View Profile
December 08, 2012, 09:51:22 PM
 #17

Def. no temperature issues.

Right now - I don't display the cgminer screen anymore over ssh / the main display and it has been stable for 8 hours. Will do some more tests and let you and the other guys know.

About the watchdog, cgminer does auto restart in case you quit it - so that one works.
About the other ones - I have yet to try them somehow.

In the beginning the raspberry just randomly rebooted from time to time. However yesterday I also had it freezing twice... (without the watchdog kicking in) As mentioned earlier I assume that's because I had the cgminer screen running on the host display / ssh all of the time.

fpf
serp
Sr. Member
****
Offline Offline

Activity: 245
Merit: 250


@serp


View Profile WWW
December 10, 2012, 05:16:44 PM
 #18

fpf, are you using putty and if so is it possible that putty was closed/exited through some other method than normal or that there was a temporary disconnect in your network?  Maybe on a laptop where you closed the lid or something?

The reason I ask is that I have a user having a similar issue with screen while using putty.  He gets exits/freezes when putty is not closed manually.  This seems to only happen while using putty on windows.  No other user has this problem. 

bcpokey
Hero Member
*****
Offline Offline

Activity: 602
Merit: 500



View Profile
December 10, 2012, 11:15:29 PM
 #19

Def. no temperature issues.

Right now - I don't display the cgminer screen anymore over ssh / the main display and it has been stable for 8 hours. Will do some more tests and let you and the other guys know.

About the watchdog, cgminer does auto restart in case you quit it - so that one works.
About the other ones - I have yet to try them somehow.

In the beginning the raspberry just randomly rebooted from time to time. However yesterday I also had it freezing twice... (without the watchdog kicking in) As mentioned earlier I assume that's because I had the cgminer screen running on the host display / ssh all of the time.

fpf

I had an issue similar to that, without running cgminer, so I'd be interested if you figured something out about it. I would come back and Pi would have rebooted for no reason that I could. Lately it has begun freezing completely. I'm hoping it is a software issue and not a hardware issue.
fpf
Newbie
*
Offline Offline

Activity: 20
Merit: 0


View Profile
December 11, 2012, 02:59:02 AM
 #20

Bcpokey,

Actually... I am having the exactly same issues, it did restart before - lately it just freezes - it's just plain dead.

FPF

@serp
I use putty sometimes for SSH access, however - I am not talking about loosing the ssh connection, I have a physical screen connected and without any SSH connection to it it just randomly reboots or hangs...
Pages: [1] 2 3 4 5 »  All
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!