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

Bug#1031643: marked as done (preseeding hostname=foo via the kernel command line seems to be ignored)



Your message dated Mon, 10 Apr 2023 00:03:52 +0000
with message-id <E1plf0i-003hYF-TE@fasolo.debian.org>
and subject line Bug#1031643: fixed in preseed 1.115
has caused the Debian Bug report #1031643,
regarding preseeding hostname=foo via the kernel command line seems to be ignored
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact owner@bugs.debian.org
immediately.)


-- 
1031643: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1031643
Debian Bug Tracking System
Contact owner@bugs.debian.org with problems
--- Begin Message ---
Package: preseed
Version: 1.113
Severity: normal
X-Debbugs-Cc: Salvatore Bonaccorso <carnil@debian.org>

Filing this against preseed for visibility, after Salvatore Bonaccorso
reported that D-I Bookworm Alpha 1 was dealing with preseeding
hostname=foo just fine, and that it's no longer the case with D-I
Bookworm Alpha 2: the hostname question is asked, with either the
default value (“debian”) or a value determined from the DHCP hostname
(if any).

The relevant code didn't change on the installer side, but Linux
mainline got a relevant commit: 5a704629f2 (first released in v6.0-rc1):
  https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=5a704629f2c1ba33bbb444cb18e6957e97c76e8f

At first glance, a side effect is that the kernel seems to “eat” the
hostname=foo parameter instead of leaving it alone as it did in earlier
versions, possibly hiding it from the installer:

  -Unknown kernel command line parameters "--- BOOT_IMAGE=/install.amd/vmlinuz vga=788 hostname=miaou", will be passed to userspace
  +Unknown kernel command line parameters "--- BOOT_IMAGE=/install.amd/vmlinuz vga=788", will be passed to userspace

<red herring>
Now, parameters might be added before or after the '---' marker, and
moving hostname=foo from after to before this marker makes this issue go
away.

Checking the story behind that marker, i.e. debian-installer-utils
version 1.109 first published in jessie to fix #762007, I'm not sure
what to think about it… A cursory look at it suggests parameters found
after that marker should be visible to both the installer and the
kernel, but that's not the case here.

Looking at the user-space side, I'm still seeing “hostname=foo” at the
end of /proc/cmdline, but calling user-params only returns “quiet”, and
that's the case for both D-I Bookworm Alpha 1 and Alpha 2. Both images
have the same /etc/preseed_aliases, which dictates what user-params
does.
</red herring>

Adding DEBCONF_DEBUG=developer on the kernel command line, searching for
lines with “cdebconf” and “hostname”, the big difference is that line,
only in Alpha 1:

  debconf: Adding [ID] -> [netcfg/get_hostname]

It happens early in the boot process (at start-up), and that comes from
debconf's question_variable_add() function. Right after that, there's an
extra “frontend” line (not “cdebconf” this time) marking that question
as seen, which means the hostname prompt is skipped down the line.

Why the difference? The actual consequence of the Linux change is not in
/proc/cmdline or user-params or preseed, it's just just about early
start-up: /init is run without hostname=foo in its environment, which
explains why the debconf preseeding is no longer happening.


I'm not sure where to go from here though. Compensate for this change by
adding a special case for this parameter in env2debconf? The existing
code seems unfriendly enough as it is… maybe implement /proc/cmdline
lookup from netcfg instead? Not doing anything? All three options seem
suboptimal to me…


Cheers,
-- 
Cyril Brulebois -- Debian Consultant @ DEBAMAX -- https://debamax.com/

--- End Message ---
--- Begin Message ---
Source: preseed
Source-Version: 1.115
Done: Cyril Brulebois <kibi@debian.org>

We believe that the bug you reported is fixed in the latest version of
preseed, which is due to be installed in the Debian FTP archive.

A summary of the changes between this version and the previous one is
attached.

Thank you for reporting the bug, which will now be closed.  If you
have further comments please address them to 1031643@bugs.debian.org,
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Cyril Brulebois <kibi@debian.org> (supplier of updated preseed package)

