All my mining rigs were running Windows 7 but they kept BSODing and crashing and I got tired of reseting them so I tried Linux. It kicked my butt the first day or so but in the end I got it to do my bidding
So in this guide I'll show you how to setup LinuxCoin to
- run off a USB thumb drive
- automatically boot and start mining unattended
- automatically set overclocks and load fan speed profiles
- setup a software watchdog to automatically kill and restart crashed miners
-
- Profit
Credit: Most of this is based off a post by kjj
http://forum.bitcoin.org/index.php?topic=7374.msg248025#msg248025 I couldn't get it to work for me so it's heavily modified by me to run on a stock LinuxCoin 0.2.1b install.
I'm using a 4GB flash drive I had laying around. I recommend good quality high speed flash drive. I'm using one of these
http://www.newegg.com/Product/Product.aspx?Item=N82E16820220251Rest of my Hardware
Two Sapphire 5850 Xtremes, Asus M4A79XTD EVO, 2GB RAM, Sempron 140 processor, 550W CoolerMaster PSU
OK let's get started.
1. Grab a copy of LinuxCoin 0.2.1b
http://www.linuxcoin.co.uk/2. Download Unetbootin
http://unetbootin.sourceforge.net/3. Download the persistence file. I got the 2GB (2048.zip) but I think the others would work too
http://linuxcoin.co.uk/downloads/persistence/4. Run unetbootin and select the LinuxCoin iso you just downloaded. Let it do it's thing. When it's done click exit but don't remove your flash drive yet.
5. Extract the persistence file to the root of your flash drive.
6. Open
syslinux.cfg and replace it with this:
default menu.c32
prompt 0
menu title LinuxCoin
timeout 2
label linuxcoin
menu label LinuxCoin Persistent (flash only)
kernel /live/vmlinuz
append initrd=/live/initrd.img boot=live config quiet splash persistent rw vga=791 noprompt
This let will make it autoboot into persistence mode. The noprompt disables the press ENTER to reboot/shutdown message at the end.
7. Plug the flash drive into your mining rig and boot it off the USB. Setup networking/wallpaper/whatever else you want to do. You might want to test out mining/connecting to the net/etc. Assuming you have no problems booting and running LinuxCoin...proceed.
8. Make the file and/or folders
/home/user/.config/autostart/auto.desktop and add the following contents:
[Desktop Entry]
Encoding=UTF-8
Name=coin
Exec=lxterminal --command "sh /home/user/start.sh"
Terminal=true
9. Open up terminal run
AMDOverdriveCtrl -h | grep active. (Hint type AMD and press tab to autocomplete) Note the index number of your active adapters. If you only have one then it is 0. Mine are 0 and 3.
10. Now run
AMDOverdriveCtrl -i 0. This opens up AMDOverdriveCtrl GUI for card 0. Overclock your card and setup your fan profiles. Export it as a file called gpu0.ovdr. Repeat for each card you have and change index numbers accordingly (ie AMDOverdriveCtrl -i 3)
11. Make the file
/home/user/start.sh and put paste in the following:
#!/bin/bash
sleep 20
xhost +
echo $DISPLAY > /home/user/.display
AMDOverdriveCtrl -i 0 -b gpu0.ovdr
AMDOverdriveCtrl -i 3 -b gpu3.ovdr
lxterminal --title miner1 --command "sh /home/user/miner1.sh"
lxterminal --title miner2 --command "sh /home/user/miner2.sh"
This will make the computer wait 20 seconds to loadup/connect to the network/etc. Then it will load the overclock and fan profiles for each GPU and then start your miners.
12. Make the files
/home/user/miner1.sh and
/home/user/miner2.sh and fill in:
#!/bin/bash
cd /opt/miners/phoenix
./phoenix.py -u http://yanz_1:pass@uswest.btcguild.com:8332/ -q 7 -k phatk BFI_INT VECTORS FASTLOOP=false AGGRESSION=11 DEVICE=0
Modify accordingly to mine for yourself.
13. Make the file
/home/user/restart.sh and fill it with these magical lines:
#!/bin/bash
export DISPLAY=`cat /home/user/.display`
pc=`ps waxuf | grep miner1.sh -c`
ld=`aticonfig --odgc --adapter=0 | grep "GPU load" | cut -c 30-35 | cut -d % -f 1`
if [ $pc -lt "2" ] || [ $ld -lt "50" ] ; then
kill `ps -ef | grep miner1 | grep -v grep | awk '{print $2}'`
lxterminal --title miner1 --command sh /home/user/miner1.sh &
date +"%D %r miner1 restarted" >> /home/user/cron_job.log
fi
pc=`ps waxuf | grep miner2.sh -c`
ld=`aticonfig --odgc --adapter=1 | grep "GPU load" | cut -c 30-35 | cut -d % -f 1`
if [ $pc -lt "2" ] || [ $ld -lt "50" ] ; then
kill `ps -ef | grep miner2 | grep -v grep | awk '{print $2}'`
lxterminal --title miner2 --command sh /home/user/miner2.sh &
date +"%D %r miner2 restarted" >> /home/user/cron_job.log
fi
This will check the each GPU to make sure the load is greater than 50% and check to see that the process miner1 and miner2 exist. If not it will kill and restart the appropriate miner. It also logs it to
/home/user/cron_job.log14. Run
sudo crontab -e -u user and add this line after the last line:
0-59 * * * * sh /home/user/restart.sh
This runs the restart miner script every minute.
15. Reboot
16.
17. Profit
18. Donate to
1LeLE4PP72CNfHDmT3JyFUQehZ4i41LxPz if this helped you.
Comments and improvements welcome.