Bitcoin Forum
May 03, 2024, 10:59:11 AM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: Project: CGMiner 3.4.0 with USB Block Erupters on a 5W pogoplug mobile  (Read 1663 times)
bitwit (OP)
Newbie
*
Offline Offline

Activity: 16
Merit: 0


View Profile
August 30, 2013, 09:35:09 PM
 #1

Intro
I don't know if anyone needs this, but I'm a supernoob and it took me a while to piece this together. I did not come up with any of this. I used archlinuxarm.org, archlinux.org, cgminer's readme, and some other stuff. If you deserve credit and I forgot, sorry - feel free to take it :-)

Apologies if this is useless - I'm only posting because I needed a guide this simple. It's probable that no one else does. This is my first post - take it easy on me Undecided

Constructive criticism is always welcome.

WARNING: following these directions will void warranties, destroy cities, and ultimately cause an early apocalypse.

Synopsis
I wanted a standalone, low-wattage miner that could scale and was fun to experiment with. I wanted it to restart mining when interrupted. I didn't want to buy a raspberry pi because I figured I'd destroy a few pieces of technology accidentally so I opted for things I could mostly get locally. I decided on a pogoplug mobile (as of 8/30, available via ebay at $15 each free shipping) and a powered usb hub.

Background
  • I am new to most concepts here, including linux, bitcoin, and cryptography
  • I don't fully understand how bitcoin works, but I understand enough to appreciate and enjoy it
  • I've used ubuntu in the past, and I understand (VERY) basic bash commands

My (Humble) Setup
  • USB Block Erupters
  • USB 2.0 Powered Hub from Office Depot (~$27 US with tax - find a better hub!)
  • 1 PogoPlug Mobile from Radio Shack (On sale $21.39 US with tax)
  • 8 GB USB thumb drive (On sale $5.32 US with tax at WalWart)

What I Did
Step 1 - Arch Linux

  • Register device via pogoplug.com/activatep
  • Enable SSH: my.pogoplug.com -> security tab -> checkbox
  • Plug in new USB Drive for arch installation (no usb hub)
  • Power On
  • Check Router DCHP Clients Table for IP Address of "Pogoplug Mobile"
  • SSH into pogoplug (I used putty for Winblows 8 )
  • Stop pogoplug software

Code:
killall hbwd

  • Start fdisk to partition usb2 or sata drive:

Code:
/sbin/fdisk /dev/sda

  • Type o (clear partition table)
  • Type p (list partition table - confirm there are none)
  • Type n (new partition)
  • Type p (primary)
  • Type 1 (first partition)
  • Press enter, accepting default value
  • Press enter again, accepting default value
  • Type w (exit, writing changes)
  • Create ext3 filesystem

Code:
cd /tmp
wget http://archlinuxarm.org/os/pogoplug/mke2fs
chmod +x mke2fs
./mke2fs -j /dev/sda1
mkdir alarm
mount /dev/sda1 alarm

  • Download and install Arch Linux ARM:

Code:
cd alarm
wget http://archlinuxarm.org/os/ArchLinuxARM-armv5te-latest.tar.gz
tar -xzvf ArchLinuxARM-armv5te-latest.tar.gz  # This will take a long time
rm ArchLinuxARM-armv5te-latest.tar.gz
sync  # Takes a while if you are using a flash drive

  • Unmount Drive:
Code:
cd ..
umount alarm

  • Install U-boot bootloader and reboot

Code:
cd /tmp
wget http://archlinuxarm.org/os/ppv4/ppv4-install.sh
chmod +x ppv4-install.sh
./ppv4-install.sh
/sbin/reboot


