Same mac address on each device

Hello, I have a problem with starting mender. I have installed the Bullseye image of mender on a Raspberry pi 4. Now I have the problem that I have the same mac address on all devices. The mac address is always the one from the first boot. How can I make sure that the mac addresses are not the same? The wrong mac address is also shown under /sys/class/net/eth0/address. The correct mac address is entered under /proc/cmdline. Unfortunately I can’t get any further and hope someone can help me.

Hi there,

How are you distributing this image? Did you deploy on one Pi 4 and then use the SD card from that one to create an image for the rest?

Hi, yes, that’s exactly how I tried it. But I also have the same Mac address if I don’t clone the sd card. If I use the same SD card in different Pi’s they also have the same Mac address.

Yep, that’s a behaviour that’s been around for quite a few years now on Raspberry Pi devices. Your best bet is to make an image via mender-convert and deploy the image you make through that onto your devices.

Thank you very much in advance. I tried to convert a bullseye image with mender-convert and now I have the error that the pi cannot boot. When booting I get the message BusyBox v1.35.0. do you have an idea what I am doing wrong?

Unfortunately I don’t believe bullseye or later is supported (yet). The latest you can get through mender-convert is a 32 bit Buster image, which might not be ideal depending on your use case. We personally pivoted from a Raspberry Pi distribution to something built from Yocto earlier this year so there might be workarounds i’m not aware of

I did a Mender integration without U-Boot. This might be the root cause why I never run into the issue of having “sticky” MAC addresses.

Hello,
I was able to solve the problem with the stick mac address.
uboot seems to fix the mac address with fw_setenv ethaddr or fw_setenv usbethaddr at the first boot. I checked it with fw_printenv. To solve the problem i just deleted these variables before cloning.

I hope I could help you!

1 Like