Debian "Golden Image" approach - Are MAC addresses unique?

Hi,

I am currently experiencing some an Issue where I think that some devices deployed in the field can’t register with Mender because they all have the same MAC address.

Unfortunately, I am not sure what approach the HW manufacturer used:

  1. Flashing the Mender Image to all SD Cards or
  2. Flashing the Mender Image to one SD Card and then cloning this SD Card to all other Cards.

But independent of this I am trying to understand if this is a common problem with taking the “Golden Image” approach when using Debian with mender or if this is something that went wrong on my side.

There seem to be some people on the internet that have found similar issues (Reddit Thread)

The image I used is a fairly new (2-3 month old) Raspbian Buster Minimal.

Is there any documentation available on how raspbian/debian “caches” mac addresses? Is it more “safe” to use mender with the CPU ID instead of the MAC address (Though I heard that the MAC address is just derived from the CPU ID)?

Any help would be greatly appreciated.

A lot of embedded boards embed the Mac Address in a couple of efuses in the CPU, which uboot and the kernel uses with the correct board support added. As it seems that you are using raspberry pi’s can you bench test a couple of Pi’s to replicate the problem seen in the Reddit Thread?

As a general rule for my own products I don’t use just the mac address as the sole piece of information for the mender device identity to avoid situations like this as my boards also have unique serials numbers embedded in the efuses exposed in user-space under /sys/fsl_otp. On the pi’s i’m not sure what unique info you have available sorry

looks like some people use

cat /proc/cpuinfo |grep Serial|cut -d' ' -f2

If you have an eMMC you can also use something like this,

cat /sys/class/mmc_host/mmc0/mmc0\:0001/cid

We have made some updates to our docs which now include a couple more examples,

https://docs.mender.io/hosted/client-configuration/identity

1 Like