IntroI 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
Constructive criticism is always welcome.
WARNING: following these directions will void warranties, destroy cities, and ultimately cause an early apocalypse.
SynopsisI 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 DidStep 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
- Start fdisk to partition usb2 or sata drive:
- 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
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:
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
- Install U-boot bootloader and reboot
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)
pacman -S wget
pacman -Syu base-devel
pacman -S screen
Step 3 - libusb/cgminercd /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 ../..
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
cgminer -o URL:PORT -u USER -p PASS --lowmem # ONE POOL
OR
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:
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):
#!/bin/sh
screen -dmS miner /home/miner/cgminer/cgminer-3.4.0/cgminer --config /home/miner/cgminer.conf
cd /usr/lib/systemd/system
nano cgminer.service
- Enter the following, then CTRL+o, then CTRL+x:
[Unit]
Description=Start cgminer
[Service]
User=root
Type=oneshot
ExecStart=/bin/sh /home/miner/auto.sh
[Install]
WantedBy=multi-user.target
Enable the service:
systemctl enable cgminer.service
- Finally, change your root password:
ResultsWhen 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.