!PSmBFWNKoXmlQBzUQf:helsinki-systems.de

Stage 1 systemd

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

Load older messages


SenderMessageTime
1 Aug 2022
@elvishjerricco:matrix.org@elvishjerricco:matrix.org Cool. I'd still like someone's answer to this comment, but I'm inclined to merge if we get no such answer in the next day or two 20:08:27
@elvishjerricco:matrix.org@elvishjerricco:matrix.org Oh, and apparently we're getting an eval error because there's no lib.maintainers.dasJ 20:11:10
@elvishjerricco:matrix.org@elvishjerricco:matrix.org Ah, lib.maintainers.das_j 20:11:40
@elvishjerricco:matrix.org@elvishjerricco:matrix.org Also, Janne Heß did you ever consent to being added to that maintainer list? I gave a thumbs up for myself; I apologize if I accidentally indicated you were cool with it too 20:12:35
@winterqt:nixos.devWinter (she/her) So I'm considering giving systemd initrd a whirl on my machines. The one requirement I have is that I'm able to wipe my ZFS root dataset on startup. Would this be accomplished by defining a unit that requires and runs after zfs-import-<pool name>? I think that's... all I really have to do? 21:49:27
@winterqt:nixos.devWinter (she/her) (I do this with postDeviceCommands now.) 21:49:43
@elvishjerricco:matrix.org@elvishjerricco:matrix.orgThat sounds right to me.21:50:13
@winterqt:nixos.devWinter (she/her) Also, semi off-topic but I think someone here would know: why does the ZFS module explicitly use ${cfgZfs.package}/sbin/zfs in its scripts, when this is already added to initrd's packages and the system packages, so it really should just be able to call zfs, unless there's a reason this is explicitly done that I'm missing? 21:53:02
@elvishjerricco:matrix.org@elvishjerricco:matrix.org why would it be able to just call zfs? 21:54:24
@elvishjerricco:matrix.org@elvishjerricco:matrix.orgunits don't have a PATH by default21:54:39
@linus:schreibt.jetzt@linus:schreibt.jetzt
In reply to @winterqt:nixos.dev
So I'm considering giving systemd initrd a whirl on my machines. The one requirement I have is that I'm able to wipe my ZFS root dataset on startup. Would this be accomplished by defining a unit that requires and runs after zfs-import-<pool name>? I think that's... all I really have to do?
I think you'll also want to order it before and make it required by the rootfs mount unit
21:57:26
@linus:schreibt.jetzt@linus:schreibt.jetztnot sure what that's called though21:57:33
@elvishjerricco:matrix.org@elvishjerricco:matrix.orgThat's probably "correct" but shouldn't really be necessary. ZFS can rollback a mounted file system.22:02:01
@elvishjerricco:matrix.org@elvishjerricco:matrix.org You will want it before initrd.target though 22:02:14
@elvishjerricco:matrix.org@elvishjerricco:matrix.org(but before the rootfs would obviously make that implicit)22:04:31
@winterqt:nixos.devWinter (she/her)
In reply to @elvishjerricco:matrix.org
You will want it before initrd.target though
What happens after that target? It looks like this is just like, the initrd setup target, based on the wants/after.
22:45:47
@winterqt:nixos.devWinter (she/her)Does like, everything else happen after it?22:45:56
@elvishjerricco:matrix.org@elvishjerricco:matrix.org After initrd.target gets reached, we run systemctl isolate initrd-switch-root.service 22:46:28
@elvishjerricco:matrix.org@elvishjerricco:matrix.org so everything without IgnoreOnIsolate gets killed, meaning anything that was still in progress won't finish 22:46:49
2 Aug 2022
@winterqt:nixos.devWinter (she/her)
In reply to @elvishjerricco:matrix.org
After initrd.target gets reached, we run systemctl isolate initrd-switch-root.service
Do you run that literal command? I can't find the reference to it, only the definition of the service.
02:04:13
@elvishjerricco:matrix.org@elvishjerricco:matrix.org Winter (she/her): It's in initrd-cleanup.service, which is supposed to be the only thing with an After=initrd.target ordering 02:08:28
@elvishjerricco:matrix.org@elvishjerricco:matrix.org It does systemctl --no-block isolate initrd-switch-root.target 02:08:52
@elvishjerricco:matrix.org@elvishjerricco:matrix.orgSo anything that needs to happen before switch-root needs to be before initrd.target02:09:08
@winterqt:nixos.devWinter (she/her)Ah, I see.02:09:32
@elvishjerricco:matrix.org@elvishjerricco:matrix.orgthat's from upstream systemd units02:09:42
@elvishjerricco:matrix.org@elvishjerricco:matrix.org Winter (she/her): A lot of the details are graphed out and explained in man bootup 02:11:05
@elvishjerricco:matrix.org@elvishjerricco:matrix.orgfor both stage 1 and 202:11:14
@winterqt:nixos.devWinter (she/her)Thank you, and sorry for all of the questions.02:18:18
@elvishjerricco:matrix.org@elvishjerricco:matrix.org Winter (she/her): I'm happy to help! 02:18:43
@elvishjerricco:matrix.org@elvishjerricco:matrix.org Oh wow. So I knew zfs had a whole dracut thing. I didn't know they had a whole thing for dracut's systemd mode. 02:34:34

Show newer messages


Back to Room ListRoom Version: 6