[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#1034062: netcfg prompts for hostname even though preseeded, preventing unattended installation



Hallo Cyril,

Am 08.04.23 um 14:53 schrieb Cyril Brulebois:
Oliver Freyermuth <freyermuth@physik.uni-bonn.de> (2023-04-08):
I concur that the question is where to go from here — my real-world
use case is using Foreman [0] for machine deployment, which currently
passes "hostname" exclusively in its preseed/PXE templates. If the
decision is to drop support for the hostname alias, deployment
software like this one will of course need to be adapted (considering
the alternatives, that is certainly a viable option).

Thanks for bringing this topic up. I'm not sure whether that triggered
Andi's looking into it, but there's a patch available in #1031643, and
netboot(-gtk) build artifacts with patched preseed binaries available
for a limited time at:
   https://people.debian.org/~kibi/bug-1031643/

That's entirely untested (by me), Salvatore might test that later on.

I can build an amd64 netinst image if that's easier for you to test and
confirm with.

thanks!

The patched preseed binaries are in fact ideal for testing on my end: Foreman usually downloads kernel and initrd from the upstream source,
and takes care of all the parts which may be different for the local environment (PXE/bootloader/Preseed/Kickstart/Autoyast...) itself.
So I just replaced the linux and initrd.gz which Foreman downloaded with the linux and initrd.gz from the patched source,
and re-tried, with no other changes to Foreman, i.e. it was still using the hostname alias only on the kernel command line.

I can confirm that the question is not shown anymore, and installation proceeds unattendedly, so the patched versions test fine on my end :-).
During installation, when switching to a tty and running "hostname -f", I see the FQDN assigned via the hostname parameter, as expected.

Then of course we also need to test what happens without the "hostname=" paraemter on the kernel commandline.
I removed it, re-tried, and the question was shown again, so that also seems to work as expected.

Interestingky, without the "hostname=" parameter, running hostname on a tty (while the question is shown) echoes:

  ~ # hostname
  ?

However, that "question mark hostname" is also shown when doing this with Bullseye, so that seems to be expected behaviour.

I'll hold back on upstreaming this change to Foreman until a decision
on how to proceed with #1031643 is made.

Thanks again for mentioning it, that definitely shifted the balance (at
least for me) in the “let's try and restore the feature” direction.

Seeing the unintrusiveness of the patch, and taking into account that adapting existing deployment software can be avoided (there's certainly much more affected tooling out there),
that feels like a good approach to me, too.

Cheers,
Oliver


Reply to: