Part 5A: Linux
5A.01 Pi
5A.1 Linux Scrypt Mode
5A.2 Linux SHA Mode
5A.3 Linux Dual Mode
Linux Credit: meinhard
https://bitcointalk.org/index.php?topic=454127.0 (Modified)
Part 5B: Windows
Windows Credit: maardein
https://bitcointalk.org/index.php?topic=487419.msg5424040#msg5424040 (Quoted)
Part 5A.01: PiRaspberry Pi
I'll be hooking this up to power the Pi 3/12/2014
http://amzn.com/B00CBCGAL8 and testing out cgminer and cpuminer as well as casing and rack mounting the hosted set of devices I have.
http://www.raspberrypi.org/wp-content/uploads/2012/04/quick-start-guide-v2_1.pdfhttp://elinux.org/RPi_Easy_SD_Card_SetupAcquire an Rpi:
http://www.amazon.com/s/ref=nb_sb_ss_i_0_10?url=search-alias%3Daps&field-keywords=raspberry%20piDowload Raspbian from:
http://www.raspberrypi.org/downloadshttp://downloads.raspberrypi.org/raspbian_latestExtract the image file
![](https://ip.bitcointalk.org/?u=https%3A%2F%2Fi.imgur.com%2FGj2BA22.png&t=665&c=wWMSqO07M_5WOQ)
Download SD Formatter from:
https://www.sdcard.org/downloads/formatter_4/eula_windows/Extract and install sd formatter downloaded above.
![](https://ip.bitcointalk.org/?u=https%3A%2F%2Fi.imgur.com%2FOr09x0k.png&t=665&c=-zclGELyMCULGQ)
Change the "Options" to Full and Adjust size
![](https://ip.bitcointalk.org/?u=https%3A%2F%2Fi.imgur.com%2FPR6UDNV.png&t=665&c=mHKbCtt6axmmjQ)
Confirm
![](https://ip.bitcointalk.org/?u=https%3A%2F%2Fi.imgur.com%2FKcMrq7o.jpg&t=665&c=CpsvIKUH6QcxwQ)
If everything completed move on:
![](https://ip.bitcointalk.org/?u=https%3A%2F%2Fi.imgur.com%2F2UmpE8W.png&t=665&c=1WJ992vuvFHPCw)
Download win32diskimager:
http://sourceforge.net/projects/win32diskimager/http://downloads.sourceforge.net/project/win32diskimager/Archive/win32diskimager-v0.9-binary.zip?r=http%3A%2F%2Fsourceforge.net%2Fprojects%2Fwin32diskimager%2F&ts=1394574641&use_mirror=hivelocityExtract the program and run it
![](https://ip.bitcointalk.org/?u=https%3A%2F%2Fi.imgur.com%2Fbo6Jkb0.jpg&t=665&c=fkUIKJlUcQOB7A)
I configured a few things on first boot:
Expand the image to fill the card
Change password
Change startup method (Text only)
Enable the root account
sudo passwd root
***
***
exit
ssh back in as root and change the associated paths and groups
usermod -l miner pi
usermod -m -d /home/miner miner
groupmod -n miner pi
exit
ssh back in as miner and install the pre-requisites
sudo -s
apt-get update
apt-get install -y build-essential libtool libcurl4-openssl-dev libncurses5-dev libudev-dev autoconf automake screen
exit
Build cgminer:
git clone https://github.com/gridseed/usb-miner/
cd usb-miner/software/cgminer
autoreconf -i
./configure --enable-gridseed
make
Build cpu miner:
cd
cd usb-miner/software/cpuminer
./autogen.sh
./configure
make
Link the build directories for convenience:
ln -s ~/usb-miner/software/cpuminer ~/cpuminer
ln -s ~/usb-miner/software/cgminer ~/cgminer
? Profit ?
Part 5A.1: LinuxCredit:
https://bitcointalk.org/index.php?topic=421921.msg5455483#msg5455483Credit:
https://github.com/gridseed/usb-miner/blob/master/software/doc/INSTALL_EN.pdfInstall Pre-Requisites:
sudo -s
apt-get update
apt-get install build-essential libtool libcurl4-openssl-dev libncurses5-dev libudev-dev autoconf automake screen
Grab possibly needed packages:
cd
wget http://curl.haxx.se/download/curl-7.34.0.tar.bz2
wget http://www.digip.org/jansson/releases/jansson-2.5.tar.bz2
Install curl and jansso packages:
tar -xvf curl-7.34.0.tar.bz2
cd curl-7.34.0/
./configure
make
make install
cd
tar -xvf jansson-2.5.tar.bz2
cd jansson-2.5/
./configure
make
make install
cd
Build cpuminer from git:
cd
git clone https://github.com/gridseed/usb-miner
cd ~/usb-miner/software/cpuminer
autoreconf -i
CFLAGS="-O2 -Wall -march=native" ./configure
make
cd
*** For ubuntu 13.10 *** Install the correct automake version so cgminer builds
wget http://ftp.osuosl.org/pub/ubuntu/pool/main/a/automake1.11/automake1.11_1.11.6-2_all.deb
sudo dpkg -i automake1.11_1.11.6-2_all.deb
Link the Jansson Libraries to fix:
./minerd: error while loading shared libraries: libjansson.so.4: cannot open shared object file: No such file or directory
sudo ln -s /usr/local/lib/libjansson.* /usr/lib/
*** END *** Build cgminer:
cd ~/usb-miner/software/cgminer
./autogen.sh
CFLAGS="-O2 -Wall -march=native" ./configure --enable-gridseed
make
cd
Link the build directories for convenience:
ln -s ~/usb-miner/software/cpuminer ~/cpuminer
ln -s ~/usb-miner/software/cgminer ~/cgminer
![](https://ip.bitcointalk.org/?u=https%3A%2F%2Fi.imgur.com%2FVPGDBfA.jpg&t=665&c=6THs1cIS2pmkXw)
If all went well you will have the miner installed.
Now DO NOT PLUGIN the USB yet just the power cable:
![](https://ip.bitcointalk.org/?u=https%3A%2F%2Fi.imgur.com%2F5XsQVVB.jpg&t=665&c=NJRIm_QcgWmPdA)
Plug in the USB cable to the computer and device:
![](https://ip.bitcointalk.org/?u=https%3A%2F%2Fi.imgur.com%2FhqQDAh2.jpg&t=665&c=LWXOB6iGG-dzQA)
Syslog results
![](https://ip.bitcointalk.org/?u=https%3A%2F%2Fi.imgur.com%2FsCF73uQ.jpg&t=665&c=3ILfeW1Op90-Kw)
*You might have /dev/ttyUSBX not ttyACMX
If you don't want to run all of the miners as sudo/rootsudo usermod -G plugdev -a <username>
Where <username> is your username: sudo usermod -G plugdev -a miner
Now run the miner process:
sudo ./minerd --freq=600 --gc3355=/dev/ttyACM0 --url=stratum+tcp://middlecoin.com:3333 --userpass=13zKJjzxGpjbqJDAWAhFNHVqALqcsCWiat:x
Or using CGMiner Syntax
sudo ./minerd -F 600 -G /dev/ttyACM0 -o stratum+tcp://middlecoin.com:3333 -u 13zKJjzxGpjbqJDAWAhFNHVqALqcsCWiat -p x
It appears you can't combine devices to one line like this: (worldlybedouin,Powell)
sudo ./minerd -F 600 -G /dev/ttyACM0 -G /dev/ttyACM1 -G /dev/tACM2 -G /dev/ttyACM3 -G /dev/ttyACM4 -G /dev/ttyACM5 -G /dev/ttyACM6 -G /dev/ttyACM7 -G /dev/ttyACM8 -G /dev/ttyACM9 -o stratum+tcp://middlecoin.com:3333 -u 13zKJjzxGpjbqJDAWAhFNHVqALqcsCWiat -p x
I use dynamic pool files but something like this will work:
sudo -s
cd ~/usb-miner/software/cpuminer
for i in `seq 0 10`; do screen -dmS $i ./minerd -G /dev/ttyACM$i -F 800 -o stratum+tcp://stratum.scryptguild.com:3333 -u unicornhasher -px;done
SCREEN USAGEIn order to keep the miners running when you log off ssh you will need to use screen:
to list screens if you did not add your user to the plugdev group you may need to use
to join a screen
Press <ctrl> A <ctrl> D (or <ctrl> AD) to exit the screen session. You can then exit the ssh session and the miners will continue to run.
YAY means YAY
![](https://ip.bitcointalk.org/?u=https%3A%2F%2Fi.imgur.com%2FQdSxoJq.png&t=665&c=HUBwikmTADxlYA)
How I run the 10 miners to 10 separate pools:
***WARNING: This assumes you use username miner and home path /home/miner ****
This also assumes that you have added your user to plugdev or are using root with (sudo -s)
1) Create 10 pool files named pool0.sh to pool9.sh
2) insert the FREQ NAME and POOL variables into each pool file
pool9.sh
NAME="miaviator"
POOL="-o stratum+tcp://middlecoin.com:3333 -u 13zKJjzxGpjbqJDAWAhFNHVqALqcsCWiat -p x"
FREQ="800"
3) make the mine.sh script to execute the miners
cat > mine.sh << EOF
count=0
for i in `ls /dev/ttyACM*`
do
source /home/miner/pool$count.sh
cd /home/miner/cpuminer/
screen -dmS $NAME ./minerd -F $FREQ -G $i $POOL
count=$((count+1))
done
EOF
chmod +x mine.sh
After running mine.sh for this hosting thread
https://bitcointalk.org/index.php?topic=471764.0 I have the following screens:
Part 5A.2: BTC ModeModified from PDF and this post:
https://bitcointalk.org/index.php?topic=494625.msg5465107#msg5465107To mine to my donation address for this guide:
./cgminer --gridseed-options=baud=115200,freq=800,chips=5,modules=1,usefifo=0,btc=16 --hotplug=0 -o stratum+tcp://stratum.mining.eligius.st:3334 -u 13zKJjzxGpjbqJDAWAhFNHVqALqcsCWiat -p x
Breakdown: NEEDS HELP
Execute the Miner:
Enable Gridseed configuration flags
The Serial/USB com speed (Don't Change)
The chip frequency in 50 Unit steps from 600 to 900:
The number of chips on the device (Don't change for these devices)
*Change if you get a 10 or 25 Mh/s GridSeed box
*you bastard
* I want one
The number of boards/modules/devices per com port (IE 1, don't change this)
Communications method used to talk to the device board (Don't change)
*Correct me if I'm wrong
A seemingly arbitrary number until someone tells me what its for
![Smiley](https://bitcointalk.org/Smileys/default/smiley.gif)
*The doc says 11 I'm sure there is a range
I'd guess this allows devices, modules or chips to be added/removed while the miner is running?
*IDK and IDC
Standard pool config
-o POOL:PORT -u USER -p PASS
Mining:
![](https://ip.bitcointalk.org/?u=https%3A%2F%2Fi.imgur.com%2Fs30dnAk.png&t=665&c=V5TzWb6ntExDmg)
Mining per device vs all devices:
![](https://ip.bitcointalk.org/?u=https%3A%2F%2Fi.imgur.com%2FX2SflOJ.png&t=665&c=aSpIt02bf5XkKg)
Quick and dirty Bus:Device:
lsusb |grep STMicroelectronics|cut -d " " -f 2,4|sed 's/://g'|sed 's/ /:/g'
![](https://ip.bitcointalk.org/?u=http%3A%2F%2Fpuu.sh%2F7glPe.png&t=665&c=fvYjZRFrft7iMA)
Run one or more devices using cgminers --usb flag
https://github.com/ckolivas/cgminer./cgminer --gridseed-options=baud=115200,freq=800,chips=5,modules=1,usefifo=0,btc=16 --hotplug=0 -o stratum+tcp://stratum.mining.eligius.st:3334 -u 13zKJjzxGpjbqJDAWAhFNHVqALqcsCWiat -p x --usb 001:009
![](https://ip.bitcointalk.org/?u=https%3A%2F%2Fi.imgur.com%2FrOH8Ho6.png&t=665&c=3G7PbmVXaElYFQ)
or
etc.
Part 5A.3: BTC/Dual ModeOnce you turn on BTC mining you have to attache to the LTC proxy in order to mine in scrypt mode / dual mode. Or unplug the devices and replug them so they show up as ttyACM# again?
Once you are running one or more devices in SHA mode you can start Scrypt mining in dual mode with:
./minerd -F 800 -o stratum+tcp://middlecoin.com:3333 -u 13zKJjzxGpjbqJDAWAhFNHVqALqcsCWiat -p x --dual
![](https://ip.bitcointalk.org/?u=http%3A%2F%2Fpuu.sh%2F7gnwU.png&t=665&c=PhARUJfqKjU7PA)
Can I run to 10 pools this way? Let's find out.
MORE TO COME with power readings and speed/clock readings.
Part 5B: Windows *Credit:
http://cryptomining-blog.com/1461-updated-cgminer-3-7-2-for-windows-scrypt-mining-on-gridseed-5-chip-gc3355-asics/Get a copy of the pre-built cgminer for windows:
http://cryptomining-blog.com/wp-content/files/cgminer-3-7-2-gridseed-windows.zipExtract it
Open Device management: Press Window Key + R to open the run dialog or navigate through the control panel
![](https://ip.bitcointalk.org/?u=https%3A%2F%2Fi.imgur.com%2FL3O2vqP.png&t=665&c=Se951HOdGOouvA)
Plug power into the gridseed(s)
Plug USB to the gridseed(s) and to a powered USB hub.
Open the extracted Cgminer folder:
Edit LTC_ONLY.bat to contain your pools and frequency
![](https://ip.bitcointalk.org/?u=https%3A%2F%2Fi.imgur.com%2F5kkbPKN.png&t=665&c=RIiizHx8If5pSA)
Save the file
Double click to run.
*There has to be something I missed?
![Huh](https://bitcointalk.org/Smileys/default/huh.gif)
![](https://ip.bitcointalk.org/?u=https%3A%2F%2Fi.imgur.com%2FfF29gws.png&t=665&c=xJCbX2Gi6b7DOg)
Original Windows instruction set:
https://bitcointalk.org/index.php?topic=494625.msg5791916#msg5791916