systemd: network: Add a note about temporary static resolv.conf for the chroot environment

I still think this is obvious but it seems some people are surprised by
"unknown host" in chroot.  Let's just note it before they propose a
change for every BLFS package of which the build process requires an
Internet connection.
This commit is contained in:
Xi Ruoyao
2025-07-20 00:55:31 +08:00
parent 8395c1c69b
commit 91a62d09e5

View File

@@ -213,6 +213,21 @@ EOF</userinput></screen>
<filename>/run/systemd/resolve/stub-resolv.conf</filename>. So it's <filename>/run/systemd/resolve/stub-resolv.conf</filename>. So it's
unnecessary to create a <filename>/etc/resolv.conf</filename> unnecessary to create a <filename>/etc/resolv.conf</filename>
manually.</para> manually.</para>
<note>
<para>
If you want to use <command>systemd-resolved</command> for the
LFS system but you need to access the Internet in the chroot
environment (for example, for building a BLFS package of which the
build process requires an Internet connection), create the
<filename>/etc/resolv.conf</filename> file following the
static configuration below for the chroot environment so the name
resolution will work in the chroot environment. When you exit
the chroot environment, remove it so
<command>systemd-resolved</command> will create the symlink on
boot.
</para>
</note>
<!--Create a <!--Create a
symlink in <filename>/etc</filename> to use the generated file:</para> symlink in <filename>/etc</filename> to use the generated file:</para>