Use an Thumb Drive to expand your root on a GL.iNet GL-AR300M16-Ext Router

These instructions were based on the info here:

https://openwrt.org/docs/guide-user/additional-software/extroot_configuration

I just added a few tips to make the update flow smoothly. First of all, I had to do a factory reset because following these instructions caused my disk space to fill up. This is because I had already installed Luci and other various apps.

Grab the packages you need. I omitted “parted”, because it wasn’t in the opkg repository, but I didn’t need it for this.

opkg update
opkg install block-mount kmod-fs-ext4 e2fsprogs

These commands set the DEVICE environment variable for the current mount point so we can use it later:

DEVICE="$(sed -n -e "/\s\/overlay\s.*$/s///p" /etc/mtab)"
uci -q delete fstab.rwm
uci set fstab.rwm="mount"
uci set fstab.rwm.device="${DEVICE}"
uci set fstab.rwm.target="/rwm"
uci commit fstab

Formatting your Thumb Drive: (Mine is a 64 GB USB 2.0 on /dev/sda1)

umount /dev/sda1
mkfs.ext4 -L extroot /dev/sda1

Setting your router to use this new filesystem as your boot drive:

DEVICE="/dev/sda1"

eval $(block info ${DEVICE} | grep -o -e "UUID=\S*")
uci -q delete fstab.overlay
uci set fstab.overlay="mount"
uci set fstab.overlay.uuid="${UUID}"
uci set fstab.overlay.target="/overlay"
uci commit fstab

Copying over your current root to the new file system and rebooting:

mount ${DEVICE} /mnt
tar -C /overlay -cvf - . | tar -C /mnt -xf -
reboot

That’s it, you now have more space for your programs.

Use an SD Card to expand your root on a GL.iNet AXT1800 Router

These instructions were based on the info here:

https://openwrt.org/docs/guide-user/additional-software/extroot_configuration

I just tweaked it to use my 128 GB SD Card.

Grab the packages you need for this setup:

opkg update
opkg install block-mount kmod-fs-ext4 e2fsprogs parted

These commands set the DEVICE environment variable for the current mount point so we can use it later:

DEVICE="$(sed -n -e "/\s\/overlay\s.*$/s///p" /etc/mtab)"
uci -q delete fstab.rwm
uci set fstab.rwm="mount"
uci set fstab.rwm.device="${DEVICE}"
uci set fstab.rwm.target="/rwm"
uci commit fstab

Formatting your SD Card: (Mine is /dev/mmcblk0p1)

umount /dev/mmcblk0p1
mkfs.ext4 -L extroot /dev/mmcblk0p1

Setting your router to use this new filesystem as your boot drive:

DEVICE="/dev/mmcblk0p1"

eval $(block info ${DEVICE} | grep -o -e "UUID=\S*")
uci -q delete fstab.overlay
uci set fstab.overlay="mount"
uci set fstab.overlay.uuid="${UUID}"
uci set fstab.overlay.target="/overlay"
uci commit fstab

Copying over your current root to the new file system and rebooting:

mount ${DEVICE} /mnt
tar -C /overlay -cvf - . | tar -C /mnt -xf -
reboot

That’s it, you now have more space for your programs.

New Windows 10 Mining Rig Checklist

I had this info scattered around in many posts, I thought I would put it all here for a generic checklist when setting up a new mining rig, no matter what you are mining.

Lets start with bios:

Set power to resume at latest state so if your electricity goes out, it will start up again.
Set boot beep on.

Install Windows 10 x64

Install the latest stable AMD Radeon Crimson Drivers:

http://support.amd.com/en-us/download/desktop?os=Windows+10+-+64

The latest stable version for me is 16.12.1

Install Awesome Miner, or rather the Remote Agent if this is a mining node:

http://www.awesomeminer.com/

Setup Virtual Memory to 16 or 32 GB:

16 GB: 16384 MB
32 GB: 32768 MB

Control Panel
System and Security/System
Advanced system settings
Advanced (Tab)/Performance/Settings (Button)
Advanced (Tab)/Virtual Memory/Change (Button)
Uncheck "Automatically manage paging file size for all drives"
Click "Custom Size"

If you can do 32, do it, otherweise 16 would be ok:
Min: 32768
Max: 32768

Click "Set" and get out of all the dialogs...

You may have to reboot.

Reboot straight into mining:

Auto login:

