the question is related to disk clonning. if it is misfit for this form then please pardon me.
i work on a utility which gives an unique id to the host. it generates an UUID and stores it in /etc.
now the problem is that if the system is cloned (disk cloning) and the image is used to setup a new host then the utility doesn't generate a new UUID as the UUID is already present in /etc.
somehow the utility should know that it is now running in a cloned environment and generate a new UUID.
initially i thought of storing a combination of IP address and MAC address. but what if someone adds a new network card or changes existing network card or the ip changes in case of DHCP.
so is there some unique id or info for an OS which i can rely on?
for eg. in case of windows platform, by checking the windows SID (http://www.pluralsight.com/wiki/default.aspx/Keith.GuideBook/WhatIsASID.html) for a user/group it can get the unique machine id. the SID in case of windows is based on a unique 32-bit machine id. when a windows OS is cloned the new OS instance gets a new SID by running sysprep utility. all disk cloning products take care of running sysprep. my utility can check the SID to know if its running in a cloned environment.
on UNIX i am looking for some info like above for me to rely on.
i checked hostid command but its based on IP address...
i am trying to get info on the 'post-cloning operations on UNIX'. if anyone has pointers on that then please share.
i know that now a days devices are assigned UUID but i cant rely on them as they are replaceable.
any help is appreciated.
Thanks,
mrc
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
both commands work in linux, look specifcally for the BIOS MainBoard Serial number, this will always be unique, especially if you use OEM hardware (Dell, HP, Gateway, IBM, Intel etc.)
If your doing this in windows then try looking into Windows WMI BIOS stuff, I use AutoIT to pull this stuff out of the machine in Windows works like a charm.
Hope this helps.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi,
the question is related to disk clonning. if it is misfit for this form then please pardon me.
i work on a utility which gives an unique id to the host. it generates an UUID and stores it in /etc.
now the problem is that if the system is cloned (disk cloning) and the image is used to setup a new host then the utility doesn't generate a new UUID as the UUID is already present in /etc.
somehow the utility should know that it is now running in a cloned environment and generate a new UUID.
initially i thought of storing a combination of IP address and MAC address. but what if someone adds a new network card or changes existing network card or the ip changes in case of DHCP.
so is there some unique id or info for an OS which i can rely on?
for eg. in case of windows platform, by checking the windows SID (http://www.pluralsight.com/wiki/default.aspx/Keith.GuideBook/WhatIsASID.html) for a user/group it can get the unique machine id. the SID in case of windows is based on a unique 32-bit machine id. when a windows OS is cloned the new OS instance gets a new SID by running sysprep utility. all disk cloning products take care of running sysprep. my utility can check the SID to know if its running in a cloned environment.
on UNIX i am looking for some info like above for me to rely on.
i checked hostid command but its based on IP address...
i am trying to get info on the 'post-cloning operations on UNIX'. if anyone has pointers on that then please share.
i know that now a days devices are assigned UUID but i cant rely on them as they are replaceable.
any help is appreciated.
Thanks,
mrc
IMHO, if the unique ID is saved in the harddisk, it can be cloned, which means, nothing is unique.
use somethig like:
dmidecode
hwinfo
both commands work in linux, look specifcally for the BIOS MainBoard Serial number, this will always be unique, especially if you use OEM hardware (Dell, HP, Gateway, IBM, Intel etc.)
If your doing this in windows then try looking into Windows WMI BIOS stuff, I use AutoIT to pull this stuff out of the machine in Windows works like a charm.
Hope this helps.
Yes, actually from Clonezilla live 1.2.1-6 (now in testing branch) dmidecode and lshw were used to save hardware info in the image dir:
http://free.nchc.org.tw/clonezilla-live/testing/ChangeLog-Clonezilla-live.txt