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

**URL:** <https://hub.mender.io/t/debian-golden-image-approach-are-mac-addresses-unique/2159>\
**Category:** General Discussions\
**Created:** [July 7, 2020, 5:21am UTC](https://hub.mender.io/t/debian-golden-image-approach-are-mac-addresses-unique/2159 "2020-07-07T05:21:29Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![c3ntry](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/c3ntry/32/677_2.png) [@c3ntry](https://hub.mender.io/u/c3ntry)\
**Post date:** [July 7, 2020, 5:21am UTC](https://hub.mender.io/t/debian-golden-image-approach-are-mac-addresses-unique/2159/1 "2020-07-07T05:21:29Z")

</div>

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](https://www.reddit.com/r/raspberry_pi/comments/ebapu0/psa_in_raspbian_mac_addresses_are_set_on_first/))

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.

---

<div class="post-metadata">

**Author:** ![dellgreen](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/dellgreen/32/85_2.png) [@dellgreen](https://hub.mender.io/u/dellgreen)\
**Post date:** [July 7, 2020, 10:17am UTC](https://hub.mender.io/t/debian-golden-image-approach-are-mac-addresses-unique/2159/2 "2020-07-07T10:17:42Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![dellgreen](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/dellgreen/32/85_2.png) [@dellgreen](https://hub.mender.io/u/dellgreen)\
**Post date:** [July 7, 2020, 10:21am UTC](https://hub.mender.io/t/debian-golden-image-approach-are-mac-addresses-unique/2159/3 "2020-07-07T10:21:46Z")

</div>

looks like some people use

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

```

---

<div class="post-metadata">

**Author:** ![mirzak](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/mirzak/32/2056_2.png) [@mirzak](https://hub.mender.io/u/mirzak)\
**Post date:** [July 28, 2020, 11:36am UTC](https://hub.mender.io/t/debian-golden-image-approach-are-mac-addresses-unique/2159/4 "2020-07-28T11:36:52Z")

</div>

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

```auto
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](https://docs.mender.io/hosted/client-configuration/identity)
