[systemd-devel] MulticastDNS Responder Hostname in Early Boot

Mantas Mikulėnas grawity at gmail.com
Mon Apr 29 11:29:08 UTC 2024


On Mon, Apr 29, 2024 at 9:16 AM Justin Brown <Justin.Brown at fandingo.org>
wrote:

> Hello,
>
> I'm having some trouble the resolved as a multicast DNS responder in early
> boot. I'm trying to setup a headless system with full disk encryption, and
> I need to connect remotely (currently using tinyssh) to unlock sysroot and
> other volumes before the boot continues. I use networkd to setup the dhcp
> interface, which works fine. The problem is that resolved won't use the
> value in /etc/hostname, and I can't find a resolved or networkd option to
> specify a hostname.
>

Does your initramfs actually contain /etc/hostname? resolved will use the
value that's been set as the *kernel* hostname.

Usually the loading of /etc/hostname into the kernel hostname is done by
systemd, and if it hasn't done so then I'm guessing the file is not part of
the initrd...

(But you can use "/bin/hostname -f" or "sysctl kernel.hostname" or "echo
testvm > /proc/sys/kernel/hostname" or pass "systemd.hostname=testvm" as a
kernel command line option to achieve the same thing.)

-- 
Mantas Mikulėnas
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/systemd-devel/attachments/20240429/73a39da9/attachment.htm>


More information about the systemd-devel mailing list