!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
24 Mar 2022
@janne.hess:helsinki-systems.de@janne.hess:helsinki-systems.de
In reply to @flokli:matrix.org
https://systemd.io/INITRD_INTERFACE/ also mentions also pivoting back to initrd on shutdown, to clean up storage stuff necessary for /
I wanted to test that later 👀
17:35:08
@elvishjerricco:matrix.org@elvishjerricco:matrix.org We definitely should; e.g. we could properly export the root zfs pool that way instead of the dumb hack we do now 17:35:24
@flokli:matrix.orgflokli ElvishJerricco: Maybe we can address some of the minor style nits in the open PR, put enabling it behind a fat lib.warn that this is all still experimental, and merge it? 17:35:44
@flokli:matrix.orgflokliI assume some of the followup stuff can be done in parallel17:35:53
@elvishjerricco:matrix.org@elvishjerricco:matrix.orgYea17:35:53
@elvishjerricco:matrix.org@elvishjerricco:matrix.orgthat's what I was hoping for17:36:03
@elvishjerricco:matrix.org@elvishjerricco:matrix.orgJust haven't gotten around to the remaining nits yet17:36:20
@flokli:matrix.orgflokliOkay :-)17:36:25
@elvishjerricco:matrix.org@elvishjerricco:matrix.orgY'all are free to take a stab at those if you want :)17:36:29
@flokli:matrix.orgflokliI don't want to race with you on it17:36:40
@flokli:matrix.orgflokliI might eat some dinner soon, but will check back later17:36:45
@elvishjerricco:matrix.org@elvishjerricco:matrix.orgI don't have any unpunished progress, and I'm not going to be able to work on this stuff today at all most likely17:36:58
@elvishjerricco:matrix.org@elvishjerricco:matrix.org * I don't have any unpushed progress, and I'm not going to be able to work on this stuff today at all most likely17:37:03
@elvishjerricco:matrix.org@elvishjerricco:matrix.orgoh wow "unpunished != unpushed", what a terrible autocorrect17:37:23
@elvishjerricco:matrix.org@elvishjerricco:matrix.org Actually, if we rely on the real /etc to find all the other mounts via x-initrd.mount, then initrd has to be aware of the full path to /etc, which means either putting it on the kernel cmdline or baking it into the initrd and requiring way too many initrd's in /boot. So maybe we don't want this... Then again if we did put it on the cmdline, we'd be able to have fewer initrds because it wouldn't change whenever the fs'es needed in stage 1 changes... 17:41:50
@arianvp:matrix.org@arianvp:matrix.orgCurrently we rebuild the initrd everytime fstab changes right?17:44:24
@elvishjerricco:matrix.org@elvishjerricco:matrix.orgDon't think so17:44:40
@arianvp:matrix.org@arianvp:matrix.orgAs we don't actually paarse /etc/fstab but just build from the fileSystems options17:44:48
@arianvp:matrix.org@arianvp:matrix.orgOh . Ok in that case maybe makes sense to keep that yeh17:45:00
@elvishjerricco:matrix.org@elvishjerricco:matrix.orgIn the real rootfs, fstab is generated from fileSystems, but we still let systemd-fstab-generator work via fstab. In the old initrd, we have bash-isms for mounting the list of fs'es needed for boot. In the new initrd, we do the same as stage 2, and generate an fstab so that at runtime systemd-fstab-generator will do the work17:46:11
@elvishjerricco:matrix.org@elvishjerricco:matrix.orgSo in old and new, initrd is only rebuilt whenever the fs'es needed for boot change; and in the new initrd that's because we make a new fstab for it17:46:53
@elvishjerricco:matrix.org@elvishjerricco:matrix.orgBut neither has anything to do with stage 2 fstab17:47:03
@elvishjerricco:matrix.org@elvishjerricco:matrix.org * In the real rootfs, fstab is generated from fileSystems, but we still let systemd-fstab-generator work via fstab. In the old initrd, we have shell-isms for mounting the list of fs'es needed for boot. In the new initrd, we do the same as stage 2, and generate an fstab so that at runtime systemd-fstab-generator will do the work17:47:52
@flokli:matrix.orgflokliI'll push a way to address https://github.com/NixOS/nixpkgs/pull/164943#discussion_r833220769 shortly17:48:14
@flokli:matrix.orgfloklidone17:53:56
@flokli:matrix.orgflokli ElvishJerricco: any comment on https://github.com/NixOS/nixpkgs/pull/164943#discussion_r834196298? Otherwise I'd clean that up, too 17:54:25
@elvishjerricco:matrix.org@elvishjerricco:matrix.org flokli: No comment. I think you're absolutely right, I just hadn't thought of the cleanest way to clean it up yet 17:55:10
@flokli:matrix.orgflokli rm ;-) 17:55:21
@elvishjerricco:matrix.org@elvishjerricco:matrix.orgwell it shares code with the regular services options so that'll be a tad tricky17:55:40
@flokli:matrix.orgflokliThe code is identical, with the exception of handling some more additional fields17:58:03

Show newer messages


Back to Room ListRoom Version: 6