!PSmBFWNKoXmlQBzUQf:helsinki-systems.de

Stage 1 systemd

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

Load older messages


SenderMessageTime
28 May 2023
@elvishjerricco:matrix.orgElvishJerricco We use x-initrd.mount so the host's file systems are in initrd-fs.target 21:24:27
@lily:lily.flowers@lily:lily.flowers I use initrd-root-device.target and initrd-root-fs.target and sysroot.mount for ordering 21:27:03
@lily:lily.flowers@lily:lily.flowersBut that won't work until systemd v254 because my PR wasn't backported to 25321:27:23
@lily:lily.flowers@lily:lily.flowersNot for nixos21:27:26
@lily:lily.flowers@lily:lily.flowers Unless we start setting root= on the cmdlin0 21:27:36
@lily:lily.flowers@lily:lily.flowers* Unless we start setting `root=` on the cmdline21:27:41
@winterqt:nixos.devWinter (she/her)maybe I should just move back to sh initrd21:27:46
@winterqt:nixos.devWinter (she/her)running into weird issues with systemd initrd :/21:27:54
@lily:lily.flowers@lily:lily.flowersSee https://github.com/lilyinstarlight/foosteros/blob/5fc9246b28bf77568f8ae28248ab042c78b841ab/config/ephemeral.nix for what I have for that21:28:08
@elvishjerricco:matrix.orgElvishJerricco
In reply to @winterqt:nixos.dev
running into weird issues with systemd initrd :/
Please document and open issues!
21:28:24
@lily:lily.flowers@lily:lily.flowersAnd https://github.com/lilyinstarlight/foosteros/blob/5fc9246b28bf77568f8ae28248ab042c78b841ab/config/base.nix#L92-L105 for the workaround until v25421:28:42
@winterqt:nixos.devWinter (she/her)
In reply to @elvishjerricco:matrix.org
Please document and open issues!
If I can reliably reproduce them, I will.
But the one I'm talking about is where luksroot just... fails randomly, leading to a broken emergency shell...?
21:29:23
@winterqt:nixos.devWinter (she/her)I don't know, I barely know what's going on.21:29:29
@lily:lily.flowers@lily:lily.flowers Can you share more of the service config? ElvishJerricco is right that you prob aren't looking for local-fs.target 21:30:28
@lily:lily.flowers@lily:lily.flowers (Or cryptsetup.target for that matter, iirc) 21:31:14
@lily:lily.flowers@lily:lily.flowers If you want it in between root device becoming available and filesystem being mounted, you could just crudely set it after [mapped-dev].device and local-fs-pre.target and before sysroot.mount and make it wanted by initrd.target. That would work with most anything in between the dev becoming ready and mounting and not interfere with hibernation 21:34:07
@lily:lily.flowers@lily:lily.flowers(But once sd v254 you won't have to use those very-specific targets because the device and sysroot should be correctly attached to relevant initrd-root-* targets based on fstab)21:35:48
@lily:lily.flowers@lily:lily.flowers(Genuinely though, even if you don't end up using systemd-initrd, at least share the config you were having issues with and I can at least look and see what was going on and if we need to fix nixos bugs)21:37:38
@winterqt:nixos.devWinter (she/her)
In reply to @lily:lily.flowers
(Genuinely though, even if you don't end up using systemd-initrd, at least share the config you were having issues with and I can at least look and see what was going on and if we need to fix nixos bugs)
the one I was using for the luksroot issue doesn't have any custom stuff
21:38:45
@winterqt:nixos.devWinter (she/her) just a nixos-generate-config generated luks config 21:38:52
@lily:lily.flowers@lily:lily.flowersOh, rip21:39:33
@lily:lily.flowers@lily:lily.flowersThat's probably bad21:39:54
@lily:lily.flowers@lily:lily.flowersOh actually, was it just timing out?21:40:06
@lily:lily.flowers@lily:lily.flowersLuks unlocking can (indirectly) time out in systemd-initrd right now (because although the cryptsetup unit doesn't timeout, the mapped device unit for mounting the filesystem does...)21:41:13
@lily:lily.flowers@lily:lily.flowers(Iirc)21:41:24
@elvishjerricco:matrix.orgElvishJerricco(I think we can fix that)21:41:58
@lily:lily.flowers@lily:lily.flowers(I'm pretty sure we can, yes. We just haven't I suppose)21:42:52
@elvishjerricco:matrix.orgElvishJerriccoShould just be a matter of a crypttab option21:43:49
@lily:lily.flowers@lily:lily.flowers
In reply to @winterqt:nixos.dev
  boot.initrd.systemd.services.wipe-root = {
    wantedBy = [ "cryptsetup.target" ];
    after = [ "cryptsetup.target" ];
    before = [ "local-fs.target" ];

anyone know why this causes (apparently) a dep cycle?

Oh yeah that'll cause a dep cycle anyway without DefaultDependencies being false too maybe? I forget. I would have to double check manual pages again to be sure
21:50:15
@elvishjerricco:matrix.orgElvishJerriccoI think that's correct21:50:59

Show newer messages


Back to Room ListRoom Version: 6