(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing ftpmaster@ftp-master.debian.org)


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512

Format: 1.8
Date: Mon, 10 Apr 2023 01:44:37 +0200
Source: preseed
Architecture: source
Version: 1.115
Distribution: unstable
Urgency: medium
Maintainer: Debian Install System Team <debian-boot@lists.debian.org>
Changed-By: Cyril Brulebois <kibi@debian.org>
Closes: 1031643 1034062
Changes:
 preseed (1.115) unstable; urgency=medium
 .
   [ Andreas B. Mundt ]
   * env2debconf: if hostname is set, propagate it to restore support for
     the hostname alias (Closes: #1031643, #1034062).
Checksums-Sha1:
 a25c6b07553b17f75c20ffc0ff53f8aed9665a52 1887 preseed_1.115.dsc
 a1b29f71cbdf8ac968309fc5a78c2fb346ad27b1 87188 preseed_1.115.tar.xz
 b55f8b0bc6c346c5a8c1fc4b17f1af4b0e19c116 6407 preseed_1.115_source.buildinfo
Checksums-Sha256:
 b3592d17494b877af8ab89a6cf2c3e932f5a8c599d371ed358e31b17036938c8 1887 preseed_1.115.dsc
 3dbf273ecce5e454edbf701b1efcf0bf8597acb87e868d436110f74144e83377 87188 preseed_1.115.tar.xz
 e8026aaf4ff7730502dd2aa93fdac23fb01a5bf37cc4057c16a1dc6db7c3404e 6407 preseed_1.115_source.buildinfo
Files:
 3aab9665350c4f373714b6d51f7308e0 1887 debian-installer optional preseed_1.115.dsc
 7743563f6b4553a9c25da4070edb2fce 87188 debian-installer optional preseed_1.115.tar.xz
 e7ff44937616a78571060548fdc66a7b 6407 debian-installer optional preseed_1.115_source.buildinfo

-----BEGIN PGP SIGNATURE-----

iQJEBAEBCgAuFiEEtg6/KYRFPHDXTPR4/5FK8MKzVSAFAmQzThUQHGtpYmlAZGVi
aWFuLm9yZwAKCRD/kUrwwrNVIPy0D/9q5X9bDtCXPOxWgyJCX7kJ4WayTqYdLkGb
RXs5HoTuOno+sNKMEKxoGts5ngRO1kRXpIIsmDmz3ENlLZp4CpJdGkOJOJy8MjFH
7r+XeyG1hoYXZvzVbRE5pz9pl3l0hEXVMnE2K6/Pxg0EIwFbKwC+vGc9NUkfDo+m
TLB6GHpVygT9laDFnu5aqczng7aqE11/rKPGF0AlhzVKbWJM5ByiVCWyJoi3WtVF
KLOIzJMRNN2PHg35K/r3IlAQvS5fQCp2BY/9ic8RZKnw6wVBKFuz/r5lxAZXlRYs
7P3vFcfcfBIlrBn45YzKyQJwQ/ZioDd9+VxHiN5jJElNq4Q0Bms2AbJ+xcc0iAc0
9zR+sdCCiR+PndYm1/61AU5mEm6mYSIBbe9kfl51unyJ9gi/sCQ1kaGKr3oJ6cUi
qj95LtcSEq+FvV73Zt9dQ9SyALBGvYML39WfWdG22vlvz0jbqtbgj+qKY5Gd7+LF
QC8ycoVzAREaRzD1+Vd92Y7cA5lcNz9NlnWPaD46vCltkZirOR6+gbn8nYSq9Crx
Msl72vcbxGkQ+j04Ro6UoIrdpUfdOwvJ+qzMnB4EzzkmDN2iKge0oNkLtcUJ6lSy
M7qJEKcMkDcnMGhK+2jmAXq50TV5G7yudrVgfGqbm25QGcdDxcmyBYUJ7IOygNy/
w3Hr4aZjlQ==
=NdpT
-----END PGP SIGNATURE-----

--- End Message ---

Reply to: