I use a pxe install for a lab of machines, one problem I have is that the hostname is always set to 'ubuntu'. This is wrong, it should instead ask during the install what hostname should be used.

One hack was to set the hostname file at the end of the preseed, in the script section. But this still doesn't ask the installer.


In your preseed file,

# Any hostname and domain names assigned by dhcp take precedence
# over values set here. However, setting them prevent the questions
# from being shown

d-i     netcfg/get_hostname     string hostname
d-i     netcfg/get_domain       string domain
  • Are you asking me to add that to the preseed file, remove it? comment it out? (I do see now that the right way to do it is to use the dns for static machines and ask for non-static machines) – Martin Owens -doctormo- Aug 16 '11 at 18:49

I let the preseed go fetch the hostname from a webserver. Usually its just "newbox-xxx" where xxx is a random number. The PHP script on the webserver decides. This helps in automation because I can install cluster nodes easily if I know they are about to come online. Then the whole preseed comes to life if its a specialty box. For instance, I don't do much on a box named newbox-xxx but if its called hc4-xxx (hadoop cluster #4 - node xxx) then I know to allow the preseed to do customizations and then register itself with the cloudera manager.

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.