28 May 2023 |
ElvishJerricco | We use x-initrd.mount so the host's file systems are in initrd-fs.target | 21:24:27 |
@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 | But that won't work until systemd v254 because my PR wasn't backported to 253 | 21:27:23 |
@lily:lily.flowers | Not for nixos | 21:27:26 |
@lily:lily.flowers | Unless we start setting root= on the cmdlin0 | 21:27:36 |
@lily:lily.flowers | * Unless we start setting `root=` on the cmdline | 21:27:41 |
Winter (she/her) | maybe I should just move back to sh initrd | 21:27:46 |
Winter (she/her) | running into weird issues with systemd initrd :/ | 21:27:54 |
@lily:lily.flowers | See https://github.com/lilyinstarlight/foosteros/blob/5fc9246b28bf77568f8ae28248ab042c78b841ab/config/ephemeral.nix for what I have for that | 21:28:08 |
ElvishJerricco | In reply to @winterqt:nixos.dev running into weird issues with systemd initrd :/ Please document and open issues! | 21:28:24 |
@lily:lily.flowers | And https://github.com/lilyinstarlight/foosteros/blob/5fc9246b28bf77568f8ae28248ab042c78b841ab/config/base.nix#L92-L105 for the workaround until v254 | 21:28:42 |
Winter (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 |
Winter (she/her) | I don't know, I barely know what's going on. | 21:29:29 |
@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 | (Or cryptsetup.target for that matter, iirc) | 21:31:14 |
@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 | (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 | (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 |
Winter (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 |
Winter (she/her) | just a nixos-generate-config generated luks config | 21:38:52 |
@lily:lily.flowers | Oh, rip | 21:39:33 |
@lily:lily.flowers | That's probably bad | 21:39:54 |
@lily:lily.flowers | Oh actually, was it just timing out? | 21:40:06 |
@lily:lily.flowers | Luks 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 | (Iirc) | 21:41:24 |
ElvishJerricco | (I think we can fix that) | 21:41:58 |
@lily:lily.flowers | (I'm pretty sure we can, yes. We just haven't I suppose) | 21:42:52 |
ElvishJerricco | Should just be a matter of a crypttab option | 21:43:49 |
@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 | I think that's correct | 21:50:59 |