netplwiz
Set Awesome Miner to start on reboot.
Set your managed miner to start on reboot.

Lock after login: (Optional if your rigs are secure)

rundll32.exe user32.dll,LockWorkStation

Other Software you may want to install:

Chrome

https://www.google.com/chrome/browser/desktop/index.html

Notepad++

https://notepad-plus-plus.org/

TortoiseSVN

https://tortoisesvn.net/downloads.html

Other Settings you may want to adjust:

Give your computer a name
Allow Remote Access
Power Options
    Turn off display: Never
    Put Computer to sleep: Never
Windows Folder defaults:
    Unhide known extensions
    Unhide system folders
Set your time zone

Never get stuck after a windows crash. Run this as administrator: (This removes the prompt and always reboots normally into windows)

bcdedit /set {current} bootstatuspolicy ignoreallfailures

Remove the popup after a crash: (Sometimes a mining crash has a modal alert waiting for you to hit “OK”)

gpedit.msc

Navigate to:
  Computer Configuration
  Administrative Templates
  Windows Components
  Windows Error Reporting

Double click on "Prevent display of the user interface for critical errors"

Set to Enabled

Exclude your Mining Software folders from Windows Defender. Don’t let Defender take down your whole mining operation by quarantining your mining software:

C:\common\apps (or wherever)
C:\Users\YourUserName\AppData\Roaming\AwesomeMinerService

Overclocking the RX 480 for the Claymore Ethereum-Decred Miner

Using Wattman, your values may have to be tweaked depending on the silicone lottery:

Memory: 2200mhz (overclocked), 975mv (underclocked)
Power Limit: +15%

This will draw 825w from the wall with 3 cards.

Stock for these cards are:

Memory: 2000mhz, 1000mv
Power Limit: 0

In the Claymore Miner config.txt:

-ethi 8
-dcri 60

I left the Core clock at stock which is defaulted to 1266 or 1288 (XFX version)

More can be done with tweaking the Core Clock, but my 850w power supply was already at 825w with 3 cards and motherboard/fans.

Installing another power supply for 3 more cards will let me tweak the numbers some more.

With the settings above, I was able to get:

ETH/ETC: 27 Mh/s (26 Mh/s on one of the cards)
DCR: 810 Mh/s (790 Mh/s on one of the cards)

Heat and Fans:

Max: 80 C
Target: 75 C

Windows 10 Claymore ETH/DCR Mining Rig using the RX 480 GPU

This build deals with setting up Windows 10 to mine Ethereum and Decred, using the RX 480 GPU.

Install Windows 10 x64
—-
Install the latest AMD Radeon Crimson Drivers

http://support.amd.com/en-us/download/desktop?os=Windows+10+-+64

Crimson Edition 16.7.3 (Main installer, run this.)

After Crimson is installed, then do an update within Crimson. You will then be at “Crimson Edition 16.8.3” (or later)
—-
Install AwesomeMiner

http://www.awesomeminer.com/

—-
Configure Claymore ETH/DCR

New Miner Wizard
—-
Example of config.txt for mining ETC (Ethereum Classic)

-r 1
-ethi 8
-dcri 60

-etha 0
-mode 0

-gser 2

### ETC ########################################
-epool us1-etc.ethermine.org:4444
-ewal 0xBAf5706B333F709211Ab5A2A5669970A55385934.YourMinerName
-esm 0
-epsw x
-allpools 1
-allcoins 1

### DCR ########################################
-dpool stratum+tcp://dcr.suprnova.cc:2252
-dwal YourUserName.YourMinerName
-dpsw YourPassword

Example of config.txt for mining ETH (Ethereum)

-r 1
-ethi 8
-dcri 60

-etha 0
-mode 0

-gser 2

### ETH ########################################
-epool us1.ethermine.org:4444
-ewal 0x7563A2D88F2151B659F22FAd213E3A0E6fedE943.YourMinerName
-esm 0
-epsw x
-allpools 1
-allcoins 1

### DCR ########################################
-dpool stratum+tcp://dcr.suprnova.cc:2252
-dwal YourUserName.YourMinerName
-dpsw YourPassword

Example of epools.txt

