Bug#772523: preseeding get_domain using DHCP is broken
(sorry, accidental Ctrl+Enter...)
With Bookworm, it totally broke.
If the preseeding happens after netcfg (url=...), when setting the
hostname from the kernel parameters, d-i keeps it, but does not get the
domain from DHCP as before; only setting both a hostname and a domain
name makes things work (but now keeps the domain from the kernel
parameters, which may be more appropriate).
If the preseeding happens before netcfg (file=...), whatever hostname
and/or domain is set in the kernel paramaters, and whatever domain the
DHCP sends, d-i uses the values from the preseed file
(unassigned-hostname and unassigned-domain).
So, currently, the only way to make things work with an installation
medium, is to unset both netcfg/get_hostname and netcfg/get_domain in
the preseed file, and set hostname and domain in the kernel parameters.
(for convenience, I attached a text file in markdown format with the
results of these tests).
This is a big change from the behavior of previous netcfg versions (I
use preseeding since Wheezy, both with PXE or installation media), and
this new behavior makes things more complicated: before, we just
configured bogus values in the preseed file, and if the machine was not
registered in the DNS but the DHCP provided a valid domain name,
specifying a hostname in the kernel parameters was sufficient. Now, we
have to specify both the hostname and the domain name in the kernel
command line (think of non-QWERTY keyboards...), and this makes me
consider this a severe regression.
It also partly contradicts the various documentations (like the ones
mentioned above).
I sincerely hope this will be fixed in a forthcoming point release.
Feel free to ask me if you need to test stuff, I have a suitable
environment to test preseeding for both PXE or installation media.
Best regards,
--
Raphaël Halimi
Bullseye
========
netcfg before preseed (url=...)
--------------------------------
### cmdline: none
hostname=debian, no domain name
### cmdline: hostname=
hostname from cmdline, domain from DHCP
### cmdline: hostname=, domain=
hostname from cmdline, domain from DHCP (different from cmdline)
preseed before netcfg (file=...)
--------------------------------
### cmdline: none
hostname and domain from preseed file (unassigned-hostname, unassigned-domain)
### cmdline: hostname=
hostname from cmdline, domain from DHCP
### cmdline: hostname=, domain=
hostname from cmdline, domain from DHCP (different from cmdline)
Bookworm
========
netcfg before preseed (url=...)
--------------------------------
### cmdline: none
hostname=debian, no domain name
### cmdline: hostname=
hostname from cmdline, no domain
### cmdline: hostname=, domain=
hostname and domain from cmdline
preseed before netcfg (file=...)
--------------------------------
### cmdline: none
hostname and domain from preseed file (unassigned-hostname, unassigned-domain)
### cmdline: hostname=
hostname and domain from preseed file (unassigned-hostname, unassigned-domain)
### cmdline: hostname=, domain=
hostname and domain from preseed file (unassigned-hostname, unassigned-domain)
Reply to: