On Mon, Apr 29, 2024 at 9:16 AM Justin Brown <Justin.Brown@xxxxxxxxxxxx> 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