POOL: etc-eu.suprnova.cc:3333, PSW: YourPassword, WORKER: YourUser.YourMiner, ESM: 0, ALLPOOLS: 1
POOL: us1.ethermine.org:4444, PSW: YourPassword, WORKER: 0x57f57167a82da3de4e69de73d1bc9c731cdcbaf8.YourMiner, ESM: 0, ALLPOOLS: 1
POOL: us1.ethpool.org:3333, PSW: YourPassword, WORKER: 0x57f57167a82da3de4e69de73d1bc9c731cdcbaf8.YourMiner, ESM: 0, ALLPOOLS: 1

Example of dpools.txt

POOL: dcr.suprnova.cc:2252, PSW: YourPassword, WORKER: YourUser.YourMiner, ESM: 0, ALLPOOLS: 1
POOL: dcr.coinmine.pl:2222, PSW: YourPassword, WORKER: YourUser.YourMiner, ESM: 0, ALLPOOLS: 1
POOL: dcr.pool.mn:4722, PSW: YourPassword, WORKER: YourUser.YourMiner, ESM: 0, ALLPOOLS: 1

—-
How to reboot straight into mining:

Setup Autologin In Windows.

Lock after login:
rundll32.exe user32.dll,LockWorkStation

Set Awesome Miner to start on reboot.
Set your managed miner to start on reboot.
—-

Other Software you may want to install:
—-
Install Chrome
—-
Install Notepad++
https://notepad-plus-plus.org/
—-
Install TortoiseSVN
https://tortoisesvn.net/downloads.html
—-

Other Settings you may want to adjust:

Allow Remote Access
Power Options
    Turn off display: Never
    Put Computer to sleep: Never
Auto login: netplwiz
Windows Folder defaults:
    Unhide known extensions
    Unhide system folders

Never get stuck after a windows crash. Run this as administrator:

bcdedit /set {current} bootstatuspolicy ignoreallfailures

Remove the popup after a crash

gpedit.msc

Navigate to:
Computer Configuration/Administrative Templates/Windows Components/Windows Error Reporting

Double click on "Prevent display of the user interface for critical errors"

Set to Enabled

Power Considerations for the r9 280x

I would allocate about 350w for each r9 280x card if you’re planning heavy overclocking.

350 * 3 = 1050 watt
350 * 6 = 2100 watt

Don’t forget about your motherboard, CPU, fans… so the one that is running these things and the 3 GPU’s should consider another 200-300 watts for that PSU:

So 750w power supply would run one card as well as the motherboard, cpu, hard drive, all fans.

So let’s go more conservative and have 4 GPU’s (will probably run cooler too):
350 * 2 = 700
350 * 4 = 1400

The setup for this would be 2 x 850w = 1700 w and will give you plenty of room for peripherals.

Using cgminer with Bitmain Antminer U3 on Ubuntu

I decided to move my USB Antminer U3’s to an old laptop, to free up my windows machine for important stuff like games.

First make sure you have the necessary libraries:

sudo apt-get install build-essential autoconf automake 
sudo apt-get install libtool pkg-config libcurl3-dev libudev-dev
sudo apt-get install libc6 libcurl3-gnutls libjansson4
sudo apt-get install libncurses-dev

Download the latest cgminer:

mkdir ~/source
cd ~/source
git clone https://github.com/ckolivas/cgminer.git
cd cgminer
./autogen.sh
CFLAGS="-O2 -Wall -march=native" ./configure --enable-icarus
make

Since cgminer needs access to the usb ports, you need to run it as root:

sudo ~/source/cgminer/cgminer --au3-volt 800 --au3-freq 237.50 -o stratum+tcp://hashpower.co:3333 -u YOUR_USERNAME_HERE_OR_BTC_ADDRESS -p c=BTC

Overclocking the R9 280x on Ubuntu

Well, I thought I would run some tests to see if I could get more performance from this card.

First of all DO THIS AT YOUR OWN RISK, you have been warned…

My Test Scenario:
—-
AMD Radeo R9 200 Series
Specifically: R9 280x
OS: Ubuntu 14.04 LTS
cgminer version 3.7.2
cgminer intensity: 5
—-

First some setup if needed:

sudo amdconfig --initial --adapter=all
sudo reboot

How to update your clock and memory:

Enable overdrive, and set the clock.

amdconfig --od-enable
amdconfig --odsc=1000,1500

Where 1000 is the spot for you clock, and 1500 is the spot for your memory. These are the default settings for the R9 280x.

To check your current settings and temperature:

amdconfig --odgc --adapter=all
amdconfig --odgt --adapter=all

Hint: put commands above in a gpu_info script and have it watched, or put it in the startup:

watch ./gpu_info
gnome-terminal  --geometry=63x13+1140+40 -e 'watch ~/bin/gpu_info'

Here is how my test went:

Core Memory GH/s  Temp     Notes
---- ------ ----  ----     -----
1000 1500   1.127 69.00 C  Default Core/Memory
1000 500    1.127 71.00 C  Underclocked Memory
1050 500    1.183 71.00 C
1100 500    1.255 72.00 C
1150 500    1.300 73.00 C
1200 500    1.345 74.00 C  Last stable core clock
1250 500    ????? ???????  Slowed down, then GPU shut down

Now that I have a stable core clock of 1200, I will experiment with the
cgminer intensity. I would let it run for about 30 minutes or more to
make sure it really is stable.

Then save the settings:

aticonfig --odsc=1200,500
aticonfig --odcc

Here are my results when messing with cgminer intensity:

Core Memory GH/s Temp Load Intensity Notes
---- ------ ---- ---- ---- --------- -----
1200 500 1.514 77.00 C 95% d Dynamic intensity is the safest and where I keep it.
1200 500 1.412 76.00 C 90% 6
1200 500 1.487 76.00 C 94% 7
1200 500 1.512 77.00 C 95% 8
1200 500 1.545 77.00 C 97% 9
1200 500 1.565 77.00 C 98% 10
1200 500 1.576 77.00 C 99% 11
1200 500 1.582 77.00 C 99% 12
1200 500 1.585 77.00 C 99% 13
1200 500 1.587 77.00 C 99% 14 Fastest, but desktop may become sluggish.

So for me, I keep it at 1200 core clock, 500 memory clock, and intensity d. There are diminishing returns for increasing the intensity, but may be worth it for some people.

Install opencl and drivers for Radeon R9 280x on Ubuntu

To get the drivers set up for your AMD card do the following.

System Settings/Software & Updates/Additional Drivers
Select fglrx-updates

If you have multiple GPU’s but only the first is being recognized, you may need to disable the GPU Manager. You will need to edit this file:

sudo nano /etc/default/grub

Change this line to:

#GRUB_CMDLINE_LINUX_DEFAULT="quiet splash"
GRUB_CMDLINE_LINUX_DEFAULT="nogpumanager"

Now update grub and reboot:

sudo update-grub
sudo reboot

To list your GPU’s:

lspci | grep VGA
amdconfig --list-adapters

Now initialize your GPU’s:

sudo amdconfig --initial --adapter=all
sudo reboot

Now run clinfo:

clinfo

You should see your version of opencl:

Device OpenCL C version: OpenCL C 1.2

Now go ahead and set up cgminer, instructions are here:
http://www.reynoldtech.com/mining-decred-on-ubuntu-with-cgminer/


Notice: The info below is outdated, I’m now using the Ubuntu GUI to grab the additional drivers.

Find the drivers on the official AMD website:
http://support.amd.com/en-us/download/linux

Click on your version of Ubuntu (ex: Ubuntu 14.04 LTS 64-bit)

Download all the fglrx files for your version. There should be 4 of them.

Get to your download directory and copy them somewhere safe like:

mkdir ~/AMD_Driver_packages
cd ~/Downloads
cp *.deb ~/AMD_Driver_packages
cd ~/AMD_Driver_packages

I had to make sure my system had the dependencies

sudo apt-get -f install

Now that you are in the folder you will be doing all your installing from, go ahead and install:

sudo dpkg -i fglrx-core_15.302-0ubuntu1_amd64_ub_14.01.deb
sudo dpkg -i fglrx_15.302-0ubuntu1_amd64_ub_14.01.deb
sudo dpkg -i fglrx-dev_15.302-0ubuntu1_amd64_ub_14.01.deb
sudo dpkg -i fglrx-amdcccle_15.302-0ubuntu1_amd64_ub_14.01.deb

Now reboot

sudo reboot

Check that everything is installed correctly:

sudo dpkg -l fglrx fglrx-core fglrx-amdcccle fglrx-dev

Now run clinfo:

clinfo

You should see your version of opencl:

Device OpenCL C version: OpenCL C 1.2

Now go ahead and set up cgminer, instructions are here:
http://www.reynoldtech.com/mining-decred-on-ubuntu-with-cgminer/