temp
5 September 2024 06:16
1
Creating a bug report/issue
I have searched the existing open and closed issues
Required Information
DietPi version | v9.7.1
Distro version | bookworm
Kernel version | Linux pihole 6.6.44-current-rockchip64 #1 SMP PREEMPT Sat Aug 3 06:54:42 UTC 2024 aarch64 GNU/Linux
Architecture | arm64
SBC model | NanoPi R5S/R5C (aarch64)
Power supply used | 5V 3A
SD card used | ineternal emmc
Additional Information (if applicable)
Steps to reproduce
Reboot system
always New changing Mac address
Expected behaviour
Actual behaviour
Extra details
@MichaIng Can you support
trendy
5 September 2024 08:08
2
Are you referring to mac address of the ethernet or wifi?
Where is the mac changing? For example what is the output of ip link
in every boot?
temp
5 September 2024 08:24
3
ethernet mac address
`1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN mode DEFAULT group default qlen 1000
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP mode DEFAULT group default qlen 1000
link/ether be:12:e5:f7:15:5c brd ff:ff:ff:ff:ff:ff
new boot
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN mode DEFAULT group default qlen 1000
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP mode DEFAULT group default qlen 1000
link/ether 02:51:bd:07:ad:05 brd ff:ff:ff:ff:ff:ff
`
maybe this could be an option to work around
opened 02:01AM - 21 Aug 23 UTC
Question
NanoPi R5S/R5C
NanoPi 6 series
### Creating a feature request
#### Is your feature request related to a prob… lem? Please describe:
I often find it useful to get a system very close to what I want on multiple systems and then use dd to clone the entire drive, then change a few settings like IP Addresses, Hostname, etc. (personality files as it were) to make a new system with similar functionality.
On DietPI (at least on NanoPi R6S and I admit it's hard for me to know whether this is hardware or software-related), this results in the MAC address(es) coming along for the ride (which is not desired). Booting a clean NanoPI installer allows me to see the original MAC address, but there's no documented way to stop the device from booting with the cloned address(es) (which is problematic in a number of ways).
#### Describe the solution you'd like:
Clear documentation of where and how the persistent MAC addresses for the interfaces are stored. A utility for restoring them to the hardware original addresses would be a bonus (for systems that have burned in addresses).
#### Describe alternatives you've considered:
I've tried multiple techniques to search the filesystem for the address without any luck.
#### Additional context
This particular set of NanoPI R6S units are being used as routers with two tagged (multiple VLAN) interfaces (internal LANs, Guest/DMZ LANs) and one external interface. Having duplicate MAC addresses hitting the ISP's upstream router for DHCP creates all kinds of (not) fun.
1 Like
temp
5 September 2024 09:06
5
So I don’t understand everything so what is the workaround?
This?
mkdir -p /etc/systemd/system/networking.service.d
echo -e '[Service]\nExecStartPre=/sbin/ip l set dev eth1 address XX:XX:XX:XX:XX:XX' > /etc/systemd/system/networking.service.d/set_mac.conf
yes, where XX:XX:XX:XX:XX:XX
would need to be replaced with a MAC you can choose.
Just to be sure: you did not have the problem initially, but only after the upgrade to DietPi v9.7 and the doing the kernel migration to Linux 6.6? Because I remember and based on the GitHub issue, this existed before .
I will open an issue at the FriendlyELEC kernel repository. There must be a prober fix within kernel sources, likely the device tree.
temp
5 September 2024 20:02
8
Yes, the issue occurred at me with the update to 9.7.1
The WAN port MAC remains static in your case, doesn’t it? At least on my R5S, it remains static, but LAN1 and LAN2 ports are dymaic.
temp
5 September 2024 21:18
10
Wan port remains static
Ethernet port (I only have one) doesn’t remain static…
Do I need to delete the work around if it’s solved? I just need to remind myself on this
1 Like
I have the same exact device and issue. I am planning to do a complete re-install of DietPi Is there a workaround instead? Thanks!
Thanks! Will this fix be implemented in the next update?
we are looking into another permanent solution, but no ETA yet. Therefore you can use the workaround and follow the related GitHub issue. NanoPi 5/6 | Set/change MAC address persistently · Issue #6565 · MichaIng/DietPi · GitHub
thanks! My apologies as I am not technically inclined and have a few more clarifications:
This fix will persist even after reboot?
This issue only affects this particular hardware(NanoPi R5)?
thanks again!
Actually clever is to just make the currently applied MAC address permanent:
iface='eth1'
mac=$(ip -br l | mawk -v "iface=$iface" '$1 == iface {print $3}')
sudo mkdir -p /etc/systemd/system/networking.service.d
echo -e "[Service]\nExecStartPre=/sbin/ip l set dev $iface address $mac" | sudo tee /etc/systemd/system/networking.service.d/set_mac.conf
I’ll implement something like this with DietPi v9.9.
system
Closed
7 April 2025 05:57
18
This topic was automatically closed 178 days after the last reply. New replies are no longer allowed.