ODroid XU4 - v6.15 - Network settings not saved on reboot.

Having issues with your DietPi installation, or, found a bug? Post it here.
User avatar
MichaIng
Site Admin
Posts: 2324
Joined: Sat Nov 18, 2017 6:21 pm

Re: ODroid XU4 - v6.15 - Network settings not saved on reboot.

Post by MichaIng »

Jep exactly, the networking service is the one that fails on boot due to the dependency bug and manually starting it includes all the interface and resolver steps/settings.

My command suggestion above adds the manual networking service start to DietPi boot script, so you do not need any manual step anymore afterwards.
Shanther
Posts: 41
Joined: Sat Mar 04, 2017 3:12 pm

Re: ODroid XU4 - v6.15 - Network settings not saved on reboot.

Post by Shanther »

I tried that but it didn't work for me.
gigi0ne
Posts: 2
Joined: Sun Feb 12, 2017 1:54 pm

Re: ODroid XU4 - v6.15 - Network settings not saved on reboot.

Post by gigi0ne »

dosent work on Odroid C2 only this work
sudo service networking start
then dietpi-config, networking, ethernet, save and restart...

why? any idea?
cyanide
Posts: 9
Joined: Tue Mar 13, 2018 6:51 am

Re: ODroid XU4 - v6.15 - Network settings not saved on reboot.

Post by cyanide »

gigi0ne wrote: Thu Sep 20, 2018 7:01 pm dosent work on Odroid C2 only this work
sudo service networking start
then dietpi-config, networking, ethernet, save and restart...

why? any idea?
It is a Debian Jessie issue. Wait for fix in Dietpi 6.17 most probably.
Shanther
Posts: 41
Joined: Sat Mar 04, 2017 3:12 pm

Re: ODroid XU4 - v6.15 - Network settings not saved on reboot.

Post by Shanther »

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.
cyanide
Posts: 9
Joined: Tue Mar 13, 2018 6:51 am

Re: ODroid XU4 - v6.15 - Network settings not saved on reboot.

Post by cyanide »

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.

Code: Select all

#!/bin/bash

if ifconfig eth0 | grep 192.168.x.x > /dev/null
then
        echo "network running"
else
        /usr/sbin/service networking start 2>&1 logger
        echo "networking started"
fi
Add it in root's crontab like so:

Code: Select all

*/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.
User avatar
MichaIng
Site Admin
Posts: 2324
Joined: Sat Nov 18, 2017 6:21 pm

Re: ODroid XU4 - v6.15 - Network settings not saved on reboot.

Post by MichaIng »

@Shanther
We have a Debian Stretch image for XU4: https://dietpi.com/downloads/images/Die ... Stretch.7z

Also there is no Pi-hole issue with Jessie any more since Pi-hole v4.0, so this should work in every case.

Code: Select all

sed -i '/[[:blank:]]Workaround_WiFi$/a\\t\tsystemctl start networking' /DietPi/dietpi/boot
This does not work in your case?

Code: Select all

cat /DietPi/dietpi/boot | grep 'systemctl start networking'
Does this show an output?
cyanide
Posts: 9
Joined: Tue Mar 13, 2018 6:51 am

Re: ODroid XU4 - v6.15 - Network settings not saved on reboot.

Post by cyanide »

MichaIng wrote: Fri Sep 28, 2018 6:27 pm @Shanther
We have a Debian Stretch image for XU4: https://dietpi.com/downloads/images/Die ... Stretch.7z

Also there is no Pi-hole issue with Jessie any more since Pi-hole v4.0, so this should work in every case.

Code: Select all

sed -i '/[[:blank:]]Workaround_WiFi$/a\\t\tsystemctl start networking' /DietPi/dietpi/boot
This does not work in your case?

Code: Select all

cat /DietPi/dietpi/boot | grep 'systemctl start networking'
Does this show an output?
Interesting. Two questions...
1) 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.
2) Will this networking bug be present in Stretch?
User avatar
MichaIng
Site Admin
Posts: 2324
Joined: Sat Nov 18, 2017 6:21 pm

Re: ODroid XU4 - v6.15 - Network settings not saved on reboot.

Post by MichaIng »

@cyanide
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.

There are no known networking bugs on Stretch, besides using magic characters as WiFi password, which we currently try to fix/handle/support: https://github.com/Fourdee/DietPi/issues/2087

Ah, one other external bug, but this seems to occur only in veeeery rare cases, since it survived for years inside official Debian package: https://github.com/Fourdee/DietPi/issues/2074
- Finally our report got this fixed, for now on unstable repo. I hope it will be backported at least to Stretch soon.
User avatar
MichaIng
Site Admin
Posts: 2324
Joined: Sat Nov 18, 2017 6:21 pm

Re: ODroid XU4 - v6.15 - Network settings not saved on reboot.

Post by MichaIng »

Another topic, since I see you guys often use old net-tools commands (ifconfig, route, ...):

https://linux.die.net/man/8/ifconfig
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 ;).
Post Reply