!PSmBFWNKoXmlQBzUQf:helsinki-systems.de

Stage 1 systemd

84 Members
systemd in NixOs's stage 1, replacing the current bash tooling https://github.com/NixOS/nixpkgs/projects/5128 Servers

Load older messages


SenderMessageTime
7 Apr 2022
@janne.hess:helsinki-systems.de@janne.hess:helsinki-systems.debut yeah - it doesn‘t unmount /nix anymore15:49:05
@elvishjerricco:matrix.org@elvishjerricco:matrix.orgwe could do activation in a systemd-generator, or we could set default.target for stage 2 to an activation script that does a daemon-reload and starts the real default.target15:49:12
@elvishjerricco:matrix.org@elvishjerricco:matrix.orgI actually like those more than doing activation in stage 1 now that I think about it15:49:21
@elvishjerricco:matrix.org@elvishjerricco:matrix.orgparticularly the latter idea15:49:27
@janne.hess:helsinki-systems.de@janne.hess:helsinki-systems.defeel free to implement this :D 2 systemds are already painful enough for me15:49:45
@janne.hess:helsinki-systems.de@janne.hess:helsinki-systems.deArian: that also removes the ugly cmdline hack and gives us a proper init=15:52:13
@arianvp:matrix.orgArianWoha there is a mechanism for this15:52:26
@elvishjerricco:matrix.org@elvishjerricco:matrix.org?15:52:30
@arianvp:matrix.orgArianActivation script could be an https://www.freedesktop.org/software/systemd/man/systemd.environment-generator.html15:52:53
@arianvp:matrix.orgArianOh wait misreading I think15:53:27
@elvishjerricco:matrix.org@elvishjerricco:matrix.orgFirst I've heard of "environment generators", but yea I think that's just for setting environment variables15:55:22
@elvishjerricco:matrix.org@elvishjerricco:matrix.orgAs an aside, it seems like a poor design decision for there to be stuff in activation scripts that cares about special mount points existing. Seems like those should be systemd units that have appropriate RequiresMountsFor=, and then we could have the special mounts just in fstab15:57:13
@elvishjerricco:matrix.org@elvishjerricco:matrix.orgIf I had my way, I think activation would pretty much only be used for setting up /etc and refreshing systemd :P15:58:02
@janne.hess:helsinki-systems.de@janne.hess:helsinki-systems.deif stage-2-init.sh was just calling the activation script and systemd, I‘d be a lot happier as well16:00:02
@elvishjerricco:matrix.org@elvishjerricco:matrix.orgI wonder if it might be better to hold off on handover until we have a cleaner story for this. Like maybe systemd-initrd can come with a deprecation of activation scripts...16:03:13
@janne.hess:helsinki-systems.de@janne.hess:helsinki-systems.deI‘ve said this before and I will keep saying this: There is no way we will get rid of all activation scripts16:04:32
@elvishjerricco:matrix.org@elvishjerricco:matrix.orgwhy is that?16:05:06
@janne.hess:helsinki-systems.de@janne.hess:helsinki-systems.dethings I issume systemd wants: users/groups, /etc, /bin/sh, /usr/bin/env, all wrappers, /run/booted-system16:06:50
@elvishjerricco:matrix.org@elvishjerricco:matrix.orgSure, but I think we can cover the basics in an internal way, rather than providing an externally available API that's virtually always a bad idea16:07:31
@janne.hess:helsinki-systems.de@janne.hess:helsinki-systems.deI agree with that but I'm already so close to success that I don't want to stop right now16:15:15
@janne.hess:helsinki-systems.de@janne.hess:helsinki-systems.deIt may be a good idea in general, not just for stage 1, yeah16:15:29
@elvishjerricco:matrix.org@elvishjerricco:matrix.orgfair enough16:15:42
@janne.hess:helsinki-systems.de@janne.hess:helsinki-systems.dethat's probably why I don't have no udev database: https://github.com/systemd/systemd/blob/main/units/initrd-udevadm-cleanup-db.service16:33:53
@janne.hess:helsinki-systems.de@janne.hess:helsinki-systems.de * that's probably why I have no udev database: https://github.com/systemd/systemd/blob/main/units/initrd-udevadm-cleanup-db.service16:33:59
@janne.hess:helsinki-systems.de@janne.hess:helsinki-systems.de I found it \o/: https://github.com/systemd/systemd/issues/12953 16:37:47
@elvishjerricco:matrix.org@elvishjerricco:matrix.org

the data passed from initrd to host should be very very carefully picked, minimal and stable. Blanket passing the whole udev database over is the wrong approach.

Hmm... That sounds problematic considering that issue is still open

17:05:01
@elvishjerricco:matrix.org@elvishjerricco:matrix.orgI wonder if we need something like this from the old initrd https://github.com/NixOS/nixpkgs/blob/master/nixos/modules/system/boot/stage-1-init.sh#L58817:09:17
@janne.hess:helsinki-systems.de@janne.hess:helsinki-systems.dewe will probably need that for iso booting, yes17:37:51
@janne.hess:helsinki-systems.de@janne.hess:helsinki-systems.dehmm do we maybe need to trigger&&settle udev agian in stage 2? 17:40:50
@elvishjerricco:matrix.org@elvishjerricco:matrix.org Well I noticed we don't do --cleanup-db in the old initrd I don't think 17:48:02

There are no newer messages yet.


Back to Room ListRoom Version: 6