Hi folks,
I only have two antminer S2, but sure enough, one was fixed with the June 19th update, and the other still does not hold it's configuration changes... until now.
I like Linux; because I can make it do whatever I need it to do. In this case, I wanted the same things that you do, to keep it's configurations after a reboot.
My fix is a shell script that unpacks the bitmaintech provided initramfs (firmware) tar files, changes the network settings to be unique for each S2, and inserts my custom pool settings. It's not perfect. It's not even elegant, but it does work.
Just put the pub_bminit.sh script on a Linux server, and change the permissions for it to be executable. Adjust the pieces highlighted with
red. Just tell it where the initramfs tar file is located, like this:
./pub_bminit.sh /home/username/Downloads/initramfs.bin.SD-20140619.tar
___
#! /bin/bash
export PATH="/usr/lib64/ccache:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/root/bin"
if
[ -n "${1}" ]
then
if
[ -f "${1}" ]
then
export SD_VER=`basename ${1} | awk -F\- '{print $2}' | awk -F\. '{print $1}'`
mkdir -m 0755 -p "/tmp/${SD_VER}/modified/fs"
cp "${1}" "/tmp/${SD_VER}/.ORIG`basename ${1}`"
cd "/tmp/${SD_VER}/"
#--> unpack the initramfs (firmware) file
tar xfz ".ORIG`basename ${1}`"
dd if=initramfs.bin.SD of=initramfs.cpio.gz bs=64 skip=1
gunzip initramfs.cpio.gz
cd modified/fs
cpio -vidF ../../initramfs.cpio
#--> add a number for each miner for the loop
for i in
1 2 do
#--> double-check the current directory
if
[ `pwd` != "/tmp/${SD_VER}/modified/fs" ]
then
cd "/tmp/${SD_VER}/modified/fs"
fi
#--> insert your custom pool info
cat > ./etc/cgminer.conf.factory << EOF
{
"pools": [
{
"url": "stratum+tcp://stratum.yourpool1.com:3333",
"user": "yourusername_10${i}",
"pass": "yourpassword" },
{
"url": "stratum+tcp://stratum.yourpool2.com:3333",
"user": "yourusername_10${i}",
"pass": "yourpassword" },
{
"url": "stratum+tcp://stratum.yourpool3.com:3333",
"user": "yourusername_10${i}",
"pass": "yourpassword" }
],
"api-listen": true,
"api-network": true,
"api-allow": "W:0/0",
"bitmainbeeper" : true,
"bitmaintempoverctrl" : true
}
EOF
#--> insert your custom network info
cat > ./etc/network.conf.factory << EOF
hostname=antminer10${i}
ipaddress=10.0.0.10${i}
netmask=255.255.255.0
gateway=10.0.0.1
dnsservers="8.8.8.8"EOF
#--> rebuild the initramfs (firmware) file
find . | cpio -H newc -o > ../initramfs.cpio
cd "/tmp/${SD_VER}/modified"
gzip initramfs.cpio
mkimage -n 'Angstrom-bitmainer-eglibc-ipk-v2' -A arm -O linux -T ramdisk -C gzip -d initramfs.cpio.gz initramfs.bin.SD
tar cfz "../initramfs.bin.SD-${SD_VER}.tar" initramfs.bin.SD
mkdir -m 0755 -p /opt/firmware/${SD_VER}/10${i}
mv "../initramfs.bin.SD-${SD_VER}.tar" /opt/firmware/${SD_VER}/10${i}/ done
#--> end of the loop
fi
fi
___