Setting them in dietpi-config does nothing. The /etc/network/interfaces file has the correct settings. But they are not applied on startup. This is a big problem because the odroid is running headless, so I need to attach a monitor and a keyboard to turn on networking again.
I wish they would get Debian Stretch up and running for the XU4. That would have fixed the pi-hole issue as well apparently. They went straight for the pi-hole issue rather then move to stretch so it is probably a bigger thing then I would understand.
I do wish they could fix this asap as I used to try to reboot my device every 3 days or so and cannot until they fix this unless I get a keyboard and type in the commands manually. Perks of a headless server.
Save this as a .sh file in your root’s home folder, chmod +x it. Replace the IP to whatever your local IP should be set to.
if ifconfig eth0 | grep 192.168.x.x > /dev/null
echo "network running"
/usr/sbin/service networking start 2>&1 logger
echo "networking started"
Add it in root’s crontab like so:
*/1 * * * * /root/networkcheck.sh
The script will run every minute and if it sees the network down, it will start it. Usually takes about a minute after I start my system for the network to come up and start working. Incredibly “hackish” but it works for now and the fix is just having to remove the crontab entry.
Will this be rolled out into the dietpi-update system? I’m currently on 6.15, Jessie as per /etc/os-release, planning on upgrading to 6.16 over the weekend. But if there is no roadmap for the updater to migrate the system to Stretch automatically, I would rather move my setup to Stretch.
The fix is already implemented for coming v6.17 release, not yet in v6.16.
We will not officially support a Jessie → Stretch migration. The possible failures are simply too much to test/sort out for all devices and system setups. Impossible to guarantee it works fine and you will not face any issues afterwards.
Since not only DietPi, but also the offered base images from manufacturers contain config and system files outside of APT packages, the apt full-upgrade after manually adjusting the APT sources will leave your system partly in between Jessie and Stretch. Or lets say, those outside of APT placed files and binaries will expect the system to be Jessie. Unpredictable if this will directly or later cause issues and if those are critical or ignorable.
Of course nothing can prevent you from simply trying. Do a dietpi-backup first of course, or perhaps a full SDcard/drive backup.
Reduce installed software/packages to a minimum first, clean your system as much as you manually can first as well.
The less packages, files and services/processes running, the higher the change for a sustainable successful distro upgrade.
But finally you will go better with a fresh image. You can do dietpi-backup to an external drive/card and in case recover manually adjusted config files and/or placed binaries/software from the backup then. Keep the backup for some time, until you are sure really everything works as before.
This program is obsolete! For replacement check ip addr and ip link. For statistics use ip -s link.
Use ip a s eth0 instead.
Also /usr/sbin/service networking start should only work on Jessie, as they use deprecated (on Debian) init.d service there.
To have this working on Stretch as well (also works on Jessie), use systemctl start networking to handle it in systemd service way.
I would also suggest this running only once at/after boot, as of my command above. If this does not work, then the issue would need further investigation.
Running a cron job every minute is no sustainable solution, since it spams the syslog and takes quite some resources. If the network really breaks repeatedly randomly, there is a more serious issue with either the network or the servers network/system config, that should be fixed instead .