Coder Social home page Coder Social logo

Comments (9)

Andrei-Pozolotin avatar Andrei-Pozolotin commented on August 25, 2024
  1. RE: a lot of things around DNS resolution
  • Requires=systemd-resolved.service is used (historically) to help with initial setup / network config debug
  1. RE: the service keep running even after initrd
systemd-analyze dot systemd-resolved* | dot -T png > systemd-resolved.png

systemd-analyze dot initrd* | dot -T png > systemd-total.png

systemd-analyze dot --order initrd* | dot -T png > systemd-order.png

systemd-analyze dot --require initrd* | dot -T png > systemd-require.png

from mkinitcpio-systemd-tool.

ArchangeGabriel avatar ArchangeGabriel commented on August 25, 2024

Not sure if I was clear, but resolved is started during initrd, and never stopped. Anyway, here are the pictures.

systemd-order
systemd-require
systemd-resolved
systemd-total

from mkinitcpio-systemd-tool.

Andrei-Pozolotin avatar Andrei-Pozolotin commented on August 25, 2024

resolved is started during initrd, and never stopped

ok, then:

  • if you comment out Requires=systemd-resolved.service in initrd-network.service
  • is systemd-resolved.service still active after initrd?

from mkinitcpio-systemd-tool.

ArchangeGabriel avatar ArchangeGabriel commented on August 25, 2024

If I comment out this line, systemd-resolved is never started, and thus is not active after initrd (nor during it).

from mkinitcpio-systemd-tool.

Andrei-Pozolotin avatar Andrei-Pozolotin commented on August 25, 2024

ok, thinking

from mkinitcpio-systemd-tool.

Andrei-Pozolotin avatar Andrei-Pozolotin commented on August 25, 2024

please verify the following workaround:
https://www.freedesktop.org/software/systemd/man/systemd.unit.html#StopWhenUnneeded=

  1. create service overrides

/etc/systemd/system/systemd-networkd.service.d/override.conf

[Unit]
StopWhenUnneeded=yes

/etc/systemd/system/systemd-resolved.service.d/override.conf

[Unit]
StopWhenUnneeded=yes
  1. remove service autostart
systemctl disable systemd-networkd.service
systemctl disable systemd-resolved.service
  1. refresh service cache
systemctl daemon-reload
  1. perform image rebuild and system reboot
mkinitcpio -p linux
systemctl reboot
  1. confirm that both services are active during initrd and inactive during rootfs

from mkinitcpio-systemd-tool.

Andrei-Pozolotin avatar Andrei-Pozolotin commented on August 25, 2024

there seems no elegant way to make this any more simple,
so will treat this use case and the workaround as a "feature" not a "bug"

from mkinitcpio-systemd-tool.

MahouShoujoMivutilde avatar MahouShoujoMivutilde commented on August 25, 2024

The workaround works fine, thanks.

from mkinitcpio-systemd-tool.

ArchangeGabriel avatar ArchangeGabriel commented on August 25, 2024

Sorry for the long delay (for some reason both unbound and systemd-resolved were binding to :53 without issue, so my system happened to work even if I did not take care of this, but after recently upgrading with the tinyssh key changes I’ve remembered about this issue), but indeed the workaround works fine, and since I’m using systemd-networkd I’ve only add the override for systemd-resolved, and that was enough. Maybe this should be documented then?

from mkinitcpio-systemd-tool.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.