I have burned Raspbian stretch os image in the card and have installed all the software I need in pi. I have then cloned this same image into other raspberry pi devices which I have and thus all 5 Pi now have the same machine id in them.

Machine id can be accessed using sudo cat /etc/machine-id. The python script which run inside the pi uses the machine id. If its same in all the devices then its going to create problem.

Can I update the machine id and change it some other unique id. What exactly is the machine id and how can I change it.? Thanks

  • Why not try using the processor ID instead so it's tied to the hardware? Something like awk -F: '/Serial/{print $2}' /proc/cpuinfo or awk -F: '/Serial/{print $2}' /proc/cpuinfo | md5sum should get you started... Dec 6 '18 at 8:45
  • What exactly is the machine id .... try using manual pages in linux man machine-id Dec 6 '18 at 8:53

The machine-id is just generated on next boot if the file /etc/machine-id is empty. So simple do:

rpi ~$ sudo rm /etc/machine-id
rpi ~$ sudo touch /etc/machine-id

and reboot.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.