Sample Header Ad - 728x90

Get the same UUID on different Linux distributions

3 votes
3 answers
9567 views
# dmidecode --string system-uuid I'm using the code above get the UUID on each host in my environment. As far as I understand the UUID should not change between different Linux distributions on the same host with the same hardware configuration. But after some tests on different Linux distributions I encountered different uuid with this same command. It seems that older dmidecode version will get different UUID result. For example dmidecode 2.9 from SLES11.2 result with string A and dmidecode 2.12 from Debian 8 result with string B. How can I get the same uuid no matter the Linux distribution I deploy on my machine? **Additional information:** I wanted to use dmidecode and not MAC address as UUID because i saw that if I replace my network adapter or some other hardware's settings the UUID will not change. What I need is some unique identifier that I can have on my machine to identify it across minor hardware changes and different OS. Using dmidecode cannot be fake in some level I guess instead of just generating UUID and writing it to a file and using it. I'm working with VMware and machine clones are often used and that's why I need something that will not be replicated with the clone.
Asked by Asaf Magen (547 rep)
Jun 22, 2015, 12:15 PM
Last activity: Dec 30, 2024, 03:58 PM