June 1, 2024

Antminer S9 board - linux - static IP

The Antminer came set up to use DHCP to get an IP address. This works, but I would rather have a static IP set up, so that I can control it, and so that it remains constant.

Running "ps" shows:

 1758 root       0:00 udhcpc -b -t 10 -A 10 -x hostname antMiner -i eth0
This is launched by the script /etc/rcS.d/S38network.sh -- and this is the script I will need to modify/replace to set up a static IP.
Actually, after studying the script a bit, I may be somewhat easy.
The key is the file /config/network.conf
hostname=antMiner
dhcp=true
We can change the above to:
hostname=antMiner
dhcp=false
ipaddress=192.168.0.130
netmask=255.255.255.0
gateway=192.168.0.1
The file "/etc/resolv.conf" has a list of DNS servers. It is empty, so ...
; Use Google nameservers
;
domain           mmto.org
nameserver       8.8.8.8
nameserver       8.8.4.4
All this seems to work just fine.

Random cleanup

Running "ps" shows a variety of processes running that I feel confident I can do without.
6558 root       0:00 {monitorcg} /bin/sh /sbin/monitorcg
I kill this and it comes back. I use "cd /etc; grep -r monitorcg ." to discover that a line in /etc/inittab runs this. I comment out that line:
#dcdc:2345:respawn:/sbin/monitorcg
Another thing I can do without is this:
 1480 root       0:01 /usr/bin/monitor-recobtn /usr/bin/factory_config_reset.sh
  1114 root       0:00 /usr/bin/monitor-ipsig

This is handled by /etc/rcS.d/S70monitor-recobtn, which we can rename. And the second is launched by /etc/rcS.d/S100monitor-ipsig.sh, which we also rename.
Feedback? Questions? Drop me a line!

Tom's Computer Info / [email protected]