Tuesday, 25 February 2014

Litecoin CPU mining on baremetal hardware in 5 minutes

In case that you have some old or new hardware lies around and in case that you are to lazy to install OS and prepare it for CPU mininig using  pooler-cpuminer-2.3.2 here is instant tutorial how to start mining in less that 5 minutes.

I used systemrescuecd-x86-3.7.0. This is live linux distro with LOOTSSSS of useful tools for rescue damaged Linux OS and generally for testing hardware. Insert systemrescuecd CD/DVD ROM and start the server. There is no need for your interaction during systemrescue boot. After booting is done, you will be in command line mode.

Before you compile pooler-cpuminer for mining there are few thing to setup.
1. setup root password
Why? You want be able to copy anything trought scp on your server without user password setup!
#passwd


2.network setup
Why? Because you need network connection!
#net-setup eth0
Follow steps.
Test network connection.

OK, so we set up systemrescue! Using scp (or some another method) copy pooler-cpuminer-2.3.2.tar.gz to systemrescue.


root@sysresccd /home % lspooler-cpuminer-2.3.2.tar.gz

Untar it.
root@sysresccd /home % tar xzvf pooler-cpuminer-2.3.2.tar.gz
*
*
*
cpuminer-2.3.2/cpu-miner.c
cpuminer-2.3.2/sha2.c
cpuminer-2.3.2/aclocal.m4
cpuminer-2.3.2/config.sub
cpuminer-2.3.2/Makefile.in
cpuminer-2.3.2/compile

root@sysresccd /home % lscpuminer-2.3.2  pooler-cpuminer-2.3.2.tar.gz

root@sysresccd /home % cd cpuminer-2.3.2
root@sysresccd /home/cpuminer-2.3.2 % ls
aclocal.m4    configure.ac          Makefile.am   scrypt-x64.S
AUTHORS       COPYING               Makefile.in   scrypt-x86.S
ChangeLog     cpu-miner.c           miner.h       sha2-arm.S
compat        cpuminer-config.h.in  missing       sha2.c
compat.h      depcomp               NEWS          sha2-x64.S
compile       elist.h               nomacro.pl    sha2-x86.S
config.guess  example-cfg.json      README        util.c
config.sub    INSTALL               scrypt-arm.S
configure     install-sh            scrypt.c

This is source so we need to compile it and install it.
Because I know that this is working I will do this is one line
root@sysresccd /home/cpuminer-2.3.2 % ./configure;make;make install



After this is done you will have program called minerd ready to use. Test this.
root@sysresccd /home/cpuminer-2.3.2 % ./minerd --helpUsage: minerd [OPTIONS]
 etc.



Will it CPU mine? O, yeeee!(I will not be explaining options for cpuminer)
root@sysresccd /home/cpuminer-2.3.2 % minerd -o scrypt -r 1 -t 1 -s 6 -o http://coinotron:3332 -u username.1 -p 1
[2014-02-25 22:08:30] 8 miner threads started, using 'scrypt' algorithm.
[2014-02-25 22:08:30] Long-polling activated for http://10.0.14.213:8332/lp
[2014-02-25 22:08:33] thread 2: 4096 hashes, 1.53 khash/s
^C

OK, so I case that you are watching on your watch how much time did it pass during this setup, under 5 minutes will get with practice.:)

No comments: