Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

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.

share|improve this question

2 Answers 2

up vote 4 down vote accepted
+25

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
share|improve this answer
    
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.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.