Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fresh install can't setup eth0 #682

Closed
sagitt opened this issue Apr 21, 2020 · 28 comments
Closed

fresh install can't setup eth0 #682

sagitt opened this issue Apr 21, 2020 · 28 comments

Comments

@sagitt
Copy link

sagitt commented Apr 21, 2020

Description of issue/question

Fresh install today on RPi4 with official script, adding ethernet do this.
nothing changed, only add etherent.

Schermata 2020-04-21 alle 20 09 44

`Failed to execute command 'export PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin; export LANG=C.UTF-8; omv-salt deploy run systemd-networkd 2>&1' with exit code '1': /usr/lib/python3/dist-packages/salt/utils/path.py:265: DeprecationWarning: Using or importing the ABCs from 'collections' instead of from 'collections.abc' is deprecated, and in 3.8 it will stop working if not isinstance(exes, collections.Iterable): raspberrypi: ---------- ID: configure_etc_network_interfaces Function: file.managed Name: /etc/network/interfaces Result: True Comment: File /etc/network/interfaces updated Started: 20:09:38.308782 Duration: 66.602 ms Changes: ---------- diff: --- +++ @@ -1,7 +1,8 @@ +# This file is auto-generated by openmediavault (https://www.openmediavault.org) +# WARNING: Do not edit this file, your changes will get lost. + # interfaces(5) file used by ifup(8) and ifdown(8) - -# Please note that this file is written to be used with dhcpcd -# For static IP, consult /etc/dhcpcd.conf and 'man dhcpcd.conf' +# Better use netplan.io or systemd-networkd to configure additional interface stanzas. # Include files from /etc/network/interfaces.d: source-directory /etc/network/interfaces.d ---------- ID: remove_systemd_networkd_config_files Function: module.run Result: True Comment: file.find: [] Started: 20:09:38.376883 Duration: 2.053 ms Changes: ---------- file.find: ---------- ID: remove_netplan_config_files Function: module.run Result: True Comment: file.find: [] Started: 20:09:38.379223 Duration: 1.962 ms Changes: ---------- file.find: ---------- ID: configure_netplan_default Function: file.managed Name: /etc/netplan/10-openmediavault-default.yaml Result: True Comment: File /etc/netplan/10-openmediavault-default.yaml updated Started: 20:09:38.381475 Duration: 17.541 ms Changes: ---------- diff: New file mode: 0644 ---------- ID: configure_netplan_ethernet_eth0 Function: file.managed Name: /etc/netplan/20-openmediavault-eth0.yaml Result: True Comment: File /etc/netplan/20-openmediavault-eth0.yaml updated Started: 20:09:38.399316 Duration: 59.896 ms Changes: ---------- diff: New file mode: 0644 ---------- ID: apply_netplan_config Function: cmd.run Name: netplan apply Result: False Comment: Command "netplan apply" run Started: 20:09:38.460932 Duration: 356.522 ms Changes: ---------- pid: 2124 retcode: 1 stderr: Traceback (most recent call last): File "/usr/sbin/netplan", line 23, in netplan.main() File "/usr/share/netplan/netplan/cli/core.py", line 50, in main self.run_command() File "/usr/share/netplan/netplan/cli/utils.py", line 130, in run_command self.func() File "/usr/share/netplan/netplan/cli/commands/apply.py", line 43, in run self.run_command() File "/usr/share/netplan/netplan/cli/utils.py", line 130, in run_command self.func() File "/usr/share/netplan/netplan/cli/commands/apply.py", line 93, in command_apply stderr=subprocess.DEVNULL) File "/usr/lib/python3.7/subprocess.py", line 347, in check_call raise CalledProcessError(retcode, cmd) subprocess.CalledProcessError: Command '['udevadm', 'test-builtin', 'net_setup_link', '/sys/class/net/lo']' returned non-zero exit status 1. stdout: Summary for raspberrypi ------------ Succeeded: 5 (changed=6) Failed: 1 ------------ Total states run: 6 Total run time: 504.576 ms
``

Steps to reproduce issue

(Include debug logs if possible and relevant.)

Versions report

@votdev
Copy link
Member

votdev commented Apr 21, 2020

This seems to be a problem in the RPi image you are using. Simply delete the file /etc/systemd/network/99-default.link.

See https://forum.openmediavault.org/index.php?thread/32153-raspberry-pi-add-network-interface-fail/ or https://forum.openmediavault.org/index.php?thread/32133-interface-eth0-error-on-raspberry-pi-4/.

@sagitt
Copy link
Author

sagitt commented Apr 21, 2020

well i'll try, i already done 5 fresh install... same problem. Changing hostname too.

I used last script with changes (1.0.5)

@votdev
Copy link
Member

votdev commented Apr 21, 2020

The problem seems to be fixed, see OpenMediaVault-Plugin-Developers/installScript@bd2a715.

@votdev votdev closed this as completed Apr 21, 2020
@sagitt
Copy link
Author

sagitt commented Apr 21, 2020

The problem seems to be fixed, see OpenMediaVault-Plugin-Developers/installScript@bd2a715.

I have same issue with linked script version.
i done 5 installation, with last version.

see up: "I used last script with changes (1.0.5)"

@ryecoaaron
Copy link
Contributor

Why five installations? Just killing your sd card. I only saw the issue on armbian not raspian. My RPi upgraded fine. I will have to look at the rpi

@sagitt
Copy link
Author

sagitt commented Apr 21, 2020

Why five installations? Just killing your sd card. I only saw the issue on armbian not raspian. My RPi upgraded fine. I will have to look at the rpi

i tried some ways.... i hoped doing this. before new installation i upgraded and works fine but i want fresh installation for some reason and now.....

@ryecoaaron
Copy link
Contributor

I don't see how the same fix is not fixing this issue. What is the output of:

sudo udevadm -d test-builtin net_setup_link /sys/class/net/lo

@sagitt
Copy link
Author

sagitt commented Apr 21, 2020

I don't see how the same fix is not fixing this issue. What is the output of:

sudo udevadm -d test-builtin net_setup_link /sys/class/net/lo

i just done NOW a fresh install, rpi4, raspbian buster, all operation of the OMV5 Installation PDF (passwd, update, adduser pi ssh etc.), executed the script and at the finish doing ls /etc/systemd/network i even see the file!

Schermata 2020-04-21 alle 22 41 51

after a reboot i done your command and this is the output:

Schermata 2020-04-21 alle 22 45 31

and this is the output of your last comment:

Schermata 2020-04-21 alle 22 46 08

@votdev
Copy link
Member

votdev commented Apr 21, 2020

Are you sure you are using OMV 5.4.0? To me it does not look like this. The file /etc/systemd/network/openmediavault-eth0.network should not exist then. Also the content of /etc/network/interfaceslooks different in 5.4.0 to that in your screenshot.

@sagitt
Copy link
Author

sagitt commented Apr 21, 2020

i installed fresh raspbian 2020-02-13-raspbian-buster-lite after an sd card format, with balenaEtcher. I only executed passwd, sudo adduser pi, apt-get update\upgrade and:

wget -O - https://github.com/OpenMediaVault-Plugin-Developers/installScript/raw/master/install | sudo bash

from UI:

Schermata 2020-04-21 alle 23 00 54

I installed it NOW.

Installed multiple times in last weeks without problem, problems only after the new version on a fresh install.

@ryecoaaron
Copy link
Contributor

@votdev the install script creates the openmediavault-eth0 file. I need to come up with a better way to switch Armbian's networkmanager over to OMV's style (which now needs to be netplan).

@ryecoaaron
Copy link
Contributor

@sagitt stop installing until we fix it then.

@sagitt
Copy link
Author

sagitt commented Apr 21, 2020

@sagitt stop installing until we fix it then.

of course, now that i know the bug, i'll wait... or maybe there is a way to install the older version?

@ryecoaaron
Copy link
Contributor

it still isn't an openmediavault or installscript bug but we need to come up with a workaround for people lacking patience.

@sagitt
Copy link
Author

sagitt commented Apr 21, 2020

it still isn't an openmediavault or installscript bug but we need to come up with a workaround for people lacking patience.

well :). so there is not a way to install older version, right?

@ryecoaaron
Copy link
Contributor

just wait.........

@votdev
Copy link
Member

votdev commented Apr 21, 2020

@ryecoaaron netplan.io can render configs for NetworkManager, too. Maybe this can be easily switched via environment variable for ARMbian and other NetworkManager based distros.

@ryecoaaron
Copy link
Contributor

If you want to make that change, it doesn't bother me but I just committed the installscript with the netplan changes.

@votdev
Copy link
Member

votdev commented Apr 21, 2020

If you want to make that change, it doesn't bother me but I just committed the installscript with the netplan changes.

No, if it works with the current behavior then it is ok. There are many other things to do, no time to rest.

@sagitt
Copy link
Author

sagitt commented Apr 22, 2020

if someone need a remote desktop for test the issue, tell me. is the only help that i can do.

@Slevinski
Copy link

I deleted the file /etc/systemd/network/99-default.link and rebooted. I ran sudo omv-firstaid. Chose option 1 to fix network interface. It didn't hang and completed successfully. One more reboot and then I opened OMV. eth0 is available. Things seem to be working...

@sagitt
Copy link
Author

sagitt commented Apr 22, 2020

I deleted the file /etc/systemd/network/99-default.link and rebooted. I ran sudo omv-firstaid. Chose option 1 to fix network interface. It didn't hang and completed successfully. One more reboot and then I opened OMV. eth0 is available. Things seem to be working...

i'll try!

so you installed raspbian, installed omv with script, deleted file, rebooted, omv-firstaid on network and all works fine?

@Slevinski
Copy link

No promises, but that worked for me so far.

@sagitt
Copy link
Author

sagitt commented Apr 22, 2020

No promises, but that worked for me so far.

ok i'll try. anyway this issue are closed. i think is better re-open it.

@IsonCode
Copy link

Hello, i have the same problem and when i exec this: sudo rm /etc/systemd/network/99-default.link the system stops working and i need to format the sd.
Have you found any solution?
thx

@votdev
Copy link
Member

votdev commented Apr 27, 2020

Hello, i have the same problem and when i exec this: sudo rm /etc/systemd/network/99-default.link the system stops working and i need to format the sd.

This is a meaningless statement. Does the system freeze, do you have no network connection after reboot, ... ???

Have you used omv-firstaid to reconfigure the network?

@IsonCode
Copy link

I just can't have any access to rasp with ssh

@IsonCode
Copy link

Do i need to remove this /etc/systemd/network/99-default.link Before or after exec the omv-install script?

chiva pushed a commit to chiva/installScript that referenced this issue Apr 29, 2020
Closes openmediavault/openmediavault#682 and openmediavault/openmediavault#683

In Raspbian Buster 2020-02-13, the file is a symbolic link to /dev/null and is not detected correctly with the -f condition
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants