!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 Apr 2022
@elvishjerricco:matrix.org@elvishjerricco:matrix.orgIt's very easy to detect unnecessary things by accident17:34:41
@elvishjerricco:matrix.org@elvishjerricco:matrix.orgbut I think that it's good enough. Initrd is a niche thing anyway, and people should probably expect to have to put a bit more care into things like that17:35:23
@janne.hess:helsinki-systems.de@janne.hess:helsinki-systems.deI said I should take a look at dockerTools, they seem to do it very well. But yeah, that's something we can do later17:35:39
@elvishjerricco:matrix.org@elvishjerricco:matrix.orgOh I had figured dockerTools just used regular closures, but that was just an assumption on my part17:36:03
@janne.hess:helsinki-systems.de@janne.hess:helsinki-systems.deyeah so did I :D17:36:19
@elvishjerricco:matrix.org@elvishjerricco:matrix.orgQuick question, when a disk is partitioned, do devices like /dev/sdb1 show up magically, or do we need udev for that? That might be the only thing left I can think of to block this PR; if it doesn't work for systems installed on basic partition tables.17:37:48
@janne.hess:helsinki-systems.de@janne.hess:helsinki-systems.deI don't actually know. I wanted to work on low-level stuff (like hibernation and handover) during the oceansprint but also on raid, integrity, crypto, …. I guess I'll notice it :D17:38:46
@janne.hess:helsinki-systems.de@janne.hess:helsinki-systems.debut I think udev should just do that17:38:56
@elvishjerricco:matrix.org@elvishjerricco:matrix.orgwell we currently don't have any udev rules. Udev does run, but there are no installed rules (I dunno if it has default rules or something)17:39:24
@janne.hess:helsinki-systems.de@janne.hess:helsinki-systems.deoof, that might be an issue in the future. But I'm not sure17:39:44
* @elvishjerricco:matrix.org@elvishjerricco:matrix.org shrugs17:40:21
@elvishjerricco:matrix.org@elvishjerricco:matrix.orgas long as we don't go around telling everyone they can replace their initrd right now, I guess we can fix it later :P17:40:37
@janne.hess:helsinki-systems.de@janne.hess:helsinki-systems.deI guess we shouldn't do that yet17:40:53
@bobvanderlinden_:matrix.orgbobvanderlindenUdevd is needed. Running a VM with rd.emergency in kernel cmdline will give you a shell that does not have /dev/vda. That only pops up after starting systemd-udevd.21:03:34
@bobvanderlinden_:matrix.orgbobvanderlindenFor luks+lvm I did need additional udev rules21:03:54
@bobvanderlinden_:matrix.orgbobvanderlindenFor udev: https://github.com/bobvanderlinden/nixpkgs/blob/pr-systemd-initrd-luks-lvm/nixos/modules/system/boot/initrd-systemd-udev.nix21:25:18
@bobvanderlinden_:matrix.orgbobvanderlindenWhat is a bit painful are the commands that udev rules can potentially call and the packages/files/binaries that are needed.21:25:57
@bobvanderlinden_:matrix.orgbobvanderlindenfor instance the udev rules for luks refers to /run/current-system/systemd/bin/systemd-run. There might be more services that do this. Workaround for that is here: https://github.com/bobvanderlinden/nixpkgs/blob/a1efa03c1d18465da62ec396e47b7826fcad695d/nixos/modules/system/boot/systemd/initrd.nix#L47421:29:46
@bobvanderlinden_:matrix.orgbobvanderlinden* for instance the udev rules for lvm refers to /run/current-system/systemd/bin/systemd-run. There might be more services that do this. Workaround for that is here: https://github.com/bobvanderlinden/nixpkgs/blob/a1efa03c1d18465da62ec396e47b7826fcad695d/nixos/modules/system/boot/systemd/initrd.nix#L47421:30:17
@bobvanderlinden_:matrix.orgbobvanderlindenUdev, lvm and LUKS modules can be found here: https://github.com/bobvanderlinden/nixpkgs/tree/pr-systemd-initrd-luks-lvm/nixos/modules/system/boot (initrd-systemd-*) LUKS works nicely. Lvm doesn't yet work correctly, haven't found why not. I think it's close, but this is the thing that is still preventing me to boot my laptop configuration.21:32:52
@elvishjerricco:matrix.org@elvishjerricco:matrix.orgHm there's also the issue that if you don't have emergencyAccess enabled, then it just says the root account is locked, press enter to continue, which brings you back to the root account is locked message. I wonder if there's a decent way to have an option to reboot from there.23:05:52
@elvishjerricco:matrix.org@elvishjerricco:matrix.orgThat's not a blocker at all; just something I thought about23:06:20
2 Apr 2022
@janne.hess:helsinki-systems.de@janne.hess:helsinki-systems.deI think its something the upstream systemd devs will have to fix01:58:16
@andreas.schraegle:helsinki-systems.de@andreas.schraegle:helsinki-systems.de
In reply to @elvishjerricco:matrix.org
Hm there's also the issue that if you don't have emergencyAccess enabled, then it just says the root account is locked, press enter to continue, which brings you back to the root account is locked message. I wonder if there's a decent way to have an option to reboot from there.
ctrl+alt+del?
02:33:29
@janne.hess:helsinki-systems.de@janne.hess:helsinki-systems.deMore than 8 times in 5 seconds 02:33:56
@elvishjerricco:matrix.org@elvishjerricco:matrix.org
In reply to @bobvanderlinden_:matrix.org
What is a bit painful are the commands that udev rules can potentially call and the packages/files/binaries that are needed.
I know a lot of the udev rules refer to some commands by name without an absolute path. Hopefully we can just add those to the /bin env thing, then they'll be on PATH and we need any patching.
03:58:22
@elvishjerricco:matrix.org@elvishjerricco:matrix.org
In reply to @bobvanderlinden_:matrix.org
for instance the udev rules for lvm refers to /run/current-system/systemd/bin/systemd-run. There might be more services that do this. Workaround for that is here: https://github.com/bobvanderlinden/nixpkgs/blob/a1efa03c1d18465da62ec396e47b7826fcad695d/nixos/modules/system/boot/systemd/initrd.nix#L474
And no need for a whole service to make that symlink. You can just do something like contents."/run/current-system/sw/bin".source = cfg.contents."/bin".source; (with the new contents API that replaced the objects one)
03:59:57
@elvishjerricco:matrix.org@elvishjerricco:matrix.org We probably want a way to add a specific program to /bin without adding the whole package's $out/bin. Then we wouldn't need the special case stuff for mount and umount. Dunno what we'd call that. initrdBinExtras? 04:01:10
@janne.hess:helsinki-systems.de@janne.hess:helsinki-systems.de
In reply to @elvishjerricco:matrix.org
We probably want a way to add a specific program to /bin without adding the whole package's $out/bin. Then we wouldn't need the special case stuff for mount and umount. Dunno what we'd call that. initrdBinExtras?
extraBins?
04:02:10
@elvishjerricco:matrix.org@elvishjerricco:matrix.org I like initrdBinExtras better than that since it conveys its part of the same thing 04:03:06

There are no newer messages yet.


Back to Room ListRoom Version: 6