[baylisa] Re: wtf: hostid gives '0' as a hostid

Asheesh Laroia asheesh at asheesh.org
Mon Feb 18 12:22:26 PST 2008


On Mon, 18 Feb 2008, Robi wrote:

> Nice discussion. dmidecode | grep UUID should be a good provide a good 
> unique id for similar hardware, and if it's very disimilar, then it's a 
> good idea to hash it with something else to generate the final ID. Since 
> there's a possibility of generating 2 of the same IDs if the UUID is 
> somehow blank for 2 machines, adding a temporal factor to the hash will 
> alleviate that (time of hash with ms).

My laptop says:

 	UUID: Not Settable

My suggestion would be, if you want to go totally nuts, dmidecode | 
md5sum.  So long as the hardware doesn't change, that'd be a pretty good 
reference point.  (Bonus points for grep -v'ing out the RAM or a few other 
volatile parts, I suppose.)

If you dmidecode | hash_function > /etc/hostid once, when the machine is 
installed, that seems pretty good to me.

-- Asheesh.

-- 
Life is the childhood of our immortality.
 		-- Goethe



More information about the Baylisa mailing list