!PSmBFWNKoXmlQBzUQf:helsinki-systems.de

Stage 1 systemd

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

Load older messages


SenderMessageTime
4 May 2023
@mberndt:matrix.org@mberndt:matrix.orgIt doesn't look like it to me: https://github.com/stratis-storage/stratisd/blob/77cc6df928c554464a84e9aac7af4718196babdf/dracut/90stratis/module-setup.sh05:54:58
@mberndt:matrix.org@mberndt:matrix.orgAnd in this other script they just use systemd-ask-password: https://github.com/stratis-storage/stratisd/blob/77cc6df928c554464a84e9aac7af4718196babdf/systemd/stratis-fstab-setup#L2705:56:00
@elvishjerricco:matrix.org@elvishjerricco:matrix.orgInteresting. Well, might as well open a PR; it's a real simple change05:56:31
@mberndt:matrix.org@mberndt:matrix.orgYup05:56:39
@elvishjerricco:matrix.org@elvishjerricco:matrix.orgcould then remove plymouth from these "dependencies" I guess https://github.com/stratis-storage/stratisd/blob/77cc6df928c554464a84e9aac7af4718196babdf/dracut/90stratis/module-setup.sh#L3705:56:53
@mberndt:matrix.org@mberndt:matrix.orgYes05:57:18
@aktaboot:tchncs.de@aktaboot:tchncs.de left the room.19:44:34
5 May 2023
@elvishjerricco:matrix.org@elvishjerricco:matrix.org Arian: Did you end up looking into the repart thing? 03:02:49
@elvishjerricco:matrix.org@elvishjerricco:matrix.org I did realize one arguably good reason to run repart in initrd even if you're not autoformatting root. Generators, such as gpt-auto-generator, will only be able to see the partitions if you run repart in initrd, or if you systemctl daemon-reload after repart finishes. 04:37:13
@nikstur:matrix.org@nikstur:matrix.orgCould we somehow make systemd treat /nix/store similarly to /usr (without patching systemd)? Then the semantics would completely line up 21:28:59
@nikstur:matrix.org@nikstur:matrix.org
In reply to @elvishjerricco:matrix.org
I did realize one arguably good reason to run repart in initrd even if you're not autoformatting root. Generators, such as gpt-auto-generator, will only be able to see the partitions if you run repart in initrd, or if you systemctl daemon-reload after repart finishes.
gpt-auto-generators must've been the primary reason for why systemd-repart also reads definitions from /sysroot
21:30:43
@elvishjerricco:matrix.org@elvishjerricco:matrix.orgThe problem is that /usr stores the current OS's configuration. /nix/store is not a single OS though21:31:37
@elvishjerricco:matrix.org@elvishjerricco:matrix.orgso it's not clear how to make it use the correct configuration without...... activation21:31:56
@elvishjerricco:matrix.org@elvishjerricco:matrix.organd that just means mounting the whole initrd FS again21:32:03
@nikstur:matrix.org@nikstur:matrix.orgMhmm that's a good point. 21:33:07
@nikstur:matrix.org@nikstur:matrix.org But maybe if we teach the systemd tools the locations of the files (like /etc/os-release, repart definitions etc.) it expects, don't we get close enough? 21:35:45
@nikstur:matrix.org@nikstur:matrix.org * But maybe if we teach the systemd tools the locations of the files (like /etc/os-release, repart definitions etc.) it expects in the nix store, don't we get close enough? 21:36:25
@elvishjerricco:matrix.org@elvishjerricco:matrix.org nikstur: Thing is, that's not a whole lot different than just... putting those files in the initrd, from a practical perspective 21:50:42
@nikstur:matrix.org@nikstur:matrix.orgRight right right. I think I was a little (very) slow on this. Let me think about it a little more...21:56:40
@elvishjerricco:matrix.org@elvishjerricco:matrix.org I do kinda wonder if we should be trying to reduce the fsNeededForBoot space. Like, a lot of the problem is that systemd wishes that all you needed in initrd was / and /usr, while in nixos we have a whole list of mountpoints that need to be there 21:59:51
@elvishjerricco:matrix.org@elvishjerricco:matrix.org How much of that stuff is actually needed though? Like I think the main reason we need /var/lib is because of the users-groups stuff we do in activation. But shouldn't that stuff really be handled at the same level as systemd-sysroot? i.e. during ordinary stage 2 systemd units? 22:00:48
@elvishjerricco:matrix.org@elvishjerricco:matrix.org (In fact, that's a good example because we already have a PR to change part of that one: https://github.com/NixOS/nixpkgs/pull/223932/files/034ae4044941f507dcabd5f20753d6c786f925b6..31361e90bc151eba286ffcdafdaed89df7c77de6?notification_referrer_id=NT_kwDOABTWvLI2MDE5MzMyOTc4OjEzNjU2OTI&notifications_query=is%3Aunread) 22:01:15
@elvishjerricco:matrix.org@elvishjerricco:matrix.org * (In fact, that's a good example because we already have a PR to change part of that one: ) 22:01:20
@elvishjerricco:matrix.org@elvishjerricco:matrix.org * (In fact, that's a good example because we already have a PR to change part of that one: https://github.com/NixOS/nixpkgs/pull/223932) 22:01:33
@elvishjerricco:matrix.org@elvishjerricco:matrix.org * How much of that stuff is actually needed though? Like I think the main reason we need /var/lib is because of the users-groups stuff we do in activation. But shouldn't that stuff really be handled at the same level as systemd-sysusers? i.e. during ordinary stage 2 systemd units? 22:03:02
@uep:matrix.org@uep:matrix.orgSystemd is all about unbundling serial things (ball of script) into separate items with finer-grain dependency graphs22:36:10
@uep:matrix.org@uep:matrix.orgwell, the "init system" part of systemd is22:36:18
@uep:matrix.org@uep:matrix.orgSo, like, yeah... decouple away22:36:37
@uep:matrix.org@uep:matrix.orgAt some point in this process, perhaps here where things potentially change between stage 1 and 2, we hit coupling and compatibility issues with a stage 2 that needs to work with scripted stage 1 still?22:38:39
6 May 2023
@mberndt:matrix.org@mberndt:matrix.orgHey, so I was looking into making a test for the stratis root fs support that I'm trying to get merged, and I figured that the easiest way to do that is to tweak the lvm2 test that already exists. https://github.com/NixOS/nixpkgs/blob/master/nixos/tests/lvm2/systemd-stage-1.nix16:00:30

Show newer messages


Back to Room ListRoom Version: 6