Changing hostid under Solaris 8
Sometimes you may need to change a machine's hostid
or MAC address temporarily (for example, due to a hardware failure of a machine where a licensed product is installed).
To change the hostid, usually it's sufficient (and very easy) to use the hid ( or hid2 ) programs, which change the hostid of the running kernel. See the excellent Sun NVRAM/hostid FAQ at http://www.squirrel.com for more details.
However hid2 doesn't seem to work on Solaris 8, and anyway sometimes the licensing software (Veritas Volume Manager is one example) actually makes a call to see the contents of the PROM, rather than looking at the hostid in the kernel, so you will need to modify the hostid in the PROM.
- Download the
hid_solaris2
binary from http://yenigul.net/change_hostid. If you want to compile the code yourself you can download it from http://yenigul.net/change_hostid/hid-1.7.4.tar.gz. - Save the original
hostid
to somewhere:# hostid > /etc/hostid_orig
- Set permissions on the
hid_solaris2
(assuming the binary is under /var/tmp)# chmod 0755 /var/tmp/hid_solaris2
- To set the new
hostid
(i.e: 84abe39d) issue the following command:# /var/tmp/hid_solaris2 84abe39d | sh physmem 2e694 hw_serial: 0x32323130 = 0x32323235 hw_serial+4: 0x39313931 = 0x38353734 hw_serial+8: 0x36390000 = 0x33370000
- The new
hostid
will be active until next reboot. To make the change persistent across reboots create a solaris startup scripts.