OrangePi Zero2 Image creation problem

I created image for OrangePi Zero2 using the tutorial and the script, but on first boot after re-flashing new img file, ethernet is not working. I had to login manually with the keyboard and change eth0 to end0 inside the network interfaces file. Only then it started working on next boot.

It would need to be corrected exactly the other way around. All our scripts expect eth0

@Joulinar guess you will need then to update that script, to recognize if interface is not named eth0 and to rename if necessary?

We use the script mainly to build our own images. It’s not a guarantee to work on each and every SBC available on the market.

Anyway, you could try using the Zero 3 image. It might be booting on 2W as well as indicated by a user Image | Orange Pi Zero 2W · Issue #6827 · MichaIng/DietPi · GitHub

I have no problem anymore when I logged in manually and modified the interface name in /etc/network/interfaces. It now works OK on every reboot with end0.

What is the proper way to rename the interface to eth0 in dietpi debian bookworm? I tried ip link set end0 name eth0 which works, but is lost on reboot.

Seems adding to this /etc/udev/rules.d/70-persistent-net.rules works. not sure if it is proper thing to do, but now I have eth0 also on reboot…

So you added just
ip link set end0 name eth0
to
/etc/udev/rules.d/70-persistent-net.rules
?

SUBSYSTEM=="net", ACTION=="add", ATTR{address}=="XX:XX:XX:XX:XX:XX", NAME="eth0"

and I replaced XX…XX with my end0 mac of course…

actually this line is better, since it is independent of mac address, and works…

SUBSYSTEM=="net", ACTION=="add", KERNEL=="end*", NAME="eth0"

even

SUBSYSTEM=="net", ACTION=="add", KERNEL=="end0", NAME="eth0"

works.

1 Like

btw. here is the link to image generated by your script (still needs that modification for the end0 to eth0).

https://drive.google.com/file/d/1JofzTSD0_l7bj_2PjPEG9Aj8ife1ttCP/view?usp=sharing

using udev rule should be fine

This topic was automatically closed 178 days after the last reply. New replies are no longer allowed.