Does a Mender image change the RPi Serial Number?

I have a golden Debian image and a Mender converted image (based on the golden Debian one).
In my testing I noted that the serial number reported on the terminal are different for the same Pi (specifically a Pi Zero W).

It doesn’t make sense to me but my assumption is the Serial number field cannot be edited. Perhaps the serial number field is not a static value. Can anyone explain why the serial number would be different based on using a Debian image vs a Mender converted image? Also is there a way to ‘disable’ or prevent this from happening.

From Mender converted image

pi@raspberrypi:~ $ cat /proc/cpuinfo
processor       : 0
model name      : ARMv6-compatible processor rev 7 (v6l)
BogoMIPS        : 697.95
Features        : half thumb fastmult vfp edsp java tls 
CPU implementer : 0x41
CPU architecture: 7
CPU variant     : 0x0
CPU part        : 0xb76
CPU revision    : 7

Hardware        : BCM2835
Revision        : 9000c1
Serial          : 00000000b802b645
Model           : Raspberry Pi Zero W Rev 1.1

From golden Debian based image without Mender

pi@raspberrypi:~ $ cat /proc/cpuinfo
processor       : 0
model name      : ARMv6-compatible processor rev 7 (v6l)
BogoMIPS        : 697.95
Features        : half thumb fastmult vfp edsp java tls 
CPU implementer : 0x41
CPU architecture: 7
CPU variant     : 0x0
CPU part        : 0xb76
CPU revision    : 7

Hardware        : BCM2835
Revision        : 9000c1
Serial          : 00000000fc9474b4
Model           : Raspberry Pi Zero W Rev 1.1

Thanks and Happy New Year!

I don’t know much about Pi, but I would first check the contents of the serial number OTP register in the SOC to see what that value is.

https://www.raspberrypi.org/documentation/hardware/raspberrypi/otpbits.md

So the serial register dump you suggested (from the Mender image) matches the serial number on the standard Debian image. I guess I’ll find a way to retrieve this value in my program to identify the device and not use /proc/cpuinfo. I was worried when I saw the serial number change between version :wink:

Thanks!

awesome, it does beg the question, what mender-convert is doing/not-doing that’s causing the kernel to not use the SOC serial number. It might worth double checking your mender-convert configuration and documentation, to ensure that you are using the necessary configs and overlays required for a raspberry-pi conversion (they may add extra kernel parameters for example)