Create /etc/resolv.conf in initramfs for tailscale client

On Debian systems, unless configured by something else, there isn't an
/etc/resolv.conf in the initramfs, which hinders DNS resolution.
Tailscale has its fallback DNS functionality, but that has problems [1]
in the corner-case situation of a Debian initramfs environment:

- no /etc/resolv.conf means tailscale (or golang?) attempts to use
  127.0.0.1 as a DNS resolver
- the loopback interface (lo) isn't brought up in the initramfs. linux
  sends the DNS traffic off-device (destined for 127.0.0.1)

Even with the Tailscale fix for that issue, it's a fallback and there's
a noticeable delay, so do the correct thing here and create
/etc/resolv.conf.

[1] https://github.com/tailscale/tailscale/issues/6110
This commit is contained in:
Paul Aurich
2023-05-03 19:43:14 -07:00
parent 166df1dd88
commit 564c3c3539
3 changed files with 51 additions and 1 deletions

7
debian/changelog vendored
View File

@@ -1,3 +1,10 @@
tailscale-initramfs (0.3) unstable; urgency=medium
* Configure resolv.conf in initramfs if it isn't already, so the tailscale
client can reach the control server more reliably.
-- Paul Aurich <paul@darkrain42.org> Wed, 03 May 2023 19:52:49 -0700
tailscale-initramfs (0.2) unstable; urgency=medium
* Keep trying to bring up the network until it either comes up or the boot