← Back to context

Comment by megous

3 months ago

Ok, try to go off the well trodden path of a default systemd setup.

Eg. make your system "login interactive" before networking and other unneeded services (database, web server, whatever) are even attempted to be set up/started.

Use just drop-in configuration fragments (*.service.d/override.conf) without making an unmaintainable mess (ie. without making your own copies of whole, OS installed unit files).

That should get you the feel. :) And it's not something crazy, it's just basic re-ordering of dependencies.

Its not that hard, just a matter of reading the systemd documentation and learning about default dependencies: https://github.com/lukasstraub2/systemd-delay-services

Indeed, nothing crazy.

  • But all I want is to not have login prompt processes (getty) wait for seemingly unrelated things, and start as soon as possible.

    In a friendly system, I'd just edit the getty service config and change After/Before/whatnot and be reasonably confident I didn't break anything. But

    1) it's not possible, you can't just override After/Before alone.

    2) systemd doesn't make it easy to inspect existing relationships in a simple to understand, localized manner in the first place. So unless you're the one that wrote all units in the system, getting a concept of what you'll possibly break by changing things is almost impossible, without just rebooting and seeing if the system will start up.

    You can create a massive SVG of dependencies from systemd-analyze, but that's really not that helpful. It's a picture that has at least 10 meters on one side. :D