- Package:
- base-installer
- Source:
- base-installer
- Submitter:
- Phil Dibowitz
- Date:
- 2021-03-02 18:33:04 UTC
- Severity:
- normal
- Tags:
Dear Maintainer, When doing a network-install of a system, if one passes `hostname=foo` on the kernel commandline, the installer will use that to set the hostname of the installed system... EXCEPT if there's reverse-DNS for the IP address that we happen to have gotten from DHCP, in which case that takes precedence. But it shouldn't, we very explicitly are requesting a hostname to set. This situation happens in environments with dynamic dns where a client may have released an IP, the DHCP gave it out to this new client, but there's still a DNS cache with the old mapping. The installer should prefer the explicit preference set by the adminsitrator over the implicit one. Or, at the very least provide a configuration option to enable such a behavior.
Hello Phil,
Phil Dibowitz <phil@ipom.com> (2021-03-01):
In src:netcfg's templates[1]:
Template: netcfg/get_hostname
Type: string
Default: debian
# :sl1:
_Description: Hostname:
Please enter the hostname for this system.
.
The hostname is a single word that identifies your system to the network.
If you don't know what your hostname should be, consult your network
administrator. If you are setting up your own home network, you can make
something up here.
Template: netcfg/hostname
Type: string
Description: for internal use; can be preseeded
Hostname to set for the system; ignores names provided by DHCP or DNS.
1. https://salsa.debian.org/installer-team/netcfg/-/blob/master/debian/netcfg-common.templates
The preseed doc[2] suggests the former is behind the (bare) hostname
alias. Try setting the latter?
2. https://www.debian.org/releases/bullseye/amd64/apbs02.en.html#preseed-aliases
Cheers,
Am 2. März 2021 09:52:06 MEZ schrieb Cyril Brulebois <kibi@debian.org>: Yes, the installation-guide under https://www.debian.org/releases/bullseye/amd64/apbs04.en.html even explicitly states this, indeed: # If you want to force a hostname, regardless of what either the DHCP # server returns or what the reverse DNS entry for the IP is, uncomment # and adjust the following line. #d-i netcfg/hostname string somehost Holger Hi,
Thanks for pointing that out! Don't know how I missed that. However, that requires a per-host preseed, where as with kernel command line I can have the same preseed for all my hosts (or at least all hosts in a certain category) and simply just pass in a hostname in the tftpseed (which has to be host specific anyway and for me is already generated by my provisioning system). So perhaps it would be useful to have a like netcfg/hostname_priority flag where one can choose a priority order?
+1