Step 2 - Install wget, screen, and base-devel

  • Wait for pogoplug to restart, then ssh in (check router again - it's now called "alarm", not "pogoplug mobile") with user/pass root
  • Install the following packages with pacman (it will ask you y or n questions)

Code:
pacman -S wget
pacman -Syu base-devel
pacman -S screen

Step 3 - libusb/cgminer

Code:
cd /home
mkdir miner
cd miner
mkdir cgminer
cd cgminer
wget http://ck.kolivas.org/apps/cgminer/cgminer-3.4.0.tar.bz2
tar xvjf cgminer-3.4.0.tar.bz2
cd cgminer-3.4.0
mkdir libusb
cd libusb
wget http://sourceforge.net/projects/libusb/files/libusb-1.0/libusb-1.0.16-rc10/libusb-1.0.16-rc10.tar.bz2
tar xvjf libusb-1.0.16-rc10.tar.bz2
cd libusb-1.0.16-rc10
./configure
make
cd ../..

  • Build cgminer

Code:
CFLAGS="-O2 -Wall -march=native" LIBUSB_CFLAGS="-I./libusb/libusb-1.0.16-rc10/libusb" LIBUSB_LIBS="./libusb/libusb-1.0.16-rc10/libusb/.libs/libusb-1.0.a -ludev" ./configure --enable-icarus
make install

  • turn off pogoplug, Plug in usb hub, plug in usb drive
  • start cgminer - replace with your options

Code:
cgminer -o URL:PORT -u USER -p PASS --lowmem # ONE POOL

OR

Code:
cgminer -o URL1:PORT1 -u USER1 -p PASS1 -o URL2:PORT2 -u USER2 -p PASS2 --lowmem # TWO OR MORE POOLS


  • Plug in Block Erupters (They should appear and start hashing - ensure they're working)
  • Press s for settings
  • Press w for write
  • For file name, type /home/miner/cgminer.conf
  • Press q to quit

Step 4 - Create startup scripts and enable them

  • Switch to the miner directory and start a new file:

Code:
cd /home/miner
nano auto.sh

  • Type the following into nano, then press CTRL+o (to write the file Out) then CTRL+x (to eXit nano):

Code:
#!/bin/sh
screen -dmS miner /home/miner/cgminer/cgminer-3.4.0/cgminer --config /home/miner/cgminer.conf

  • Create service file

Code:
cd /usr/lib/systemd/system
nano cgminer.service

  • Enter the following, then CTRL+o, then CTRL+x:
Code:
[Unit]
Description=Start cgminer

[Service]
User=root
Type=oneshot
ExecStart=/bin/sh /home/miner/auto.sh

[Install]
WantedBy=multi-user.target
Enable the service:

  • Then enable the service:
Code:
systemctl enable cgminer.service

  • Finally, change your root password:

Code:
passwd


Results
When you turn the pogoplug on, it will automatically start mining. To see what's up with cgminer, ssh in and type screen -r to reattach the screen session. When you're done, Press CTRL+A then CTRL+D to detach.

Hope this helps at least one person.
1714733951
Hero Member
*
Offline Offline

Posts: 1714733951

View Profile Personal Message (Offline)

Ignore
1714733951
Reply with quote  #2

1714733951
Report to moderator
1714733951
Hero Member
*
Offline Offline

Posts: 1714733951

View Profile Personal Message (Offline)

Ignore
1714733951
Reply with quote  #2

1714733951
Report to moderator
If you see garbage posts (off-topic, trolling, spam, no point, etc.), use the "report to moderator" links. All reports are investigated, though you will rarely be contacted about your reports.
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction.
wa4hsh
Newbie
*
Offline Offline

Activity: 21
Merit: 0


View Profile
September 07, 2013, 05:08:40 PM
 #2

Thanks for this. I tried it and it works great. Got the pogoplug off ebay  and using it with a  ROSEWILL RHB-500 R that I got from Newegg. Sitting here on my desk with two USB block erupters hashing away. I know they will never pay for themselves, but it is great fun.
OldGeek
Sr. Member
****
Offline Offline

Activity: 266
Merit: 250

Blitz:The price affects the perception of the news


View Profile
September 07, 2013, 06:59:09 PM
 #3

Outstanding, bitwit.  This post pegged out my geek meter.

From what I can see, the overall dim of this outfit will be about the same as a Raspberry Pi at a somewhat smaller cost.

I wonder if any of the older models with the wireless adapter are still around.  Would be great to set this up under la esposa's dresser and let it rip.   Grin

Thanks for the post.

/Frank

Be Safe   Be Free   Be Informed    Be Alert
Support safety, freedom, information, and awareness.  All four accept donations of Bitcoin.
Pages: [1]
  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!